Cancel an inbound order

Call this endpoint to cancel an inbound order (IO) before any of the shipments in the order arrive at a Walmart Fulfillment Services (WFS) center. Cancellation is at the order level only, individual shipments in an inbound order cannot be cancelled separately. Cancelling the inbound order cancels all of its shipments.

You cannot cancel a Shipment if its status is "Receiving in progress," "Closed," or "Canceled. " To verify the status, use the GET Inbound Shipments API.

This page describes an example using only the required parameters and inputs for cancelling an inbound order. For a full list of customization options and additional capabilities, refer to the Walmart WFS API Reference.

Endpoint

 DELETE https://marketplace.walmartapis.com/v3/fulfillment/inbound-shipments/{inboundOrderId}

Sample request

This sample request cancel the inbound order for the specify the Order ID inboundOrderId as a URL path parameter.

curl --request DELETE \ --url '--url https://marketplace.walmartapis.com/v3/fulfillment/inbound- shipments/inboundOrderId \' --header 'WM_QOS.CORRELATION_ID: <uuid>' \ --header 'WM_SEC.ACCESS_TOKEN: <access_token>' \ --header 'WM_SVC.NAME: Walmart Service Name' \ --header 'accept: application/json'
import requests url = "https://marketplace.walmartapis.com/v3/fulfillment/inbound-shipments/inboundOrderId" headers = { "WM_QOS.CORRELATION_ID": "<uuid>", "WM_SEC.ACCESS_TOKEN": "<access_token>", "WM_SVC.NAME": "Walmart Service Name", "Accept": "application/json",
} response = requests.delete(url, headers=headers)
print(response.status_code)
print(response.text)

Modify your code

  • Use a unique WM_QOS.CORRELATION_ID for each request.
  • Replace WM_SEC.ACCESS_TOKEN with your valid access token obtained through authentication.
  • Provide the inbound order ID that you want to cancel as the inboundOrderId path parameter.

Sample response

Upon success, this API returns an OK status response.

HTTP/1.1 200 OK Content-Length: xxx Content-Type: application/json; charset=utf-8 { "status": "OK" }

If the request to cancel an inbound order fails, the API response returns an error code and description of the error.

HTTP/1.1 400 BAD REQUEST Content-Length: xxx Content-Type: application/json; charset=utf-8 { "status": "FAIL", "errors": [ { "code": "400.INBOUND_SHIPMENTS.100", "field": "inboundOrderId", "description": "inboundOrderId cannot be null or empty", "severity": "ERROR", "category": "REQUEST", "errorIdentifiers": {} } ] }

Result

On success this API returns a 200 OK response to acknowledge the cancellation.