v60

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-01361201.5 MB
Orders

Cancel order

Cancels an order using its identification code (orderId). A common scenario is when the seller has a problem fulfilling the order and requests the marketplace to cancel it.

Orders that cannot be canceled

The following situations do not allow order cancellation:

Declining order cancelation

The order flow has a cancellation window (grace period) in which the customer can automatically cancel the order. Except for that period, the seller can decline an order cancellation request, regardless of whether the customer or the marketplace initiated it.

For more information, see Order canceling improvements.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:

ProductCategoryResource
OMSOMS accessCancel order

You can create a custom role with that resource or use one of the following predefined roles:

RoleResource
OMS - Full accessCancel order
IntegrationProfile - Fulfillment OmsCancel order

❗ Assigning a predefined role to users or application keys usually grants permission to multiple License Manager resources. If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see Best practices for using application keys.

To learn more about machine authentication at VTEX, see Authentication overview.

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

Path parameters

orderIdstring required
Example:1172452900788-01

ID that identifies the order in the seller.

Headers

Acceptstring required

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

Content-Typestring required

Describes the type of the content being sent.

Request body

reasonstring

Reason for cancelling the order.

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.