Retrieving the Order Status Change History
An auxiliary method for retrieving all statuses of a delivery order. After receiving the final delivery status, regardless of whether the delivery was successful, the Gold Apple IS executes this request in order to retrieve the entire history and synchronize it with the statuses already received, to avoid storing a status history that is chronologically incorrect, incomplete due to network issues, or otherwise incorrect for any other reason. The endpoint must be published over the secure HTTPS protocol.
Basic Information
| Request method type | GET |
|---|---|
| Path / URL | /api/v1/orders/{orderNumber}/history |
| Description | Method for retrieving all status changes for an order in the courier service IS |
| Direction | The request is executed by the Gold Apple IS. The response is provided by the courier service's IS |
Request
Header Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| Authorization | string | 1 | Access token obtained during authorization. Passed in the format Bearer <access_token> | The format is defined by the courier service (see Authorization in the ECS Service) |
| content-type | string | 1 | Request content type | Filled in as "application/json" |
Request Path Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| orderNumber | string | 1 | Order number in the Gold Apple IS | Internal order number in the Gold Apple IS. Tracking number |
Request example
curl --location 'https://ecs.goldapple.ru/api/v1/orders/I-1000000515/history' \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" \
-H "Content-Type: application/json"
Response
Response Codes and Messages
| Code | Status | Message | Reason |
|---|---|---|---|
| 200 | OK | Status history has been sent | The status history is provided in the response payload |
| 400 | Bad Request | Missing or inappropriate required parameters | Required parameters are missing or invalid |
| 401 | Unauthorized | Token is invalid | Authentication error at the courier service |
| 403 | Forbidden | Has no permission | Insufficient permissions |
| 404 | Not Found | Resource not found | The order was not found in the Gold Apple IS |
| 500 | Internal Server Error | Server unavailable | The server is unavailable |
Successful Response Parameters
| № | Parameter | Data type | Required | Description | Comment | |
|---|---|---|---|---|---|---|
| 1 | statusHistory | array of objects | 1 | Array of status-assignment information objects | ||
| 2 | Status object type | object | 1 | Object containing status information | see Appendix: Order Status Data Type | |
Successful response example
{
"statusHistory": [
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_DELIVERED",
"statusComment": "Order delivered, accepted by customer",
"statusAssignmentDate": "2025-04-05T14:25:00Z",
"hasBeenDelivered": true,
"actualDeliveryDate": "2025-04-05T14:25:00Z"
},
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_TAKEN_BY_COURIER",
"statusComment": "Order handed to courier, en route to customer",
"statusAssignmentDate": "2025-04-05T11:15:22Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
},
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_COURIER_APPOINTED",
"statusComment": "Courier assigned. Delivery expected today",
"statusAssignmentDate": "2025-04-05T10:15:30Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
},
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_READY_FOR_APPOINTMENT",
"statusComment": "Order ready for delivery scheduling",
"statusAssignmentDate": "2025-04-04T18:40:22Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
},
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_ACCEPTED",
"statusComment": "Order accepted, in transit",
"statusAssignmentDate": "2025-04-04T14:30:05Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
},
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_CREATED",
"statusComment": "Order created, awaiting courier pickup",
"statusAssignmentDate": "2025-04-04T14:30:05Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
}
]
}
Unsuccessful Response Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| error | string | 1 | Human-readable description of the error | see the "Response Codes and Messages" section |
Unsuccessful response example
{
"error": "Invalid request format"
}