Validate order fulfillment in dynamic sandbox
Use this recipe to simulate the end-to-end order fulfillment workflow in the Marketplace sandbox.
This recipe walks through creating a test SKU and fulfillment center, adding inventory, generating a test order, processing the order through the fulfillment lifecycle, and verifying that the order reaches the DELIVERED status.
Workflow
This workflow validates the complete order fulfillment lifecycle, from inventory setup through order delivery.
Before you begin
To complete this recipe, you need Marketplace sandbox API credentials and access to the Marketplace sandbox environment. Use your sandbox credentials to generate an OAuth access token before calling the APIs in this workflow.
For more information about sandbox setup and authentication, refer to the Walmart sandbox guide.
Step 1: Authenticate
Generate an OAuth access token to authorize Marketplace sandbox API requests.
Endpoint
Requirements
- You must have valid Marketplace sandbox API credentials.
- The access token must be active when you call each API in this workflow.
Sample request
This sample request uses your Marketplace sandbox client credentials to generate an OAuth access token for subsequent API calls.
curl --location 'https://sandbox.walmartapis.com/v3/token' \ --header 'Accept: application/json' \ --header 'Authorization: Basic <base64(clientId:clientSecret)>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'WM_MARKET: us' \ --header 'WM_QOS.CORRELATION_ID: <correlation_id>' \ --header 'WM_SVC.NAME: MP' \ --data-urlencode 'grant_type=client_credentials'import base64
import requests client_id = "clientId"
client_secret = "clientSecret" credentials = base64.b64encode(f"{client_id}:{client_secret}".encode()).decode() url = "https://sandbox.walmartapis.com/v3/token" headers = { "Accept": "application/json", "Authorization": f"Basic {credentials}", "Content-Type": "application/x-www-form-urlencoded", "WM_MARKET": "us", "WM_QOS.CORRELATION_ID": "<correlation_id>", "WM_SVC.NAME": "MP",
} data = { "grant_type": "client_credentials"
} response = requests.post(url, headers=headers, data=data)
response.raise_for_status() print(response.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.util.Base64; public class TokenRequest { public static void main(String[] args) throws Exception { String clientId = "clientId"; String clientSecret = "clientSecret"; String credentials = Base64.getEncoder().encodeToString( (clientId + ":" + clientSecret).getBytes(StandardCharsets.UTF_8) ); String formBody = "grant_type=client_credentials"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/token")) .header("Accept", "application/json") .header("Authorization", "Basic " + credentials) .header("Content-Type", "application/x-www-form-urlencoded") .header("WM_MARKET", "us") .header("WM_QOS.CORRELATION_ID", "<correlation_id>") .header("WM_SVC.NAME", "MP") .POST(HttpRequest.BodyPublishers.ofString(formBody)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The API returns an access token.
- Use the access token in subsequent API requests in this recipe.
Step 2: Create a test SKU
Create a test SKU that will be used throughout this recipe.
Endpoint
Requirements
- The SKU must be unique.
Sample request
This sample request creates a test SKU in the Marketplace sandbox that can be used to simulate inventory and order management workflows.
curl --location 'https://sandbox.walmartapis.com/v1/simulations/items' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_SANDBOX: v2' \ --data '{ "items": [ { "sku": "TestSKU01", "productName": "Test SKU 01", "productType": "Baby Carriers", "condition": "NEW", "price": { "amount": 100, "currency": "USD" } } ] }'import requests url = "https://sandbox.walmartapis.com/v1/simulations/items" headers = { "Accept": "application/json", "Content-Type": "application/json", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_SANDBOX": "v2",
} payload = { "items": [ { "sku": "TestSKU01", "productName": "Test SKU 01", "productType": "Baby Carriers", "condition": "NEW", "price": { "amount": 100, "currency": "USD", }, } ]
} response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class CreateSimulationItem { public static void main(String[] args) throws Exception { String body = """ { "items": [ { "sku": "TestSKU01", "productName": "Test SKU 01", "productType": "Baby Carriers", "condition": "NEW", "price": { "amount": 100, "currency": "USD" } } ] } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v1/simulations/items")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_SANDBOX", "v2") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The test SKU is created successfully.
Step 3: Create a fulfillment center
Create a fulfillment center that will be used to fulfill the test order.
Endpoint
/v3/settings/shipping/shipnodes
Requirements
- Use a unique fulfillment center identifier.
Sample request
This sample request creates a test fulfillment center in the Marketplace sandbox that can be used for inventory and order fulfillment workflows.
curl --location 'https://sandbox.walmartapis.com/v3/settings/shipping/shipnodes' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'WM_QOS.CORRELATION_ID: test-correlation-id' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SANDBOX: v2' \ --data '{ "shipNodeHeader": { "version": "1.2" }, "shipNode": [ { "shipNodeName": "TestFC01", "status": "ACTIVE", "timeZone": "CST", "distributorSupportedServices": [ "TWO_DAY_DELIVERY" ], "customNodeId": "TestFC01", "postalAddress": { "addressLine1": "1 Customer Drive", "addressLine2": "", "city": "Bentonville", "state": "AR", "country": "USA", "postalCode": "72716" }, "shippingDetails": [ { "twoDayShipping": [ { "carrierMethodName": "FEDEX", "carrierMethodType": "GROUND" } ] } ], "calendarDayConfiguration": { "standardProcessingSchedule": { "sunday": { "isWorkingDay": false }, "monday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "tuesday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "wednesday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "thursday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "friday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "saturday": { "isWorkingDay": true, "cutOffTime": "15:45" } }, "additionalDaysOff": [ "2026-01-24", "2026-02-25" ] } } ] }'import requests url = "https://sandbox.walmartapis.com/v3/settings/shipping/shipnodes" headers = { "Content-Type": "application/json", "Accept": "application/json", "WM_QOS.CORRELATION_ID": "test-correlation-id", "WM_SVC.NAME": "MP", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SANDBOX": "v2",
} payload = { "shipNodeHeader": { "version": "1.2" }, "shipNode": [ { "shipNodeName": "TestFC01", "status": "ACTIVE", "timeZone": "CST", "distributorSupportedServices": ["TWO_DAY_DELIVERY"], "customNodeId": "TestFC01", "postalAddress": { "addressLine1": "1 Customer Drive", "addressLine2": "", "city": "Bentonville", "state": "AR", "country": "USA", "postalCode": "72716" }, "shippingDetails": [ { "twoDayShipping": [ { "carrierMethodName": "FEDEX", "carrierMethodType": "GROUND" } ] } ], "calendarDayConfiguration": { "standardProcessingSchedule": { "sunday": {"isWorkingDay": False}, "monday": {"isWorkingDay": True, "cutOffTime": "11:30"}, "tuesday": {"isWorkingDay": True, "cutOffTime": "11:30"}, "wednesday": {"isWorkingDay": True, "cutOffTime": "11:30"}, "thursday": {"isWorkingDay": True, "cutOffTime": "11:30"}, "friday": {"isWorkingDay": True, "cutOffTime": "11:30"}, "saturday": {"isWorkingDay": True, "cutOffTime": "15:45"} }, "additionalDaysOff": ["2026-01-24", "2026-02-25"] } } ]
} response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class CreateShipNode { public static void main(String[] args) throws Exception { String body = """ { "shipNodeHeader": { "version": "1.2" }, "shipNode": [ { "shipNodeName": "TestFC01", "status": "ACTIVE", "timeZone": "CST", "distributorSupportedServices": ["TWO_DAY_DELIVERY"], "customNodeId": "TestFC01", "postalAddress": { "addressLine1": "1 Customer Drive", "addressLine2": "", "city": "Bentonville", "state": "AR", "country": "USA", "postalCode": "72716" }, "shippingDetails": [ { "twoDayShipping": [ { "carrierMethodName": "FEDEX", "carrierMethodType": "GROUND" } ] } ], "calendarDayConfiguration": { "standardProcessingSchedule": { "sunday": { "isWorkingDay": false }, "monday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "tuesday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "wednesday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "thursday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "friday": { "isWorkingDay": true, "cutOffTime": "11:30" }, "saturday": { "isWorkingDay": true, "cutOffTime": "15:45" } }, "additionalDaysOff": ["2026-01-24", "2026-02-25"] } } ] } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/settings/shipping/shipnodes")) .header("Content-Type", "application/json") .header("Accept", "application/json") .header("WM_QOS.CORRELATION_ID", "test-correlation-id") .header("WM_SVC.NAME", "MP") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SANDBOX", "v2") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The fulfillment center is created successfully.
Step 4: Add inventory
Add inventory to the test SKU at the fulfillment center.
Endpoint
Requirements
- The test SKU must already exist.
- The fulfillment center must already exist.
Sample request
This sample request updates the inventory quantity for a specific SKU at a specific fulfillment center in the Marketplace sandbox.
curl --location --request PUT 'https://sandbox.walmartapis.com/v3/inventories/{{sku}}' \ --header 'Accept: application/json' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SANDBOX: v2' \ --header 'WM_QOS.CORRELATION_ID: test-correlation-id' \ --header 'Content-Type: application/json' \ --data-raw '{ "inventories": { "nodes": [ { "shipNode": "{{shipNode}}", "inputQty": { "unit": "EACH", "amount": 10 } } ] } }'import requests url = "https://sandbox.walmartapis.com/v3/inventories/{{sku}}" headers = { "Accept": "application/json", "WM_SVC.NAME": "MP", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SANDBOX": "v2", "WM_QOS.CORRELATION_ID": "test-correlation-id", "Content-Type": "application/json",
} payload = { "inventories": { "nodes": [ { "shipNode": "{{shipNode}}", "inputQty": { "unit": "EACH", "amount": 10, }, } ] }
} response = requests.put(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class UpdateInventory { public static void main(String[] args) throws Exception { String body = """ { "inventories": { "nodes": [ { "shipNode": "{{shipNode}}", "inputQty": { "unit": "EACH", "amount": 10 } } ] } } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/inventories/{{sku}}")) .header("Accept", "application/json") .header("WM_SVC.NAME", "MP") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SANDBOX", "v2") .header("WM_QOS.CORRELATION_ID", "test-correlation-id") .header("Content-Type", "application/json") .PUT(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- Inventory is added successfully.
- The test SKU is available for ordering.
Step 5: Create a test order
Create a test order using an order quantity less than or equal to the available inventory quantity.
Endpoint
Requirements
- Inventory must already be available for the test SKU.
- The order quantity must be less than or equal to the available inventory quantity.
Sample request
This sample request creates a simulated test order in the Marketplace sandbox using the specified SKU and shipping details.
curl --location --request POST 'https://sandbox.walmartapis.com/v1/simulations/orders' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_SANDBOX: v2' \ --data-raw '{ "customerEmailId": "[email protected]", "shippingInfo": { "phone": "0000000", "postalAddress": { "name": "Test User", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "addressType": "RESIDENTIAL" } }, "orderLines": { "orderLine": [ { "item": { "sku": "{{sku}}" }, "orderLineQuantity": { "unitOfMeasurement": "EACH", "amount": "10" } } ] } }'import requests url = "https://sandbox.walmartapis.com/v1/simulations/orders" headers = { "Accept": "application/json", "Content-Type": "application/json", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_SANDBOX": "v2",
} payload = { "customerEmailId": "[email protected]", "shippingInfo": { "phone": "0000000", "postalAddress": { "name": "Test User", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "addressType": "RESIDENTIAL", }, }, "orderLines": { "orderLine": [ { "item": { "sku": "{{sku}}", }, "orderLineQuantity": { "unitOfMeasurement": "EACH", "amount": "10", }, } ] },
} response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class CreateSimulatedOrder { public static void main(String[] args) throws Exception { String body = """ { "customerEmailId": "[email protected]", "shippingInfo": { "phone": "0000000", "postalAddress": { "name": "Test User", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "addressType": "RESIDENTIAL" } }, "orderLines": { "orderLine": [ { "item": { "sku": "{{sku}}" }, "orderLineQuantity": { "unitOfMeasurement": "EACH", "amount": "10" } } ] } } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v1/simulations/orders")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_SANDBOX", "v2") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- A test order is created successfully.
- The response includes the purchase order ID.
Step 6: Acknowledge the order
Acknowledge the test order before shipping it.
Endpoint
v3/orders/{{purchaseOrderId}}/acknowledge
Requirements
- The test order must already be created.
Sample request
This sample request acknowledges a test order, indicating that it is ready to proceed through the fulfillment workflow.
curl --location --request POST 'https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/acknowledge' \ --header 'Accept: application/json' \ --header 'WM_SANDBOX: v2' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_QOS.CORRELATION_ID: test-correlation-id'import requests url = "https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/acknowledge" headers = { "Accept": "application/json", "WM_SANDBOX": "v2", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_QOS.CORRELATION_ID": "test-correlation-id",
} response = requests.post(url, headers=headers)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class AcknowledgeOrder { public static void main(String[] args) throws Exception { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/acknowledge")) .header("Accept", "application/json") .header("WM_SANDBOX", "v2") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_QOS.CORRELATION_ID", "test-correlation-id") .POST(HttpRequest.BodyPublishers.noBody()) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The order is acknowledged successfully.
- The order is ready to be shipped.
Step 7: Ship the order
Ship the test order.
Endpoint
/v3/orders/{{purchaseOrderId}}/shipping
Requirements
- The order must already be acknowledged.
- The shipment quantity must match the order quantity.
Sample request
This sample request submits shipment information for a test order, updating the order status to Shipped and providing carrier and tracking details.
curl --location --request POST 'https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/shipping' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'WM_SANDBOX: v2' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_QOS.CORRELATION_ID: test-correlation-id' \ --data-raw '{ "orderShipment": { "orderLines": { "orderLine": [ { "lineNumber": "1", "intentToCancelOverride": false, "sellerOrderId": "123", "orderLineStatuses": { "orderLineStatus": [ { "status": "Shipped", "statusQuantity": { "unitOfMeasurement": "EACH", "amount": "10" }, "trackingInfo": { "shipDateTime": 1780697848000, "carrierName": { "carrier": "UPS" }, "methodCode": "Standard", "trackingNumber": "22344", "trackingURL": "http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345" }, "returnCenterAddress": { "name": "walmart", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "dayPhone": "12344", "emailId": "[email protected]" } } ] } } ] } } }'import requests url = "https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/shipping" headers = { "Accept": "application/json", "Content-Type": "application/json", "WM_SANDBOX": "v2", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_QOS.CORRELATION_ID": "test-correlation-id",
} payload = { "orderShipment": { "orderLines": { "orderLine": [ { "lineNumber": "1", "intentToCancelOverride": False, "sellerOrderId": "123", "orderLineStatuses": { "orderLineStatus": [ { "status": "Shipped", "statusQuantity": { "unitOfMeasurement": "EACH", "amount": "10", }, "trackingInfo": { "shipDateTime": 1780697848000, "carrierName": { "carrier": "UPS", }, "methodCode": "Standard", "trackingNumber": "22344", "trackingURL": "http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345", }, "returnCenterAddress": { "name": "walmart", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "dayPhone": "12344", "emailId": "[email protected]", }, } ] }, } ] } }
} response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class ShipOrder { public static void main(String[] args) throws Exception { String body = """ { "orderShipment": { "orderLines": { "orderLine": [ { "lineNumber": "1", "intentToCancelOverride": false, "sellerOrderId": "123", "orderLineStatuses": { "orderLineStatus": [ { "status": "Shipped", "statusQuantity": { "unitOfMeasurement": "EACH", "amount": "10" }, "trackingInfo": { "shipDateTime": 1780697848000, "carrierName": { "carrier": "UPS" }, "methodCode": "Standard", "trackingNumber": "22344", "trackingURL": "http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345" }, "returnCenterAddress": { "name": "walmart", "address1": "1 Customer Drive", "city": "Bentonville", "state": "AR", "postalCode": "72716", "country": "USA", "dayPhone": "12344", "emailId": "[email protected]" } } ] } } ] } } } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}/shipping")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("WM_SANDBOX", "v2") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_QOS.CORRELATION_ID", "test-correlation-id") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The order is shipped successfully.
- Shipment information is associated with the order.
Step 8: Deliver the order
Mark the shipped order as delivered.
Endpoint
/v1/simulations/orders/{{purchaseOrderId}}/deliver
Requirements
- The order must already be shipped.
Sample request
This sample request marks a shipped test order as delivered, updating the order status to Delivered.
curl --location --request POST 'https://sandbox.walmartapis.com/v1/simulations/orders/{{purchaseOrderId}}/deliver' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_SANDBOX: v2' \ --data-raw '{ "orderLines": { "orderLine": [ { "lineNumber": "1", "orderLineStatuses": { "orderLineStatus": [ { "status": "Delivered" } ] } } ] } }'import requests url = "https://sandbox.walmartapis.com/v1/simulations/orders/{{purchaseOrderId}}/deliver" headers = { "Accept": "application/json", "Content-Type": "application/json", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_SANDBOX": "v2",
} payload = { "orderLines": { "orderLine": [ { "lineNumber": "1", "orderLineStatuses": { "orderLineStatus": [ { "status": "Delivered", } ] }, } ] }
} response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class DeliverOrder { public static void main(String[] args) throws Exception { String body = """ { "orderLines": { "orderLine": [ { "lineNumber": "1", "orderLineStatuses": { "orderLineStatus": [ { "status": "Delivered" } ] } } ] } } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v1/simulations/orders/{{purchaseOrderId}}/deliver")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_SANDBOX", "v2") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The order is marked as delivered.
Step 9: Verify the order status
Call the get an order API to verify that the order status is DELIVERED.
Endpoint
Requirements
- The order must already be delivered.
Sample request
This sample request retrieves the details of a specific order to verify that the order status is DELIVERED.
curl --location --request GET 'https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}' \ --header 'Accept: application/json' \ --header 'WM_SANDBOX: v2' \ --header 'WM_SEC.ACCESS_TOKEN: {{token}}' \ --header 'WM_SVC.NAME: MP' \ --header 'WM_QOS.CORRELATION_ID: test-correlation-id'import requests url = "https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}" headers = { "Accept": "application/json", "WM_SANDBOX": "v2", "WM_SEC.ACCESS_TOKEN": "{{token}}", "WM_SVC.NAME": "MP", "WM_QOS.CORRELATION_ID": "test-correlation-id",
} response = requests.get(url, headers=headers)
response.raise_for_status() print(response.status_code)
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse; public class GetOrder { public static void main(String[] args) throws Exception { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://sandbox.walmartapis.com/v3/orders/{{purchaseOrderId}}")) .header("Accept", "application/json") .header("WM_SANDBOX", "v2") .header("WM_SEC.ACCESS_TOKEN", "{{token}}") .header("WM_SVC.NAME", "MP") .header("WM_QOS.CORRELATION_ID", "test-correlation-id") .GET() .build(); HttpClient client = HttpClient.newHttpClient(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); }
}What to expect
- The API returns the order details.
- The order status is
DELIVERED.
Verify the results
After completing this recipe, verify that:
- The test SKU was created successfully.
- Inventory was added to the fulfillment center.
- The test order progressed through acknowledgement, shipment, and delivery.
- The Get Orders API returns the order with a status of
DELIVERED.
Next steps
Now that you have validated the order fulfillment workflow, you can continue testing additional sandbox workflows:
- Validate returns and refunds in sandbox.
- Validate inventory reservations, decrements, and stockouts.
Related resources
Updated 13 days ago

