The Order Cancellation event contains items that have been cancelled from an order.

Radial supports two different ways to receive event messages from this API and other event-based APIs.

  • If you use the queue-based implementation with AMQP, each event is sent in its own OrderCancelled message. These events can be sent in XML or JSON.

  • If you use the webhooks-based implementation, a set of events is grouped together in an OrderCancelledList message. These list events can be sent in XML or JSON.

Queue name: q.Order.Cancellation.<StoreCode>.2-0

XML Schemas:

Cancel Reason Codes

  • CancelCustomerInitiated
  • CancelGeneric
  • CreditFailure
  • CustomerRequested
  • FraudLikely
  • InvalidBillingAddress
  • ZeroCostReship
  • CancelInventoryDiscrepancy
  • CancelMXCustomerAbandon
  • FTCCancel
  • InvalidShippingAddress
  • CancelCredit
  • LastShipmentCancel
  • PromotionError
  • CancelDuplicateOrder
  • CancelMXOutOfStock
  • CancelMXPickDecline
  • CancelMXCustomerAbandon
  • CancelMXCreditCustomerRefusal
  • CancelMXStoreInactivity
  • STSProductReceivedDamagedExterior
  • STSPackageNotReceived
  • STSProductReceivedDamagedInterior
  • STSWrongProductReceived
  • STSProductNotReceived

XPath: /OrderCancelled/OrderCancelReason

Example: <OrderCancelReason cancelReasonCode="EP">CancelCustomerInitiated</OrderCancelReason>

OrderCancelled Message

For queue-based implementations, a new OrderCancelled message is generated for each new event.

Single-Event Message Examples

Click any heading below to view the example message.

OrderCancelledList Message

For Webhooks-based implementations, Order Cancelled events are grouped together in one OrderCancelledList message.

Event List Message Example

Click the heading below to view the example message file.

Example: JSON Format

Note: If you want to use the JSON format, contact your Radial representative for the XML to JSON mappings.

Copy
{
    "xmlns": "http://api.gsicommerce.com/schema/checkout/1.0",
    "customerOrderId": "0002650306075353",
    "storeId": "TMSUS",
    "locale": "en_US",
    "orderDate": "2024-04-17T12:18:39.000Z",
    "currencySymbol": "$",
    "currency": "USD",
    "customer": {
        "name": {
            "lastName": "Jones",
            "firstName": "Indiana"
        },
        "emailAddress": "TESTFRAUD@radial.com",
        "loyaltyPrograms": [
            {
                "account": null,
                "program": null
            }
        ],
        "customerId": "null9241673396"
    },
    "orderCancelReason": {
        "value": "CancelInventoryDiscrepancy",
        "cancelReasonCode": "ID"
    },
    "billingAddress": {
        "personName": {
            "lastName": "Jones",
            "firstName": "Indiana"
        },
        "address": {
            "line1": "630 Allendale Road",
            "city": "King of Prussia",
            "mainDivision": "PA",
            "countryCode": "US",
            "postalCode": "19406"
        },
        "phoneNumber": "6102223333",
        "emailAddress": "TESTFRAUD@radial.com"
    },
    "shippingAddress": {
        "personName": {
            "lastName": "Jones",
            "firstName": "Indiana"
        },
        "address": {
            "line1": "630 Allendale Road",
            "city": "King of Prussia",
            "mainDivision": "PA",
            "countryCode": "US",
            "postalCode": "19406"
        },
        "phoneNumber": "6102223333",
        "emailAddress": "TESTFRAUD@radial.com"
    },
    "cancelledOrderItems": [
        {
            "webLineId": "2",
            "itemId": "21-ISPUProd02",
            "quantity": "1",
            "id": "ID_1002",
            "isBundleParent": false,
            "description": {
                "description": "Black Tennis Shoes",
                "sku": "21252052",
                "upc": "0360123652011",
                "globalId": "21252052",
                "title": "Black Tennis Shoes",
                "color": {
                    "content": "Brown",
                    "id": "700"
                },
                "size": {
                    "content": "6-M",
                    "id": "6-M"
                },
                "styleNumber": "84529",
                "vendorPartNumber": ""
            },
            "pricing": {
                "amount": "114.00",
                "unitPrice": "114.00"
            },
            "shipping": {
                "shippedAddress": {
                    "personName": {
                        "lastName": "Jones",
                        "firstName": "Indiana"
                    },
                    "address": {
                        "line1": "630 Allendale Road",
                        "city": "King of Prussia",
                        "mainDivision": "PA",
                        "countryCode": "US",
                        "postalCode": "19406"
                    },
                    "phoneNumber": "6102223333",
                    "emailAddress": "TESTFRAUD@radial.com"
                }
            },
            "fulfillmentMethod": "SHIP_TO_HOME",
            "additionalValues": [
                {
                    "key": "PVAR_DESC_COLOR",
                    "value": "Brown"
                },
                {
                    "key": "requestLineId",
                    "value": "item_2"
                },
                {
                    "key": "CancelReasonCode|",
                    "value": "ID"
                },
                {
                    "key": "CancelReasonText|",
                    "value": "CancelInventoryDiscrepancy"
                }
            ]
        }
    ],
    "orderCancelledPayments": [
        {
            "paymentDescription": "VC",
            "paymentTenderType": "CreditCard",
            "paymentMaskedAccount": "***********1111",
            "paymentAmount": "114.00",
            "expirationDate": "2024-09"
        }
    ],
    "orderSummary": {
        "totalAmount": "114.00",
        "salesTaxAmount": "0.00",
        "giftWrapAmount": "0.00",
        "subTotalAmount": "114.00",
        "shippingAmount": "0.00",
        "dutyAmount": "0.00",
        "feesAmount": "0.00",
        "discountAmount": "0.00"
    },
    "additionalValues": [
        {
            "key": "ReferenceTransactionId",
            "value": "ref123456789"
        },
        {
            "key": "MAJOR_ORDER_GRP_ATTR",
            "value": "shipgroup_1"
        },
        {
            "key": "eventTimestamp",
            "value": "2024-04-17T13:22:16.016Z"
        }
    ]
}