Environments and sandbox
Production and sandbox base URLs, and how to test your integration before you go live.
The Marketplace APIs run in two environments. Production works on your live account: real listings, real orders and real money. Sandbox lets you build and test your integration without affecting your live business.
Base URLs
| API | Production | Sandbox |
|---|---|---|
| Authorization | https://marketplace.walmart.com/seller | https://sandbox.marketplace.walmart.com/seller |
| All other APIs | https://marketplace.walmart.com/seller/v1 | https://sandbox.marketplace.walmart.com/seller/v1 |
Paths in the API reference are relative to these servers, so the same path works in both environments. For example:
| Operation | Sandbox URL |
|---|---|
| Create an access token | POST https://sandbox.marketplace.walmart.com/seller/v4/auth/token |
| Get orders | GET https://sandbox.marketplace.walmart.com/seller/v1/v4/orders |
| Get account details | GET https://sandbox.marketplace.walmart.com/seller/v1/sellers/v4/account |
Use sandbox credentials
Request your token from the Authorization API in the same environment you call. Use your sandbox credentials with the sandbox token endpoint, and your production credentials with the production token endpoint.
- Sellers: get your credentials as described in Get started as a seller.
- Solution Providers: find your sandbox credentials in the Solution Provider Center, and use Simulate App Connect in sandbox to test the delegated authorization flow.
curl -X POST "https://sandbox.marketplace.walmart.com/seller/v4/auth/token" \
-u "$SANDBOX_CLIENT_ID:$SANDBOX_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json" \
-d "grant_type=client_credentials"Then call the sandbox API server with the token:
GET /v4/orders?orderStatuses=Created HTTP/1.1
Host: sandbox.marketplace.walmart.com
Authorization: Bearer <sandbox_access_token>
Accept: application/jsonWhat to test
Use sandbox to prove that your integration handles the full flow, not just the happy path.
- Authorization. Get a token, cache it and request a new one before it expires. For delegated apps, test the
authorization_codeandrefresh_tokengrants. See OAuth 2.0 authorization. - Your core workflows. Run the flows your business depends on end to end, for example:
- Pagination. Follow continuation tokens until no token is returned.
- Error handling. Confirm your code reads the
errorsarray and acts on eachcode, and that it handles400,403,404,429and5xxresponses. See Rate limiting and errors. - Asynchronous work. For feeds, reports and other jobs that complete later, confirm that your code polls for status and picks up the result.
Go live
- Get your production credentials.
- Switch the token endpoint and the API base URL to production. Keep both in configuration so you change them in one place.
- Start with read-only calls, such as Get account details, to confirm your production token works.
- Turn on write operations once reads succeed.
Production changes are real
In production, acknowledging, shipping, cancelling and refunding orders, and changing prices or inventory, affect your live business and your customers.
