Create customer order for WFS item
Call this endpoint to create a Walmart Fulfillment Services (WFS) fulfilled customer order for your Walmart Multichannel Solution (MCS) channels. This API is available only to sellers onboarded to MCS.
The Walmart Multichannel Solution is an extension of Walmart Fulfillment Services (WFS), uniquely placed to ensure quality, scale, and efficiency for a seller to grow a successful business. Walmart centralizes and manages the entire assortment of inventory, supply chain management, and fulfillment capabilities. At the same time, you can list and sell your items on multiple online platforms and storefronts. WFS picks, packs, and ships the item(s) to the customer on the your behalf when a customer places an order on Walmart.com. WFS also handles all customer support and returns for these orders.
This page describes an example using only the required parameters and inputs to create a WFS fulfilled customer order. For a full list of customization options and additional capabilities, refer to the Marketplace WFS Multichannel solutions API Reference.
The WFS Inventory API is a prerequisite for using this create customer order for WFS API. It ensures you have accurate, real-time inventory data before placing or managing orders. For more information, review the WFS API Guide (New) and WFS Inventory API Reference (New). |
Endpoint
POST https://marketplace.walmartapis.com/v3/fulfillment/orders-fulfillments
Sample request
Use this sample request to create a WFS fulfilled order for your Walmart MCS channel. Before sending, verify you’re onboarded to Walmart Multichannel Solution (MCS) and confirm each SKU’s available-to-sell (ATS) using the WFS Inventory API.
curl --location --request POST 'https://marketplace.walmartapis.com/v3/fulfillment/orders-fulfillments' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'WM_SEC.ACCESS_TOKEN: <access_token>' \ --header 'WM_QOS.CORRELATION_ID: <uuid>' \ --header 'WM_SVC.NAME: Walmart Marketplace' \ --data '{ "header": { "headerAttributes": { "buId": "0", "martId": "202" } }, "payload": { "customer": { "contact": { "name": { "firstName": "First name of the customer", "lastName": "Last name of the customer" }, "phone": "+1-555-0101", "email": "[email protected]" } }, "orderChannelId": "Enter the orderChannelId", "customerOrderNo": "A unique alphanumeric identifier for the customer order.", "orderPlacedTime": "Enter the order placed time. Format: '2022-03-25T21:58:30.143Z'.", "orderItems": [ { "sellerLineId": "1, increment for the next line.", "shippingMethod": "EXPEDITED", "itemDetail": { "sku": "The SKU (Stock Keeping Unit) of the item." }, "qty": { "unitOfMeasure": "EACH", "measurementValue": 2 }, "shippingTo": { "contact": { "name": { "firstName": "Enter delivery information: first name", "lastName": "Enter delivery information: last name" }, "phone": "Phone number for delivery contact", "email": "Email address of the delivery contact" }, "address": { "line1": "Delivery address line1", "line2": "Delivery address line2", "city": "Delivery city", "state": "Delivery state", "country": "US", "zip": "Delivery zip code", "addressType": "RESIDENTIAL" } } } ] }
}'
import requests url = "<url>" headers = { "Content-Type": "application/json", "WM_SEC.ACCESS_TOKEN": "<access_token>", "WM_QOS.CORRELATION_ID": "<uuid>", "WM_SVC.NAME": "Walmart Marketplace",
} json_data = { "header": { "headerAttributes": { "buId": "0", "martId": "202" } }, "payload": { "customer": { "contact": { "name": { "firstName": "First name of the customer", "lastName": "Last name of the customer" }, "phone": "+1-555-0101", "email": "[email protected]" } }, "orderChannelId": "Enter the orderChannelId", "customerOrderNo": "A unique alphanumeric identifier for the customer order.", "orderPlacedTime": "Enter the order placed time. Format: '2022-03-25T21:58:30.143Z'.", "orderItems": [ { "sellerLineId": "1, increment for the next line.", "shippingMethod": "EXPEDITED", "itemDetail": { "sku": "The SKU (Stock Keeping Unit) of the item." }, "qty": { "unitOfMeasure": "EACH", "measurementValue": 2 }, "shippingTo": { "contact": { "name": { "firstName": "Enter delivery information: first name", "lastName": "Enter delivery information: last name" }, "phone": "Phone number for delivery contact", "email": "Email address of the delivery contact" }, "address": { "line1": "Delivery address line1", "line2": "Delivery address line2", "city": "Delivery city", "state": "Delivery state", "country": "US", "zip": "Delivery zip code", "addressType": "RESIDENTIAL" } } } ] }
} response = requests.post(url, headers=headers, json=json_data)
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. - Use your assigned
orderChannelId
and a uniquecustomerOrderNo
. - Replace
sku_item
with the item's actual SKU. Ensure that the WFS SKU has ATS > 0.
Sample response
Sample response returned when the order is successfully created.
{ "status": "ACCEPTED", "header": { "headerAttributes": { "buId": "0", "martId": "202" } }, "payload": { "requestId": "594ef12e-0d0f-402d-aab9-3f7ca06b0ed8" }
}
Sample response returned when an incorrect OrderchannelId
is passed.
{ “status”: “FAIL”, “errors”: [ { “code”: “ERR_EXT_DATA_0021001", “description”: “The payload structure is not valid. Please correct the payload.“, “info”: “[Error [code=400.WSAAS.106, field=orderChannelId, description=orderChannelId is invalid, info=orderChannelId is invalid, severity=ERROR, category=DATA, causes=null]]“, “severity”: “ERROR”, “category”: “REQUEST” } ] }
Result
After successful delivery promise is validated, the order is created and assigned a customerOrderId; inventory is reserved in WFS. WFS initiates pick, pack, and ship; shipment is generated asynchronously and the order appears in the Seller Center.
If the delivery promise check fails, the create customer order API returns an error and no order is created or inventory reserved.
Next steps
Use the get fulfillment order status API to retrieve the latest lifecycle state of a WFS fulfilled multichannel order you created. If you want to cancel a customer fulfillment order, use the cancel customer order API.
Updated 14 days ago