Create prealert
Creates a prealert for the order list
Function CreatePrealert(Val Token, Val UUIDArray, Val TransferDate, Val Point, Val TestAPI = False) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Auth token |
UUIDArray | --uuids | String, Array of String | ✔ | One or an array of order UUIDs |
TransferDate | --date | Date | ✔ | Planned date of transfer of orders to CDEK |
Point | --point | String | ✔ | Code of shipment point to which it is planned to transfer orders |
TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
Returns: Map Of KeyAndValue - serialized JSON response from CDEK
tip
Method at API documentation: Registration of Prealert document
1C:Enterprise/OneScript code example
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3MzY2MjEyMzYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJhY2NvdW50LWxhbmc6cnVzIiwiY29udHJhY3Q60JjQnC3QoNCkLdCT0JvQky0yMiIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "0869dacf-feb4-4944-8dc6-11bfb043ee2f";
Point = "NSK27";
TransferDate = OPI_Tools.GetCurrentDate() + 60 * 60 * 24;
Result = OPI_CDEK.CreatePrealert(Token, UUID, TransferDate, Point, True);
- Bash
- CMD/Bat
oint cdek CreatePrealert \
--token "***" \
--uuids "84329c0f-b8de-4d82-b9ed-947777977511" \
--date "2025-01-11T11:57:32.4326399" \
--point "NSK27" \
--testapi "***"
oint cdek CreatePrealert ^
--token "***" ^
--uuids "84329c0f-b8de-4d82-b9ed-947777977511" ^
--date "2025-01-11T11:57:32.4326399" ^
--point "NSK27" ^
--testapi "***"
Result
{
"entity": {
"uuid": "72753031-8222-4d75-9c04-8a14035cbe80"
},
"requests": [
{
"request_uuid": "d20f73ba-1277-4933-b559-241c4948e8d0",
"type": "CREATE",
"date_time": "2024-10-21T21:27:30+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}