CancelItems cancels items in an order.
You call thisScope not enforced
POST
/v2/storefront/orders/cancel
const url = 'https://api.zentail.com/v2/storefront/orders/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"channelOrderId":"example","cancelQuantities":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.zentail.com/v2/storefront/orders/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "channelOrderId": "example", "cancelQuantities": { "additionalProperty": "example" } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”CancelItemsRequest is the request to cancel items in an order.
Media typeapplication/json
CancelItemsRequest is the request to cancel items in an order.
object
channelOrderId
The order ID used by your channel when creating the order
string
cancelQuantities
A map of line item IDs to quantities to cancel
object
key
additional properties
string format: int64
Examplegenerated
{ "channelOrderId": "example", "cancelQuantities": { "additionalProperty": "example" }}Responses
Section titled “ Responses ”A successful response.
Media typeapplication/json
CancelItemsResponse is the response to a CancelItems request.
object
Examplegenerated
{}default
Section titled “default”An unexpected error response.
Media typeapplication/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}