Order status history
General information
The service allows getting a history of order status changes. The service is available to both authorized and unauthorized users.
Order status history
Method request
Request structure
Method address: https://api.dellin.ru/v3/orders/statuses_history.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "docIds":[ "400267443", "400267444" ], "webOrderNumber":"935743976" }
Method address: https://api.dellin.ru/v3/orders/statuses_history.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <docIds>400267443</docIds> <docIds>400267444</docIds> <webOrderNumber>935743976</webOrderNumber> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
docIds | No* | array of strings | Number of order, waybill or order for shipping from address/delivery to address. More than one parameter can be passed (5 parameters maximum). *Only one of the following parameters must be passed in a request: docIds, webOrderNumber |
webOrderNumber | No* | string | Online store order number (internal order number). *Only one of the following parameters must be passed in a request: docIds, webOrderNumber |
Method respose
Response structure
{ "metadata":{ "status":200, "generated_at":"2023-01-26 15:06:51" }, "data":{ "statusHistory":{ "400267443":[ { "number":"400267443", "state":"waiting", "stateName":"Ожидает сдачи на терминал", "stateDate":"2023-01-12T15:52:40.000+03:00", "detailedStatus":"waiting", "detailedStatusRus":null, "detailedStatusDate":"2023-01-12T15:52:40.000+03:00" }, { "number":"400267443", "state":"inway", "stateName":"Груз в пути", "stateDate":"2023-01-25T11:10:44.000+03:00", "detailedStatus":"inway", "detailedStatusRus":null, "detailedStatusDate":"2023-01-25T11:10:44.000+03:00" }, { "number":"400267443", "state":"arrived_to_airport", "stateName":"Груз прибыл в аэропорт", "stateDate":"2023-01-25T11:12:03.000+03:00", "detailedStatus":"arrived_to_airport", "detailedStatusRus":null, "detailedStatusDate":"2023-01-25T11:12:03.000+03:00" } ] }, "info":[ { "number":"400267444", "message":"Найдено более одного заказа" }, { "number":"935743976", "message":"Заказ не найден" } ] } }
<response> <metadata> <status>200</status> <generated_at>2023-01-26 15:06:51</generated_at> </metadata> <data> <statusHistory> <400267443> <number>400267443</number> <state>waiting</state> <stateName>Ожидает сдачи на терминал</stateName> <stateDate>2023-01-12T15:52:40.000+03:00</stateDate> <detailedStatus>waiting</detailedStatus> <detailedStatusRus /> <detailedStatusDate>2023-01-12T15:52:40.000+03:00</detailedStatusDate> </400267443> <400267443> <number>400267443</number> <state>inway</state> <stateName>Груз в пути</stateName> <stateDate>2023-01-25T11:10:44.000+03:00</stateDate> <detailedStatus>inway</detailedStatus> <detailedStatusRus /> <detailedStatusDate>2023-01-25T11:10:44.000+03:00</detailedStatusDate> </400267443> <400267443> <number>400267443</number> <state>arrived_to_airport</state> <stateName>Груз прибыл в аэропорт</stateName> <stateDate>2023-01-25T11:12:03.000+03:00</stateDate> <detailedStatus>arrived_to_airport</detailedStatus> <detailedStatusRus /> <detailedStatusDate>2023-01-25T11:12:03.000+03:00</detailedStatusDate> </400267443> </statusHistory> <info> <number>400267444</number> <message>Найдено более одного заказа</message> </info> <info> <number>935743976</number> <message>Заказ не найден</message> </info> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
metadata | object | System information |
metadata.status | integer | Emulated status http-code. If successful, code 200 is returned |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | History of status changes for each found order, informational messages |
data.statusHistory | StatusHistory | List of found orders and history of their status changes |
data.info | array of Info | Array of informational messages. Parameter is present in a response if the next conditions are met:
In this case, the history of status changes for the uniquely found orders is output in the data.statusHistory parameter, and the corresponding informational messages are output for the rest orders in the data. info parameter Note: If only one document number was passed in the request and more than one order was found for it or none was found, then instead of the data block, the response will return error 130002 with the corresponding description (see "Errors of API methods") |
StatusHistory
StatusHistory | ||
---|---|---|
Parameter | Type | Description |
docId* | object | Array with the found history of the order. *Instead of [docId] here and below, the number of the found document is output in the response |
docId.Number | integer | Passed number of the document by which the history of status changes was found |
docId.State | string | Order status in English, see "Directory of order statuses" |
docId.StateName | string | Order status in Russian, see "Directory of order statuses" |
docId.StateDate | string | Date when the status was set. Format: YYYY-MM-DD HH:MM:SS+HH:MM |
docId.DetailedStatus | string | Detailed order status in English. Possible values (the statuses order corresponds to the order of the possible values of "docId.detailedStatusRus" parameter):
|
docId.DetailedStatusRus | string | Detailed order status in Russian. Possible values (the statuses order corresponds to the order of the possible values of "docId.detailedStatus" parameter):
|
docId.DetailedStatusDate | string | Date when the detailed status was set. Format: YYYY-MM-DD HH:MM:SS+HH:MM |
Info
Info | ||
---|---|---|
Parameter | Type | Description |
number | string | Passed number of the document |
message | string | Informational message |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.