Skip to main content

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 typeGET
Path / URL/api/v1/orders/{orderNumber}/history
DescriptionMethod for retrieving all status changes for an order in the courier service IS
DirectionThe request is executed by the Gold Apple IS. The response is provided by the courier service's IS

Request​

Header Parameters​

ParameterData typeRequiredDescriptionComment
Authorizationstring1Access 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-typestring1Request content typeFilled in as "application/json"

Request Path Parameters​

ParameterData typeRequiredDescriptionComment
orderNumberstring1Order number in the Gold Apple ISInternal 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​

CodeStatusMessageReason
200OKStatus history has been sentThe status history is provided in the response payload
400Bad RequestMissing or inappropriate required parametersRequired parameters are missing or invalid
401UnauthorizedToken is invalidAuthentication error at the courier service
403ForbiddenHas no permissionInsufficient permissions
404Not FoundResource not foundThe order was not found in the Gold Apple IS
500Internal Server ErrorServer unavailableThe server is unavailable

Successful Response Parameters​

№ParameterData typeRequiredDescriptionComment
1statusHistoryarray of objects1Array of status-assignment information objects
2Status object typeobject1Object containing status informationsee 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​

ParameterData typeRequiredDescriptionComment
errorstring1Human-readable description of the errorsee the "Response Codes and Messages" section

Unsuccessful response example​

{
"error": "Invalid request format"
}