POST v1/Orders/{siteId}/{orderId}/Cancel

Cancels an order after CTT (Post).

URI template

v1/Orders/{siteId}/{orderId}/Cancel

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

The site where the customer placed the order

integer

Required

orderId

The order id generated after the POST call

integer

Required

Body Parameters

The customer id and whether to send an email

InCancelOrderCustomerInfo
NameDescriptionTypeAdditional information
CustomerId

globally unique identifier

None.

SendEmail

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerId": "b705d169-8035-49fc-83ef-3a74a7dd05a0",
  "SendEmail": true
}

application/xml, text/xml

Sample:
<InCancelOrderCustomerInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <CustomerId>b705d169-8035-49fc-83ef-3a74a7dd05a0</CustomerId>
  <SendEmail>true</SendEmail>
</InCancelOrderCustomerInfo>

Response Information

Resource Description

HTTP status 200 for successful request otherwise error response with detailed information. Known internal errors are BadRequest, NotFound, OrderIdInvalid, CustomerIdInvalid, OrderPreviouslyCancelled, GiftCardCancellationAttempt, ErrorSendingEmail, OrderStatusInvalid, Error

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.