Update order
Changes the field values of the selected order
Function UpdateOrder(Val Token, Val UUID, Val OrderDescription, Val TestAPI = False) Export
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 |
Returns: Map Of KeyAndValue - serialized JSON response from CDEK
tip
Method at API documentation: Update an order
1C:Enterprise/OneScript code example
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3MzIyNjMyNTYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "42efa26d-4dc4-4431-b446-c73e59461cfe";
OrderDescription = New Structure("comment", "NewComment");
Result = OPI_CDEK.UpdateOrder(Token, UUID, OrderDescription, True);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint cdek UpdateOrder \
--token "***" \
--uuid "531f89d4-ce21-4b3e-adc6-a60b9d51118e" \
--order "{'comment':'NewComment'}" \
--testapi "***"
:: JSON data can also be passed as a path to a .json file
oint cdek UpdateOrder ^
--token "***" ^
--uuid "531f89d4-ce21-4b3e-adc6-a60b9d51118e" ^
--order "{'comment':'NewComment'}" ^
--testapi "***"
Result
{
"entity": {
"uuid": "a93fd1b1-55b3-4033-a52a-d2df7bb6b469"
},
"requests": [
{
"request_uuid": "7492bd86-fb08-4d14-95fe-64d51a823d66",
"type": "UPDATE",
"date_time": "2024-10-21T21:27:52+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}