Get sales metrics
Get aggregated order metrics for a time interval, broken down by hour, day, week, month or year.
Order metrics show how your sales are trending without you having to add up individual orders. Use them to build sales dashboards, compare periods, or track how a single SKU is selling. This guide shows you how to request order metrics and set the interval, granularity and filters correctly.
Before you begin
- Get an access token. See Authentication.
- Know the marketplace identifier you want metrics for.
- The path is relative to
https://marketplace.walmart.com/seller/v1(sandbox:https://sandbox.marketplace.walmart.com/seller/v1).
Step 1: Choose the interval
interval is two ISO 8601 date-times separated by two hyphens (--). The first is inclusive and the second is
exclusive. Both must be absolute times, in either Z notation or offset notation.
Example interval | Covers |
|---|---|
2026-11-01T00:00:00Z--2026-11-08T00:00:00Z | November 1 to 7, UTC |
2026-11-01T00:00:00-08:00--2026-11-04T00:00:00-08:00 | November 1, 2 and 3 in the -08:00 zone |
Step 2: Choose the granularity
granularity groups the metrics by a unit of time: Hour, Day, Week, Month, Year or Total.
Totalaggregates the metrics over the whole interval.Hourworks only if the interval is within 30 days from now. All other granularities work for intervals within 2 years from now.- For any granularity larger than
Hour, you must also sendgranularityTimeZone, an IANA time zone that sets the day boundary. It must match the interval: if the interval uses Z notation, useUTC. If it uses an offset, use a time zone that matches the offset, such asUS/Pacific. - With
granularity=Week, usefirstDayOfWeekto start weeks onMonday(the default) orSunday. - If the interval doesn't line up with the granularity, the first and last buckets contain partial data.
Step 3: Request the metrics
Call Get order metrics. marketplaceIds, interval and granularity are required.
You can specify only one marketplace.
GET /sales/v4/orderMetrics?marketplaceIds=<marketplace-id>&interval=2026-11-01T00:00:00Z--2026-11-08T00:00:00Z&granularity=Day&granularityTimeZone=UTC
Authorization: Bearer <access_token>If your interval uses a + offset, URL-encode it as %2B.
The response is a JSON object that contains the order metrics. Its fields aren't limited to a fixed list, so read the fields you need and ignore the rest.
Step 4: Filter the results (optional)
Add any of these filters to narrow the metrics:
| Parameter | Values | Use it to |
|---|---|---|
buyerType | B2B, B2C, All | Include only business or consumer buyers |
fulfillmentNetwork | MFN (merchant fulfillment network) or AFN (marketplace fulfillment network) | Include only one fulfillment network. Leave it out for all networks |
sku | Your SKU | Get metrics for one SKU |
asin | An item identifier | Get metrics for one item identifier |
sp-apiProgram | A program | Include only one program |
You can't send both sku and asin in the same request.
GET /sales/v4/orderMetrics?marketplaceIds=<marketplace-id>&interval=2026-10-01T00:00:00Z--2026-11-01T00:00:00Z&granularity=Week&granularityTimeZone=UTC&firstDayOfWeek=Sunday&sku=TestSKU&buyerType=B2C
Authorization: Bearer <access_token>Errors and edge cases
| Status | When it happens |
|---|---|
400 Bad Request | The request is invalid, for example a required parameter is missing or the interval is malformed |
403 Forbidden | Your token isn't allowed to read sales metrics |
404 Not Found | The requested resource wasn't found |
429 Too Many Requests | You exceeded the rate limit. Wait and retry with backoff |
500 Internal Server Error | An unexpected error. Retry later |
Sending both sku and asin returns an error, and granularity=Hour succeeds only for intervals within 30 days from now.
Error bodies use the problem details format, with an errors array of code, message and optional details.
