changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "$defs": {
+ "ErrorDetail": {
+ "description": "Error detail structure.",
+ "properties": {
+ "code": {
+ "description": "Error code identifier",
+ "title": "Code",
+ "type": "string"
+ },
+ "details": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional error details",
+ "title": "Details"
+ },
+ "message": {
+ "description": "Human-readable error message",
+ "title": "Message",
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ],
+ "title": "ErrorDetail",
+ "type": "object"
+ },
+ "MarketHistoryCategory": {
+ "properties": {
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Amazon category ID.",
+ "title": "Id"
+ },
+ "idPath": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Real category IDs aligned with path, ordered from root to current category.",
+ "title": "Idpath"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Category names ordered from the root through the current category.",
+ "title": "Path"
+ }
+ },
+ "title": "MarketHistoryCategory",
+ "type": "object"
+ },
+ "MarketHistoryFact": {
+ "properties": {
+ "date": {
+ "anyOf": [
+ {
+ "format": "date",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Published month-end snapshot date (YYYY-MM-DD); identifies the historical month, not a product launch date.",
+ "title": "Date"
+ },
+ "marketSize": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MarketHistorySales"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Full-market Listing count, monthly unit sales and monthly revenue at this historical snapshot."
+ },
+ "sampleProfile": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MarketHistorySampleProfile"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sample Listing count, monthly unit sales and monthly revenue, plus per-Listing means for price, star rating, rating count, monthly unit sales and monthly revenue."
+ }
+ },
+ "title": "MarketHistoryFact",
+ "type": "object"
+ },
+ "MarketHistorySales": {
+ "properties": {
+ "monthlyRevenue": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Monthly revenue total for this statistics block, in USD. marketSize refers to the full market; sampleProfile refers to the selected sample. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Monthlyrevenue"
+ },
+ "monthlySales": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Monthly unit-sales total for this statistics block. marketSize refers to the full market; sampleProfile refers to the selected sample. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Monthlysales"
+ },
+ "productCount": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Listing count in this statistics block. marketSize refers to the full market; sampleProfile refers to the selected sample.",
+ "title": "Productcount"
+ }
+ },
+ "title": "MarketHistorySales",
+ "type": "object"
+ },
+ "MarketHistorySampleProfile": {
+ "properties": {
+ "avgMonthlyRevenue": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Average monthly revenue per Amazon Listing in the selected sample at this historical snapshot, in USD. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Avgmonthlyrevenue"
+ },
+ "avgMonthlySales": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Average monthly unit sales per Amazon Listing in the selected sample at this historical snapshot. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Avgmonthlysales"
+ },
+ "avgPrice": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Average 30-day prices across Amazon Listings in the selected sample at this historical snapshot, in USD. Excludes Listings whose corresponding metric is null; zeros participate. The denominator can differ from other means; no valid values returns null.",
+ "title": "Avgprice"
+ },
+ "avgRating": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Average star ratings across Amazon Listings in the selected sample at this historical snapshot (0–5). Excludes Listings whose corresponding metric is null; zeros participate. The denominator can differ from other means; no valid values returns null.",
+ "title": "Avgrating"
+ },
+ "avgRatingCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Average rating counts per Amazon Listing in the selected sample at this historical snapshot; not written-review counts. Excludes Listings whose corresponding metric is null; zeros participate. The denominator can differ from other means; no valid values returns null.",
+ "title": "Avgratingcount"
+ },
+ "monthlyRevenue": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Monthly revenue total for this statistics block, in USD. marketSize refers to the full market; sampleProfile refers to the selected sample. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Monthlyrevenue"
+ },
+ "monthlySales": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Monthly unit-sales total for this statistics block. marketSize refers to the full market; sampleProfile refers to the selected sample. Sales cover the trailing 30 days at this data snapshot, not cumulative sales over a launch-age window or requested date range.",
+ "title": "Monthlysales"
+ },
+ "productCount": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Listing count in this statistics block. marketSize refers to the full market; sampleProfile refers to the selected sample.",
+ "title": "Productcount"
+ }
+ },
+ "title": "MarketHistorySampleProfile",
+ "type": "object"
+ },
+ "MarketHistorySeries": {
+ "properties": {
+ "category": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MarketHistoryCategory"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Category identity and hierarchy shared by this historical market series."
+ },
+ "currency": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Currency of monetary metrics; USD for the US marketplace.",
+ "title": "Currency"
+ },
+ "includeDescendantCategoryProducts": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "true includes products in this category and its descendants; false counts only directly assigned products.",
+ "title": "Includedescendantcategoryproducts"
+ },
+ "points": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/$defs/MarketHistoryFact"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Actual published snapshots ordered by date ascending; missing dates are not filled.",
+ "title": "Points"
+ },
+ "sampleType": {
+ "anyOf": [
+ {
+ "enum": [
+ "unitSalesTop100",
+ "revenueTop100"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "At each historical month-end, unitSalesTop100 selects up to 100 Listings by that snapshot’s monthly unit sales; revenueTop100 selects them by monthly revenue. Membership can change each month; this does not track a fixed cohort.",
+ "title": "Sampletype"
+ },
+ "site": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Amazon site, currently amazon.com.",
+ "title": "Site"
+ }
+ },
+ "title": "MarketHistorySeries",
+ "type": "object"
+ },
+ "ResponseMeta": {
+ "description": "Metadata for API responses.\n\nCredit fields follow the ADR-0003 parallel-fields strategy (Option 3):\n- `credits_remaining` / `credits_consumed` (int): legacy fields, rounded\n to whole credits, kept for zero-breaking-change to existing SDK clients.\n- `credits_remaining_exact` / `credits_consumed_exact` (float): new\n precision-aware fields for clients that opt in to decimal credits.\n\nSee ADR-0003 decision 5 and the §8 deprecation timeline.\n\nTODO(2026-11, ADR-0003 §8 +6mo): mark `credits_remaining` /\n`credits_consumed` as `deprecated=True` in their Field() definitions\nand announce in customer changelog.\nTODO(2027-05, ADR-0003 §8 +12mo): remove the legacy int fields via a\nmajor-version bump of the OpenAPI surface.",
+ "properties": {
+ "creditsConsumed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Credits consumed by this request (rounded; see creditsConsumedExact for precise value)",
+ "title": "Creditsconsumed"
+ },
+ "creditsConsumedExact": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Credits consumed by this request, precise to 1 decimal place",
+ "title": "Creditsconsumedexact"
+ },
+ "creditsRemaining": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Remaining API credits (rounded to whole credits; see creditsRemainingExact for precise value)",
+ "title": "Creditsremaining"
+ },
+ "creditsRemainingExact": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Remaining API credits, precise to 1 decimal place",
+ "title": "Creditsremainingexact"
+ },
+ "page": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Current page number",
+ "title": "Page"
+ },
+ "pageSize": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Number of records per page",
+ "title": "Pagesize"
+ },
+ "requestId": {
+ "description": "Unique request identifier",
+ "title": "Requestid",
+ "type": "string"
+ },
+ "timestamp": {
+ "description": "Response timestamp in ISO 8601 format",
+ "title": "Timestamp",
+ "type": "string"
+ },
+ "tokensUsage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TokensUsage"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Provider token-usage block — populated on terminal video polls only, null on every non-video endpoint. See TokensUsage for its fields."
+ },
+ "total": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Total number of records",
+ "title": "Total"
+ },
+ "totalPages": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Total number of pages",
+ "title": "Totalpages"
+ }
+ },
+ "required": [
+ "requestId",
+ "timestamp"
+ ],
+ "title": "ResponseMeta",
+ "type": "object"
+ },
+ "TokensUsage": {
+ "additionalProperties": true,
+ "description": "Provider token-usage block surfaced on `meta.tokensUsage`.\n\nModeled fields use camelCase aliases to match the V2 envelope\nconvention (`requestId`, `creditsRemaining`, `tokensUsage` itself);\nthe upstream snake_case names (`completion_tokens`, `total_tokens`)\nare still accepted on input via `populate_by_name=True` so the\nBytePlus raw `usage` dict can be passed to `model_validate()`\nunchanged.\n\nToken *counts* only — never a USD amount; the customer derives USD\ncost from these counts times the published per-token rate.\n`extra=\"allow\"` keeps any additional upstream usage field reaching\nthe customer without a redeploy (those extras pass through under\nwhatever name the provider sent them with).",
+ "properties": {
+ "completionTokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Tokens the provider generated for the task — the billing basis. Multiply by the published per-token rate for the (model, resolution, input-video) combination to get the USD cost. Present on a successful terminal poll.",
+ "title": "Completiontokens"
+ },
+ "totalTokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Total tokens attributed to the task (input + output). For current video models this equals `completionTokens`; may be absent if the provider does not report it.",
+ "title": "Totaltokens"
+ }
+ },
+ "title": "TokensUsage",
+ "type": "object"
+ }
+ },
+ "examples": [],
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/$defs/MarketHistorySeries"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Response data payload",
+ "title": "Data"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ErrorDetail"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Error details if request failed"
+ },
+ "meta": {
+ "$ref": "#/$defs/ResponseMeta",
+ "description": "Response metadata including pagination info"
+ },
+ "success": {
+ "default": true,
+ "description": "Whether the request was successful",
+ "title": "Success",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "meta"
+ ],
+ "title": "OpenApiResponse[list[MarketHistorySeries]]",
+ "type": "object"
+}