1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-26 05:37:27 +02:00
Vitaly the Alpaca (bot) bec1c1661a Main build (Jenkins)
2024-10-15 21:15:56 +03:00

61 lines
2.0 KiB
Plaintext

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# 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
<br/>
:::tip
Method at API documentation: [Change of order](https://api-docs.cdek.ru/36981178.html)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3Mjg3MzkwMDYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJhcGktdmVyc2lvbjoxLjEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "48763bae-2d8e-4521-9052-01377017fbe7";
OrderDescription = New Structure("comment", "NewComment");
Result = OPI_CDEK.UpdateOrder(Token, UUID, OrderDescription, True);
```
```json title="Result"
{
"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": []
}
```