Cancel Curbside Order/Shipment

This guide applies to standalone Curbside Delivery implementations. Order Management users integrating Curbside as an additional fulfillment type can use the standard Order and Shipment API calls.

There are two reasons in which a Curbside order or shipment may be canceled – because there was zero inventory available, or because the shopper never picked up the order. In both of those cases, a simple request to the Cancel Order or Cancel Shipment API with the appropriate reason code will perform the cancellation and trigger the appropriate notification email to confirm the cancellation. Whether the Order or Shipment API is used is largely irrelevant, as Curbside does not make a distinction between those objects and “shipment” can be understood as a synonym as “order.”

Either API will cancel the entire order, so only make these calls if no items are going to be fulfilled from the order. If some items are being fulfilled and some are being canceled, see the Validate Stock step of the Curbside Fulfillment guide.

When cancelling a Curbside order or shipment, use the appropriate template outlined here. Ask the Kibo team for additional examples and Postman samples if desired.

Cancel Curbside Order

The request to cancel an order is a PUT call made to the following endpoint:

Call AttributeDescription
Endpointhttps://t{tenantId}.{host}/api/commerce/orders/cancel/{orderId}
Supported FormatsJSON
HTTP MethodPUT

There is only one parameter that needs to be included in the request body:

ParameterTypeDescription
ReasonCodestringThe explanation as to why the order is being canceled, either due to zero inventory or the customer never picking up the order.

If the order is canceled because of complete lack of inventory, the reason code would be:

{ 
    "ReasonCode": "NoInventory" 
}

If the customer never arrived to pick up the order within the allowed time, or arrived and then rejected the order when the store associate attempted to deliver it, the reason code would be:

{ 
    "ReasonCode": "PurchaseNeverPickedUp" 
}

Regardless of the reason used, the same response can be expected. If cancellation was successful, the API will return a 200 OK response code.

Cancel Curbside Shipment

The request to cancel a shipment is a PUT call made to the following endpoint:

Call AttributeDescription
Endpointhttps://t{tenantId}.{host}/api/commerce/shipments/{shipmentNumber}/canceled
Supported FormatsJSON
HTTP MethodPUT

The request body contains a canceledReason object that supports the following two parameters:

ParameterTypeDescription
reasonCodestringThe explanation as to why the order is being canceled, either due to zero inventory or the customer never picking up the order. This supports the same values as the Cancel Order use case shown above; “NoInventory” and “PurchaseNeverPickedUp”
moreInfostringAn optional field that can be used to provide further explanation about the cancellation.

The following example would cancel an order due to lack of available inventory. As with Cancel Order, the reason code could be replaced with “PurchaseNeverPickedUp” if the shipment is canceled due to the customer either rejecting the delivery or never showing up.

{
  "canceledReason": {
    "reasonCode": "NoInventory",
    "moreInfo": ""
  }
}

Regardless of the reason used, the same response can be expected. If cancellation was successful, the API will return a 200 OK response code.