{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-seller-central/main/json-schema/amazon-seller-central-get-order-metrics-response-schema.json", "title": "GetOrderMetricsResponse", "description": "The response schema for the getOrderMetrics operation.", "x-generated": "2026-09-24", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/amazon-seller-central-sales-api-openapi.yml#/components/schemas/GetOrderMetricsResponse", "type": "object", "properties": { "payload": { "description": "The payload for the getOrderMetrics operation.", "$ref": "#/$defs/OrderMetricsList" }, "errors": { "description": "Encountered errors for the getOrderMetrics operation.", "$ref": "#/$defs/ErrorList" } }, "$defs": { "Decimal": { "type": "string", "description": "A decimal number with no loss of precision. Useful when precision loss is unnaceptable, as with currencies. Follows RFC7159 for number representation." }, "Error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "An error code that identifies the type of error that occured." }, "message": { "type": "string", "description": "A message that describes the error condition in a human-readable form." }, "details": { "type": "string", "description": "Additional details that can help the caller understand or fix the issue." } }, "description": "Error response returned when the request is unsuccessful." }, "ErrorList": { "type": "array", "description": "A list of error responses returned when a request is unsuccessful.", "items": { "$ref": "#/$defs/Error" } }, "Money": { "type": "object", "required": [ "amount", "currencyCode" ], "properties": { "currencyCode": { "type": "string", "description": "Three-digit currency code. In ISO 4217 format." }, "amount": { "description": "The currency amount.", "$ref": "#/$defs/Decimal" } }, "description": "The currency type and the amount." }, "OrderMetricsInterval": { "type": "object", "required": [ "averageUnitPrice", "interval", "orderCount", "orderItemCount", "totalSales", "unitCount" ], "properties": { "interval": { "type": "string", "description": "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": { "type": "integer", "description": "The number of units in orders based on the specified filters." }, "orderItemCount": { "type": "integer", "description": "The number of order items based on the specified filters." }, "orderCount": { "type": "integer", "description": "The number of orders based on the specified filters." }, "averageUnitPrice": { "description": "The average price for an item based on the specified filters. Formula is totalSales/unitCount.", "$ref": "#/$defs/Money" }, "totalSales": { "description": "The total ordered product sales for all orders based on the specified filters.", "$ref": "#/$defs/Money" } }, "description": "Contains order metrics." }, "OrderMetricsList": { "type": "array", "description": "A set of order metrics, each scoped to a particular time interval.", "items": { "$ref": "#/$defs/OrderMetricsInterval" } } } }