v1

latestOpenAPI 3.0.02026-07-14641139.1 KB
Orders

Cancel order

You should use this endpoint to cancel an order by its orderId.

A common scenario is one where the seller has a problem with the order fulfillment and needs to request the order cancellation to the marketplace. To do this, the seller would need to make this request, passing the orderId in the URL.

You should expect a response with the date when the notification was received, the orderId, and a receipt protocol code.

Be aware that if the order status is already Invoiced, the order can only be canceled if - before using this request - you send a return invoice through the Order Invoice Notification endpoint.

The Cancel order resource is needed to use this API request. This is included in OMS - Full access and IntegrationProfile - Fulfillment Oms, among other default roles available in the Admin. Learn more about the License manager roles and resources.

post/api/orders/pvt/document/{orderId}/cancel

Path parameters

orderIdstring required
Example:70caf3941s6df1

ID of the order.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

reasonstring

Reason for cancelling the order.

Example request

{
  "reason": "Unexpected stock shortage"
}

Response

OK

datestring

Date and time when the notification was received.

orderIdstring

Identification of the order in the seller.

receiptstring

Protocol code generated by the update. It may be null.

Example response

{
  "date": "2014-02-07T15:22:56.7612218-02:00",
  "orderId": "123543123",
  "receipt": "38e0e47da2934847b489216d208cfd91"
}