Changing Order Status
When, during delivery by the courier service, an event occurs that requires updating the status of the current delivery, the courier service must notify Gold Apple of this. A webhook technology with a subscription implemented on the courier service side is proposed for this interaction (i.e. the classic pattern for shipment tracking). Any status change of the shipment on the courier service side that is significant (from the point of view of Gold Apple and its customers) must trigger sending such a request; the exceptions are: sending a delivery date change from the courier service side (see Changing the Delivery Date at the Courier Service's Request) and sending a delivery date change from the Gold Apple side (see Changing the Delivery Date at Gold Apple's Request).
Basic Information
| Request method type | PUT |
|---|---|
| Path / URL | /api/v1/orders/{orderNumber} |
| Description | Method for changing an order's status by the courier service |
| Direction | An event on the ECS side triggers the request. The request is executed by the courier service. The response is provided by the Gold Apple IS. |
Request
Header Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| Authorization | string | 1 | Access token issued by the service | see the Authorization in the Service method |
| 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 Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| Status object type | object | 1 | Object containing information about the current status | see Appendix: Order Status Data Type |
Request example
{
"deliveryServiceCode": "CDEK",
"actualStatus": "ECS_ORDER_TAKEN_BY_COURIER",
"statusComment": "Order handed to courier for delivery",
"statusAssignmentDate": "2025-04-05T10:15:30Z",
"hasBeenDelivered": false,
"actualDeliveryDate": null
}
Response
Response Codes and Messages
| Code | Status | Message | Reason |
|---|---|---|---|
| 200 | OK | Status has been updated | Everything completed successfully. The order status was accepted by the Gold Apple IS |
| 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 |
| 500 | Internal Server Error | Server unavailable | The server is unavailable |
Successful Response Parameters
200 OK
Successful response example
Successful response
{}
Unsuccessful Response Parameters
| Parameter | Data type | Required | Description |
|---|---|---|---|
| error | string | 1 | Human-readable description of the error |
Unsuccessful response example
Unsuccessful response
{
"error": "Token is invalid"
}