Test Marketplace APIs

Migrate to Global APIs: New sellers and approved Solution Providers should use Global APIs. Existing users must migrate to avoid disruption and access new capabilities coming to your market. Explore Global Marketplace migration resources.


Test sandbox APIs for Marketplace sellers and solution providers

Start testing your Marketplace APIs.

This example uses the Update Inventory API to make a sample call.

Step 1: Get an access token

Exchange your client ID and client secret for an access token.

Step 2: Call the API

Use your access token to make an inventory update call.

curl -X PUT "https://sandbox.walmartapis.com/v3/inventory" \ -H "WM_SVC.NAME: Walmart Marketplace" \ -H "WM_QOS.CORRELATION_ID: YOUR_CORRELATION_ID" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "sku": "YOUR_SKU", "quantity": { "unit": "EACH", "amount": YOUR_QUANTITY }, "inventoryAvailableDate": "YYYY-MM-DD" }'
import requests # Define the URL
url = "https://sandbox.walmartapis.com/v3/inventory" # Define the headers
headers = { "WM_QOS.CORRELATION_ID": "YOUR_CORRELATION_ID", "Authorization": "Bearer YOUR_ACCESS_TOKEN", # Replace with your actual access token "Content-Type": "application/json"
} # Define the JSON payload
data = { "sku": "YOUR_SKU", "quantity": { "unit": "EACH", "amount": YOUR_QUANTITY # Replace with your actual quantity }, "inventoryAvailableDate": "YYYY-MM-DD" # Replace with the actual date
} # Send the PUT request
response = requests.put(url, headers=headers, json=data) # Print the response
print(response.status_code)
print(response.json())

Modify your code

  1. Replace YOUR_ACCESS_TOKEN with the access token you obtained after running Step 1.
  2. Replace YOUR_CORRELATION_ID with a unique identifier to track the request.
  3. Replace YOUR_SKU with the SKU of the item you want to update.
  4. Replace YOUR_QUANTITY with your inventory count.

Sample response

A successful request returns an HTTP 201 Created status code and the following response body:

{ "sku": "97964_KFTest", "quantity": { "unit": "EACH", "amount": 10 }, "inventoryAvailableDate": "2024-09-20"
}

Next steps

Go live by creating your app in the production environment.

See also

Learn about Marketplace feed validations and sandbox throttling limits.


Did this page help you?