---
title: "getOrderMetrics"
method: GET
path: "/sales/v1/orderMetrics"
tags: ["Sales v1"]
---

# getOrderMetrics

`GET /sales/v1/orderMetrics`

Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type.

**Usage Plan:**

| Rate (requests per second) | Burst |
| ---- | ---- |
| .5 | 15 |

The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

## Query parameters

- `marketplaceIds` string[], required
- `interval` string, required
- `granularityTimeZone` string
- `granularity` 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', required
- `buyerType` 'B2B' | 'B2C' | 'All'
- `fulfillmentNetwork` string
- `firstDayOfWeek` 'Monday' | 'Sunday'
- `asin` string
- `sku` string
- `amazonProgram` 'AmazonHaul'

## Response `200`

OrderMetric action taken on the resource OrderMetrics.

- GetOrderMetricsResponse — The response schema for the getOrderMetrics operation.
  - `payload` OrderMetricsInterval[] — A set of order metrics, each scoped to a particular time interval.
    - `interval` string, required — The interval of time based on requested granularity (ex. Hour, Day, etc.) If this is the first or the last interval from the list, it might contain incomplete data if the requested interval doesn't align with the requested granularity (ex. request interval 2018-09-01T02:00:00Z--2018-09-04T19:00:00Z and granularity day will result in Sept 1st UTC day and Sept 4th UTC days having partial data).
    - `unitCount` integer, required — The number of units in orders based on the specified filters.
    - `orderItemCount` integer, required — The number of order items based on the specified filters.
    - `orderCount` integer, required — The number of orders based on the specified filters.
    - `averageUnitPrice` Money, required — An amount of money, including units in the form of currency.
      - `currencyCode` string, required — Three digit currency code in ISO 4217 format.
      - `amount` string, required — A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`.
    - `totalSales` Money, required — An amount of money, including units in the form of currency.
      - `currencyCode` string, required — Three digit currency code in ISO 4217 format.
      - `amount` string, required — A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`.
  - `errors` Error[] — A list of error responses returned when a request is unsuccessful.
    - `code` string, required — An error code that identifies the type of error that occurred.
    - `message` string, required — A message that describes the error condition.
    - `details` string — Additional details that can help the caller understand or fix the issue.

## Other responses

- `400` — Request has missing or invalid parameters and cannot be parsed.
- `403` — 403 can be caused for reasons like Access Denied, Unauthorized, Expired Token, Invalid Signature or Resource Not Found.
- `404` — The resource specified does not exist.
- `413` — The request size exceeded the maximum accepted size.
- `415` — The entity of the request is in a format not supported by the requested resource.
- `429` — The frequency of requests was greater than allowed.
- `500` — Encountered an unexpected condition which prevented the server from fulfilling the request.
- `503` — Temporary overloading or maintenance of the server.

---

[API](https://skmtc.net/aws-samples/apis/a-content-management-v2020-11-01.md) · [All operations](https://skmtc.net/aws-samples/apis/a-content-management-v2020-11-01/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws-samples/a-content-management-v2020-11-01/revisions/815a5b6dbaa6/schema)
