Skip to main content

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 typePUT
Path / URL/api/v1/orders/{orderNumber}
DescriptionMethod for changing an order's status by the courier service
DirectionAn 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​

ParameterData typeRequiredDescriptionComment
Authorizationstring1Access token issued by the servicesee the Authorization in the Service method
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 Parameters​

ParameterData typeRequiredDescriptionComment
Status object typeobject1Object containing information about the current statussee 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​

CodeStatusMessageReason
200OKStatus has been updatedEverything completed successfully. The order status was accepted by the Gold Apple IS
400Bad RequestMissing or inappropriate required parametersRequired parameters are missing or invalid
401UnauthorizedToken is invalidAuthentication error at the courier service
403ForbiddenHas no permissionInsufficient permissions
500Internal Server ErrorServer unavailableThe server is unavailable

Successful Response Parameters​

200 OK

Successful response example​

Successful response​

{}

Unsuccessful Response Parameters​

ParameterData typeRequiredDescription
errorstring1Human-readable description of the error

Unsuccessful response example​

Unsuccessful response​

{
"error": "Token is invalid"
}

/api/v1/orders/{orderNumber}

Authorizations:
Bearer
path Parameters
orderNumber
required
string
Request Body schema:
required
deliveryServiceCode
required
string non-empty
actualStatus
required
string non-empty
statusComment
required
string non-empty
statusAssignmentDate
required
string <date-time>
hasBeenDelivered
boolean
actualDeliveryDate
string or null <date-time>

Responses

Request samples

Content type
{
  • "deliveryServiceCode": "string",
  • "actualStatus": "string",
  • "statusComment": "string",
  • "statusAssignmentDate": "2019-08-24T14:15:22Z",
  • "hasBeenDelivered": true,
  • "actualDeliveryDate": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{ }