Skip to content

Cancel order

Use the Cancel order API to stop the production and shipment process. Please note: if the order has moved to status printed or shipped the order can't be canceled, please review the Order item statuses flowchart.

POST https://api.gelato.com/v2/order/cancel

Request example

$ curl -X POST \
   https://api.gelato.com/v2/order/cancel \
   -H 'Content-Type: application/json' \
   -H 'X-API-KEY: {{apiKey}}' \
   -d '{"orderReferenceId": "{{MyOrderId}}"}'

Response example

{
  "message" : "The order {{orderReferenceId}} canceled"
}

Query Parameters

Parameter Type Description
orderReferenceId (required) string Reference to your internal order id.

Response Parameters

Parameter Type Description
message (required) string Human-readable message to the order cancel request.

Response Messages

Error response example:

{
  "message": "Order not found."
}
HTTP Status Code Message
200 The order {{MyOrderreferenceId}} canceled.
400 The order cannot be canceled, because one of the items is in 'printed' status. itemReferenceId: {{MyItemReferenceId}}
404 Order not found.