Get an order
Call this endpoint to retrieve detailed information about a specific order. You can view the order's items, customer details, and current status. For example, you might query a single order to troubleshoot a fulfillment issue or confirm specific line item quantities.
Note: This page describes an example using only the required parameters and inputs for getting an order. For a full list of customization options and additional capabilities, refer to the Walmart Orders API Reference.
Endpoint
GET https://marketplace.walmartapis.com/v3/orders/{purchaseOrderId}
Sample request
curl -X GET "https://marketplace.walmartapis.com/v3/orders/ORDER123456" \ -H "Authorization: Basic <Base64EncodedClientID:ClientSecret>" \ -H "WM_SVC.NAME: Walmart Marketplace" \ -H "WM_QOS.CORRELATION_ID: 1234567890" \ -H "Accept: application/json" \ -H "Content-Type: application/json"
import requests url = "https://marketplace.walmartapis.com/v3/orders/ORDER123456" headers = { "Authorization": "Basic <Base64EncodedClientID:ClientSecret>", "WM_SVC.NAME": "Walmart Marketplace", "WM_QOS.CORRELATION_ID": "1234567890", "Accept": "application/json", "Content-Type": "application/json"
} response = requests.get(url, headers=headers)
print(response.json())
Modify your code
- Replace
ORDER123456
with the purchase order ID you want to retrieve. - Replace
<Base64EncodedClientID:ClientSecret>
with your Base64-encoded client credentials. - Update
WM_QOS.CORRELATION_ID
with a unique value for your request tracking.
Sample response
{ "order": { "purchaseOrderId": "0123456789", "customerOrderId": "ABCDEFGHIJ", "customerEmailId": "[email protected]", "orderDate": 1623796407000, "shippingInfo": { "phone": "0123456789", "estimatedDeliveryDate": 1624647600000, "estimatedShipDate": 1623906000000, "methodCode": "Value", "postalAddress": { "name": "John Doe", "address1": "1234 Example St", "city": "Example City", "state": "EX", "postalCode": "12345", "country": "USA", "addressType": "RESIDENTIAL" } }, "orderLines": { "orderLine": [ { "lineNumber": "1", "item": { "productName": "Example Product", "sku": "SKU0123456" }, "charges": { "charge": [ { "chargeType": "PRODUCT", "chargeName": "ItemPrice", "chargeAmount": { "currency": "USD", "amount": 5 }, "tax": { "taxName": "Tax1", "taxAmount": { "currency": "USD", "amount": 0.34 } } } ] }, "orderLineQuantity": { "unitOfMeasurement": "EACH", "amount": "1" }, "statusDate": 1623835855623, "orderLineStatuses": { "orderLineStatus": [ { "status": "Shipped", "statusQuantity": { "unitOfMeasurement": "EACH", "amount": "1" }, "trackingInfo": { "shipDateTime": 1623835855000, "carrierName": { "carrier": "USPS" }, "methodCode": "Value", "trackingNumber": "TRACK1234567890", "trackingURL": "https://www.walmart.com/tracking?tracking_id=TRACK1234567890&order_id=0123456789" } } ] }, "fulfillment": { "fulfillmentOption": "S2H", "shipMethod": "VALUE", "pickUpDateTime": 1624647600000 } } ] }, "shipNode": { "type": "SellerFulfilled" } }
}
Result
If successful, the API returns an HTTP status: 200 OK
and a JSON object containing the order details.
Updated 1 day ago