Cancel order

Cancels order

Request
header Parameters
required
object

x-site-context value

Request Body schema: application/json
orderId
required
string
reasonCode
required
string

Set to all line items and header audits logs

subReasonCode
string

Set to all line items and header audits logs

source
string

Determine where the request is initialize

employeeId
number

Determine who initiate the request

note
string

Use to add notes

policyCode
string

Set policy code

object

Set attributes to header level audit log's attribute object

Array of objects

Set when doing line item level cancellation other set to null or empty

Responses
200

Order cancelled

400

Bad request

404

Not found

500

Internal server error

post/order/cancel
Request samples
application/json
{
  • "orderId": "62f3982438bcab1951be0a19",
  • "reasonCode": "wrong item",
  • "subReasonCode": "Ordered item doesn't match",
  • "source": "string",
  • "employeeId": "AD5069",
  • "note": "Wrong item is sent to customer",
  • "policyCode": "Cancel",
  • "attributes": {
    },
  • "items": [
    ]
}
Response samples
application/json
{
  • "version": 0,
  • "orderId": "5349b4ddd2781d08c09890f4",
  • "orderNumber": "309019176",
  • "orderDate": "2022-05-12T09:30:31.198Z",
  • "cancellationDate": "2022-05-12T09:30:31.198Z",
  • "allocationDate": "2022-05-12T09:30:31.198Z",
  • "channelId": "12",
  • "cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
  • "type": "WEB",
  • "subType": "International",
  • "processName": "CANCEL",
  • "employeeId": "43278",
  • "retail": {
    },
  • "orderSubTotal": 123.45,
  • "originalSubTotal": 113.45,
  • "orderDiscount": 1.23,
  • "originalDiscounts": 1.45,
  • "feeTotal": 12.34,
  • "originalFeeTotal": 12.34,
  • "taxTotal": 12.34,
  • "appeasementTotal": 12.34,
  • "originalTaxTotal": 12.34,
  • "returnTotal": 12.34,
  • "cancelTotal": 12.34,
  • "invoiceTotal": 12.34,
  • "orderTotal": 146.9,
  • "originalOrderTotal": 146.9,
  • "currency": "USD",
  • "statusCode": "ORDER_CREATED",
  • "statusDescription": "Order Created",
  • "attributes": {
    },
  • "fees": [
    ],
  • "appeasements": [
    ],
  • "discounts": [
    ],
  • "customer": {
    },
  • "payments": [
    ],
  • "items": [
    ],
  • "shipInfo": [
    ],
  • "auditLogs": [
    ],
  • "notes": [
    ],
  • "orderReleaseTimestamp": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}