Cancel an order

post

/ccstore/v1/orders/cancel

Cancels the order with the provided orderId and returns the updated order along with its updated ID. 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
Nested Schema : model_order
Type: object
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data.
Show Source
Nested Schema : giftWithPurchaseInfo
Type: array
The gift information.
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
giftWithPurchaseOrderMarker information.
Show Source
Nested Schema : payments
Type: array
Payment details for the order, including additional properties specific to the payment type.
Show Source
Nested Schema : priceListGroup
Type: object
The price list group object.
Show Source
Nested Schema : shippingGroups
Type: object
The shipping groups in the order.
Show Source
Nested Schema : shippingMethod
Type: object
Shipping Method information of the order.
Show Source
Nested Schema : shoppingCart
Type: object
Shopping cart information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : currency
Type: object
The currency object.
Show Source
Nested Schema : shippingSurchargePriceList
Type: object
Shipping Surcharge PriceList object.
Show Source
Nested Schema : discountInfo
Type: object
Discount Information
Show Source
Nested Schema : items
Type: array
The array of products in the shipping group.
Show Source
Nested Schema : priceInfo
Type: object
Price information of the order.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : discountDescList
Type: array
The list of all the order discounts.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
Implicit Promotions for the order
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childSkus
Type: array
An array with single primary image url for this item's sku, or its default image.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : giftWithPurchaseCommerceItemMarkers
Type: array
giftWithPurchaseCommerceItemMarker information.
Show Source
Nested Schema : itemDiscountInfos
Type: array
Item discount infos
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCodes
Type: array
Coupon codes applied to the items
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "result":"success",
    "order":{
        "creationTime":1.511782097E12,
        "sourceSystem":"Cloud Commerce",
        "dynamicProperties":[
        ],
        "payments":[
            {
                "transactionTypeInitiated":"void",
                "amount":43.19,
                "gatewayName":"CS-A",
                "cardType":null,
                "type":"CyberSource",
                "IIN":null,
                "paymentGroupId":"pg30416",
                "customPaymentProperties":{
                },
                "uiIntervention":"sop",
                "paymentMethod":"tokenizedCreditCard",
                "isAmountRemaining":false,
                "paymentState":"AUTHORIZED",
                "cardNumber":"xxxxxxxxxxxx1111"
            }
        ],
        "orderStatus":"Removed",
        "submittedDate":"2017-11-27T11:29:31.000Z",
        "uuid":"d80dd2b7-f789-4c83-b9b2-2412b854df1a",
        "organizationId":null,
        "priceInfo":{
            "amount":14.99,
            "total":43.19,
            "shipping":25,
            "shippingSurchargeValue":0,
            "tax":3.2,
            "subTotal":14.99,
            "currencyCode":"USD",
            "totalWithoutTax":39.99
        },
        "id":"o30413",
        "state":"REMOVED",
        "trackingNumber":null,
        "order":{
            "numberOfItems":1,
            "items":[
                {
                    "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v6155711626513500309/products/doctordolittle_LARGE.jpg&height=100&width=100",
                    "rawTotalPrice":14.99,
                    "displayName":"Dr. Dolittle",
                    "dynamicProperties":[
                    ],
                    "shippingSurchargeValue":0,
                    "availabilityDate":null,
                    "discountAmount":0,
                    "externalData":[
                    ],
                    "preOrderQuantity":0,
                    "commerceItemId":"ci3000414",
                    "price":14.99,
                    "variant":[
                    ],
                    "primaryImageAltText":"Dr. Dolittle",
                    "id":"ci3000415",
                    "unitPrice":14.99,
                    "primaryImageTitle":"Dr. Dolittle",
                    "childSKUs":[
                        {
                            "primaryThumbImageURL":null
                        }
                    ],
                    "amount":14.99,
                    "quantity":1,
                    "productId":"Product_18Cxi",
                    "salePrice":0,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":14.99,
                            "quantity":1,
                            "tax":1.2,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":14.99,
                            "currencyCode":"USD"
                        }
                    ],
                    "giftWithPurchaseCommerceItemMarkers":[
                    ],
                    "active":true,
                    "originalCommerceItemId":null,
                    "catRefId":"Sku_18Dxi",
                    "skuProperties":[
                        {
                            "propertyType":"sku-base",
                            "name":"Not Returnable",
                            "id":"nonreturnable",
                            "value":false
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Name",
                            "id":"displayName",
                            "value":null
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Active",
                            "id":"active",
                            "value":true
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Id",
                            "id":"id",
                            "value":"Sku_18Dxi"
                        }
                    ],
                    "discountInfo":[
                    ],
                    "route":"/dr-dolittle/product/Product_18Cxi",
                    "siteId":"siteUS",
                    "backOrderQuantity":0,
                    "listPrice":14.99
                }
            ]
        },
        "taxPriceInfo":{
            "cityTax":0,
            "secondaryCurrencyTaxAmount":0,
            "amount":3.2,
            "valueAddedTax":0,
            "countyTax":1.6,
            "isTaxIncluded":false,
            "miscTax":0,
            "districtTax":0,
            "stateTax":1.6,
            "countryTax":0
        },
        "shippingGroup":{
            "shippingMethodDescription":"Standard"
        },
        "shippingGroups":[
            {
                "taxPriceInfo":{
                    "cityTax":0,
                    "amount":3.2,
                    "valueAddedTax":0,
                    "countyTax":1.6,
                    "isTaxIncluded":false,
                    "miscTax":0,
                    "districtTax":0,
                    "stateTax":1.6,
                    "countryTax":0
                },
                "shippingMethod":{
                    "secondaryCurrencyTaxAmount":0,
                    "shippingTax":2,
                    "cost":25,
                    "taxCode":"",
                    "value":"standardShippingMethod",
                    "shippingMethodDescription":"Standard"
                },
                "shippingGroupId":"sg40415",
                "submittedDate":null,
                "priceInfo":{
                    "amount":14.99,
                    "total":43.19,
                    "lkpValExcludingFreeShip":null,
                    "shipping":25,
                    "shippingSurchargeValue":0,
                    "tax":3.2,
                    "subTotal":14.99,
                    "currencyCode":"USD",
                    "totalWithoutTax":39.99
                },
                "discountInfo":{
                    "orderDiscount":0,
                    "shippingDiscount":0,
                    "discountDescList":[
                    ]
                },
                "recurringChargePriceInfo":null,
                "shipOnDate":null,
                "trackingInfo":[
                ],
                "actualShipDate":null,
                "shippingAddress":{
                    "lastName":"Anderson",
                    "country":"US",
                    "address3":null,
                    "address2":null,
                    "city":"Syracuse",
                    "prefix":null,
                    "address1":"21 Cedar Ave",
                    "postalCode":"13202",
                    "companyName":null,
                    "jobTitle":null,
                    "county":null,
                    "suffix":null,
                    "firstName":"Kim",
                    "phoneNumber":"212-555-1977",
                    "faxNumber":null,
                    "alias":"Home",
                    "middleName":null,
                    "state":"NY",
                    "email":"kim@example.com"
                },
                "items":[
                    {
                        "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v6155711626513500309/products/doctordolittle_LARGE.jpg&height=100&width=100",
                        "rawTotalPrice":14.99,
                        "returnedQuantity":0,
                        "dynamicProperties":[
                        ],
                        "displayName":"Dr. Dolittle",
                        "shippingSurchargeValue":0,
                        "availabilityDate":null,
                        "externalData":[
                        ],
                        "discountAmount":0,
                        "preOrderQuantity":0,
                        "commerceItemId":"ci3000414",
                        "price":14.99,
                        "variant":[
                        ],
                        "onSale":false,
                        "primaryImageAltText":"Dr. Dolittle",
                        "stateDetailsAsUser":"The item has been removed from the shipping group",
                        "commerceId":"ci3000415",
                        "unitPrice":14.99,
                        "primaryImageTitle":"Dr. Dolittle",
                        "amount":14.99,
                        "quantity":1,
                        "pointOfNoRevision":false,
                        "relationshipType":"SHIPPINGQUANTITY",
                        "productId":"Product_18Cxi",
                        "salePrice":0,
                        "detailedItemPriceInfo":[
                            {
                                "discounted":false,
                                "secondaryCurrencyTaxAmount":0,
                                "amount":14.99,
                                "quantity":1,
                                "tax":1.2,
                                "orderDiscountShare":0,
                                "detailedUnitPrice":14.99,
                                "currencyCode":"USD"
                            }
                        ],
                        "active":true,
                        "catRefId":"Sku_18Dxi",
                        "skuProperties":[
                            {
                                "propertyType":"sku-base",
                                "name":"Not Returnable",
                                "id":"nonreturnable",
                                "value":false
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Name",
                                "id":"displayName",
                                "value":null
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Active",
                                "id":"active",
                                "value":true
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Id",
                                "id":"id",
                                "value":"Sku_18Dxi"
                            }
                        ],
                        "discountInfo":[
                        ],
                        "route":"/dr-dolittle/product/Product_18Cxi",
                        "siteId":"siteUS",
                        "backOrderQuantity":0,
                        "listPrice":14.99,
                        "status":"REMOVED"
                    }
                ],
                "trackingNumber":null,
                "status":"REMOVED"
            }
        ],
        "creationSiteId":"siteUS",
        "lastModifiedDate":"2017-11-27T11:51:58.595Z",
        "approvalSystemMessages":[
        ],
        "shippingMethod":{
            "shippingTax":2,
            "cost":25,
            "value":"standardShippingMethod"
        },
        "priceListGroup":{
            "repositoryId":"defaultPriceGroup"
        },
        "cartName":"Test Name",
        "creationDate":"2017-11-27T11:28:17.000Z",
        "orderProfileId":"se-570031",
        "discountInfo":{
            "unclaimedCouponMultiPromotions":{
            },
            "orderCouponsMap":{
            },
            "orderDiscount":0,
            "shippingDiscount":0,
            "orderImplicitDiscountList":[
            ],
            "unclaimedCouponsMap":{
            },
            "claimedCouponMultiPromotions":{
            }
        },
        "trackingInfo":[
        ],
        "siteId":"siteUS",
        "orderLocale":"en",
        "shippingAddress":{
            "lastName":"Anderson",
            "country":"US",
            "address3":null,
            "address2":null,
            "city":"Syracuse",
            "prefix":null,
            "address1":"21 Cedar Ave",
            "postalCode":"13202",
            "companyName":null,
            "jobTitle":null,
            "county":null,
            "suffix":null,
            "firstName":"Kim",
            "phoneNumber":"212-555-1977",
            "faxNumber":null,
            "alias":"Home",
            "middleName":null,
            "state":"NY",
            "email":"kim@example.com"
        },
        "billingAddress":{
            "lastName":"Anderson",
            "country":"US",
            "address3":null,
            "address2":null,
            "city":"Syracuse",
            "prefix":null,
            "address1":"21 Cedar Ave",
            "postalCode":"13202",
            "companyName":null,
            "jobTitle":null,
            "county":null,
            "suffix":null,
            "firstName":"Kim",
            "phoneNumber":"212-555-1977",
            "faxNumber":null,
            "alias":null,
            "middleName":null,
            "state":"NY",
            "email":"kim@example.com"
        },
        "giftWithPurchaseOrderMarkers":[
        ]
    }
}

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
28107Order does not belong to logged in user.Correct the order ID.
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