Cancel an order

post

/ccadmin/v1/orders/cancel

Cancels the order with the provided orderId. The order must not be in an "Incomplete" state.

Note: You must specify the payload properties orderId and cancelReason

Example cancel reasons:
  • badProductReview
  • betterCompetitorPrice
  • cannotProcessOrder
  • changeOfMind
  • itemAvailableAtDiscountCurrently
  • noLongerNeeded
  • noUpdateOnShipmentStatus
  • paymentNotReceived

See Merchant Settings Get Cancel Reasons for list of cancel reasons.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : cancelOrder_request
Type: object
Show Source
Example:
{
    "orderId":"o30413",
    "cancelReason":"badProductReview"
}
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : cancelOrder_response
Type: object
Show Source
Example Response (application/json)
{
    "result":"success"
}

Default Response

The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
Error CodeDescriptionPossible Fix
200126Invalid Input.The request payload has an error in it e.g. spelling mistake
200101Order is not in a state that can be cancelled.
200218Invalid cancel reason.Supply a valid cancel reason.
210105Order not found.Supply a valid order ID.

The error response:
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top