Skip to main content

Order Cancellation at Gold Apple's Request

If an order needs to be canceled for any reason, the Gold Apple IS may send a request to cancel the delivery order to the courier service's IS. The delivery order created in the courier service IS is canceled automatically (if this is permitted given the current delivery status), and the courier service IS records that it accepted the request. The details of the services' physical interaction are not specified in this document. The physical shipment may remain with the courier after the order is canceled in the IS. The endpoint must be published over the secure HTTPS protocol.

info

After receiving a cancellation at Gold Apple's request, the courier service's IS sends the status GA_CANCEL_REQUEST using the Changing Order Status method

Basic Information​

Request method typePOST
Path / URL/api/v1/orders/{orderNumber}/cancel
DescriptionMethod for cancelling an order at the courier service, at Gold Apple's request.
DirectionThe request is executed by the Gold Apple IS. The response is provided by the courier service.

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"

Path Parameters​

ParameterData typeRequiredDescriptionComment
orderNumberstring1Gold Apple order numberInternal order number in the Gold Apple IS. Tracking number.

Response​

Response Codes and Messages​

CodeStatusMessageReason
200OKOrder has been canceledEverything completed successfully. The order was canceled in the courier service's 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

Unsuccessful Response Parameters​

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

Unsuccessful response example​

{
"error": "Token is invalid"
}