1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-26 05:37:27 +02:00

61 lines
2.0 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-11 23:33:40 +03:00
sidebar_position: 2
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-11 23:33:40 +03:00
# Update order
Changes the field values of the selected order
`Function UpdateOrder(Val Token, Val UUID, Val OrderDescription, Val TestAPI = False) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| UUID | --uuid | String | ✔ | Order UUID for updating |
| OrderDescription | --order | Structure of KeyAndValue | ✔ | Set of changing order fields |
| TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
2024-10-11 23:33:40 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from CDEK
<br/>
:::tip
Method at API documentation: [Change of order](https://api-docs.cdek.ru/36981178.html)
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:07:27 +03:00
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3Mjg3MzkwMDYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJhcGktdmVyc2lvbjoxLjEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "48763bae-2d8e-4521-9052-01377017fbe7";
2024-10-11 23:33:40 +03:00
OrderDescription = New Structure("comment", "NewComment");
Result = OPI_CDEK.UpdateOrder(Token, UUID, OrderDescription, True);
```
2024-10-15 09:53:37 +03:00
2024-10-11 23:33:40 +03:00
```json title="Result"
2024-10-12 23:29:51 +03:00
{
"entity": {
"uuid": "9aedf214-562a-45a2-982c-897b753a0ebd"
},
"requests": [
{
"request_uuid": "03d76b39-93a1-4c15-b5fa-ff49129579e4",
"type": "UPDATE",
"date_time": "2024-10-12T19:31:15+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}
2024-10-11 23:33:40 +03:00
```