{
  "openapi": "3.1.0",
  "info": {
    "title": "ARST Data API",
    "version": "1.0.0",
    "description": "REST API of ARST Data: market value today with a P10–P50–P90 range and the expected value every 6 months up to 72, for used cars in the European countries in service, each in its own currency. Authentication: `Authorization: Bearer sk_live_…` (or `sk_test_…` for the free sandbox, which returns sample data). 1 valuation = 1 credit; items that cannot be valued are not charged. Errors come in English by default; `?lang=es` returns them in Spanish. Guide, examples and pricing: https://www.arstdata.com/en/api",
    "contact": {
      "name": "ARST Data",
      "email": "info@arstdata.com",
      "url": "https://www.arstdata.com/en/api"
    },
    "termsOfService": "https://www.arstdata.com/en/terminos"
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Service status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_health",
        "description": "Service version and, for each country, whether it is available. No key needed.",
        "x-credits": "0",
        "security": []
      }
    },
    "/api/v1/countries": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Countries in service",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CountryStatus"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_countries",
        "description": "Countries that can be valued right now. No key needed.",
        "x-credits": "0",
        "security": []
      }
    },
    "/api/v1/valuation": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Value one car",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValuationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValuationResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_valuation",
        "description": "Market value today (p10, p50, p90) and the expected value at each horizon (keys `0`, `6` … `72`, months from today), in the currency of the country.",
        "x-credits": "1"
      }
    },
    "/api/v1/batch": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Value up to 50 cars",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchValuationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchValuationResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_batch",
        "description": "Same input as /valuation, one item per car. Each result has its own `status` (`ok` or `error`); only `ok` items are charged.",
        "x-credits": "1 per car valued"
      }
    },
    "/api/v1/batch/async": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Queue a batch",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchValuationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncBatchQueued"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_batch_async",
        "description": "Queues up to 50 cars and returns a `job_id`. Read the result with GET /api/v1/batch/async/{job_id}, or receive it on your webhook if your key has one.",
        "x-credits": "1 per car, charged when queued; failed cars are refunded"
      }
    },
    "/api/v1/batch/async/{job_id}": {
      "get": {
        "tags": [
          "valuation"
        ],
        "summary": "Batch status and results",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncBatchStatus"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_batch_async_job_id",
        "description": "Status of a queued batch and, when finished, the results in the same format as /batch.",
        "x-credits": "0"
      }
    },
    "/api/v1/comparable": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Comparable cars",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComparableRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComparableResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_comparable",
        "description": "Comparable cars currently on the market for the same model, with price, year, mileage, version and city.",
        "x-credits": "1"
      }
    },
    "/api/v1/buyback": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Buyback price with certificate",
        "parameters": [
          {
            "name": "include_pdf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include the certificate PDF as base64."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValuationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuybackResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_buyback",
        "description": "Today's buyback price (central and range) and market value, with a signed, verifiable certificate.",
        "x-credits": "1"
      }
    },
    "/api/v1/lease-check": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "Check a lease quote",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Optional. Repeating a request with the same key returns the same response and is not charged again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeaseCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaseCheckResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_lease_check",
        "description": "Compares a lease or renting quote with the expected value of the car at the end of the term and returns a verdict.",
        "x-credits": "1"
      }
    },
    "/api/v1/pdf": {
      "post": {
        "tags": [
          "valuation"
        ],
        "summary": "PDF report of a valuation",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ValuationResponse"
                  },
                  {
                    "$ref": "#/components/schemas/BatchItemResult"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "post_pdf",
        "description": "Send the unmodified JSON of a /valuation response (or an `ok` item of /batch) and get its signed PDF report.",
        "x-credits": "0"
      }
    },
    "/api/v1/certificates/{code}": {
      "get": {
        "tags": [
          "certificates"
        ],
        "summary": "Verify a certificate",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertificateVerification"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_certificates_code",
        "description": "Public check of a certificate by its code: validity, date, car and figure. No key needed.",
        "x-credits": "0",
        "security": []
      }
    },
    "/api/v1/certificates/{code}/pdf": {
      "get": {
        "tags": [
          "certificates"
        ],
        "summary": "Download a certificate PDF",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|es)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Language of error messages and documents: en (default) or es."
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_certificates_code_pdf",
        "description": "Signed PDF of a certificate issued to your account.",
        "x-credits": "0"
      }
    },
    "/api/v1/pvpr": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "New price of a model",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 8
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 2030,
              "minimum": 1990
            }
          },
          {
            "name": "fuel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PVPRHintResponse"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_pvpr",
        "description": "Range of the new price for a brand, model and year in the country, in its currency.",
        "x-credits": "0"
      }
    },
    "/api/v1/catalog/brands": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "Brands",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogBrands"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_catalog_brands",
        "description": "Brands that can be valued in a country.",
        "x-credits": "0"
      }
    },
    "/api/v1/catalog/models": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "Models",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 2
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogModels"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_catalog_models",
        "description": "Models of a brand that can be valued in a country.",
        "x-credits": "0"
      }
    },
    "/api/v1/catalog/versions": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "Versions",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 2
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogVersions"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_catalog_versions",
        "description": "Versions of a model in a country, with fuel, years and new price.",
        "x-credits": "0"
      }
    },
    "/api/v1/market-index": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "ARST Used Car Index",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketIndex"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_market_index",
        "description": "Monthly used car price index by country.",
        "x-credits": "0"
      }
    },
    "/api/v1/usage": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Usage and limits",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left, or monthly pay-as-you-go cap reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key cannot use this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or a car that cannot be valued in that market (not charged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait `retry_after_s` seconds (also in the Retry-After header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Country temporarily unavailable (not charged). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "get_usage",
        "description": "Credits left, calls and limits of the key making the call.",
        "x-credits": "0"
      }
    }
  },
  "components": {
    "schemas": {
      "AsyncBatchQueued": {
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "item_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens_charged": {
            "type": "integer"
          },
          "tokens_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_sandbox": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "webhook_configured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotent_replay": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status",
          "tokens_charged"
        ]
      },
      "AsyncBatchStatus": {
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "item_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens_charged": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_sandbox": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "webhook_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "results": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BatchItemResult"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status"
        ]
      },
      "BatchItemResult": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "index": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "km": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "fuel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "p10": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "p50": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "p90": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sample_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true
          },
          "detail_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "horizons": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/HorizonDetail"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "rv_conservative": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_recognized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "pvpr_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "index",
          "status"
        ]
      },
      "BatchValuationRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ValuationRequest"
            },
            "type": "array",
            "maxItems": 50,
            "minItems": 1
          }
        },
        "type": "object",
        "required": [
          "items"
        ]
      },
      "BatchValuationResponse": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "tokens_charged": {
            "type": "integer"
          },
          "tokens_remaining": {
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/BatchItemResult"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tokens_charged",
          "tokens_remaining",
          "results"
        ]
      },
      "BuybackResponse": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "km": {
            "type": "integer"
          },
          "fuel": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency of every amount in the response: the currency of the country."
          },
          "buyback_price": {
            "type": "number",
            "description": "Central buyback price today, in `currency`."
          },
          "buyback_low": {
            "type": "number"
          },
          "buyback_high": {
            "type": "number"
          },
          "market_value": {
            "type": "number",
            "description": "Market value today (p50 of the valuation)."
          },
          "issued_at": {
            "type": "string"
          },
          "certificate": {
            "$ref": "#/components/schemas/CertificateInfo"
          },
          "tokens_remaining": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "year",
          "km",
          "fuel",
          "buyback_price",
          "buyback_low",
          "buyback_high",
          "market_value",
          "issued_at",
          "certificate",
          "tokens_remaining"
        ]
      },
      "CatalogBrand": {
        "properties": {
          "brand": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "brand"
        ]
      },
      "CatalogBrands": {
        "properties": {
          "country": {
            "type": "string"
          },
          "brands": {
            "items": {
              "$ref": "#/components/schemas/CatalogBrand"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "country",
          "brands"
        ]
      },
      "CatalogModel": {
        "properties": {
          "model": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "model"
        ]
      },
      "CatalogModels": {
        "properties": {
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "models": {
            "items": {
              "$ref": "#/components/schemas/CatalogModel"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "country",
          "brand",
          "models"
        ]
      },
      "CatalogVersion": {
        "properties": {
          "version_bucket_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fuel": {
            "type": "string"
          },
          "pvpr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "pvpr_eur": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "year_min": {
            "type": "integer"
          },
          "year_max": {
            "type": "integer"
          },
          "power_kw_med": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "fuel",
          "year_min",
          "year_max"
        ]
      },
      "CatalogVersions": {
        "properties": {
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/CatalogVersion"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "currency",
          "versions"
        ]
      },
      "CertificateInfo": {
        "properties": {
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "verification_url": {
            "type": "string"
          },
          "pdf_url": {
            "type": "string"
          },
          "pdf_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "type",
          "verification_url",
          "pdf_url"
        ]
      },
      "CertificateVerification": {
        "properties": {
          "code": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "revoked": {
            "type": "boolean"
          },
          "fingerprint": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "km": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "fuel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "sandbox": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "valid",
          "revoked",
          "fingerprint",
          "type",
          "issued_at",
          "country",
          "brand",
          "model",
          "year",
          "currency",
          "value",
          "sandbox"
        ]
      },
      "ComparableItem": {
        "properties": {
          "price": {
            "type": "number"
          },
          "year": {
            "type": "integer"
          },
          "km": {
            "type": "integer"
          },
          "fuel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "transmission": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "power_cv": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "seller_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "price",
          "year",
          "km"
        ]
      },
      "ComparableRequest": {
        "properties": {
          "country": {
            "type": "string",
            "maxLength": 8
          },
          "brand": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "model": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1
          },
          "year": {
            "type": "integer",
            "maximum": 2030.0,
            "minimum": 1990.0
          },
          "km": {
            "type": "integer",
            "maximum": 600000.0,
            "minimum": 0.0
          },
          "fuel": {
            "type": "string",
            "maxLength": 40
          },
          "limit": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 3.0,
            "default": 8
          }
        },
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "year",
          "km",
          "fuel"
        ]
      },
      "ComparableResponse": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency of every amount in the response: the currency of the country."
          },
          "total_found": {
            "type": "integer"
          },
          "total_found_capped": {
            "type": "boolean",
            "default": false
          },
          "comparables": {
            "items": {
              "$ref": "#/components/schemas/ComparableItem"
            },
            "type": "array"
          },
          "tokens_remaining": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "total_found",
          "comparables",
          "tokens_remaining"
        ]
      },
      "ConditionAdjustment": {
        "properties": {
          "base_value": {
            "type": "number"
          },
          "final_value": {
            "type": "number"
          },
          "final_p10": {
            "type": "number"
          },
          "final_p90": {
            "type": "number"
          },
          "multiplier": {
            "type": "number"
          },
          "capped": {
            "type": "boolean"
          },
          "appraisal_recommended": {
            "type": "boolean"
          },
          "adjustments": {
            "items": {
              "$ref": "#/components/schemas/ConditionLine"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "base_value",
          "final_value",
          "final_p10",
          "final_p90",
          "multiplier",
          "capped",
          "appraisal_recommended",
          "adjustments"
        ]
      },
      "ConditionLine": {
        "properties": {
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "multiplier": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "basis": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "label",
          "multiplier",
          "amount",
          "basis"
        ]
      },
      "CountryStatus": {
        "properties": {
          "code": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "loaded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "available",
          "loaded"
        ]
      },
      "Error": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ValidationIssue"
                },
                "type": "array"
              },
              {
                "$ref": "#/components/schemas/ErrorCode"
              }
            ]
          }
        },
        "required": [
          "detail"
        ],
        "type": "object",
        "description": "Error body. `detail` is a message, a list of invalid fields or a coded error."
      },
      "ErrorCode": {
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message"
        ],
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "countries": {
            "items": {
              "$ref": "#/components/schemas/CountryStatus"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "version",
          "countries"
        ]
      },
      "HorizonDetail": {
        "properties": {
          "price": {
            "type": "number",
            "description": "Central value at this horizon, in `currency`."
          },
          "price_low": {
            "type": "number",
            "description": "Low end of the range at this horizon."
          },
          "price_high": {
            "type": "number",
            "description": "High end of the range at this horizon."
          },
          "pct": {
            "type": "number",
            "description": "Central value as a percentage of the new price."
          },
          "pct_low": {
            "type": "number"
          },
          "pct_high": {
            "type": "number"
          },
          "rv_conservative": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "price",
          "price_low",
          "price_high",
          "pct",
          "pct_low",
          "pct_high"
        ]
      },
      "LeaseAssumptions": {
        "properties": {
          "annual_rate_pct": {
            "type": "number"
          },
          "vat_rate_pct": {
            "type": "number"
          },
          "payments_in_advance": {
            "type": "boolean",
            "default": true
          },
          "services_source": {
            "type": "string",
            "enum": [
              "none",
              "default_estimate",
              "customer"
            ]
          },
          "services_monthly_total": {
            "type": "number"
          },
          "services": {
            "items": {
              "$ref": "#/components/schemas/ServiceAssumption"
            },
            "type": "array"
          },
          "resale_discount_pct": {
            "type": "number"
          },
          "value_source": {
            "type": "string",
            "default": "ARST Data projection, same as /api/v1/valuation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "annual_rate_pct",
          "vat_rate_pct",
          "services_source",
          "services_monthly_total",
          "services",
          "resale_discount_pct"
        ]
      },
      "LeaseCheckRequest": {
        "properties": {
          "country": {
            "type": "string",
            "maxLength": 8
          },
          "brand": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "model": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1
          },
          "fuel": {
            "type": "string",
            "maxLength": 40
          },
          "year": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2030.0,
                "minimum": 2000.0
              },
              {
                "type": "null"
              }
            ]
          },
          "km": {
            "type": "integer",
            "maximum": 500000.0,
            "minimum": 0.0,
            "default": 0
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "transmission": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "power_cv": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ]
          },
          "body_style": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "car_price": {
            "type": "number",
            "exclusiveMinimum": 0.0
          },
          "car_price_includes_vat": {
            "type": "boolean",
            "default": true
          },
          "term_months": {
            "type": "integer",
            "maximum": 72.0,
            "minimum": 6.0
          },
          "km_per_year": {
            "type": "integer",
            "maximum": 100000.0,
            "minimum": 1000.0
          },
          "monthly_payment": {
            "type": "number",
            "maximum": 100000.0,
            "exclusiveMinimum": 0.0
          },
          "payment_includes_vat": {
            "type": "boolean"
          },
          "deposit": {
            "type": "number",
            "maximum": 1000000.0,
            "minimum": 0.0,
            "default": 0.0
          },
          "customer_type": {
            "type": "string",
            "enum": [
              "private",
              "business"
            ],
            "default": "private"
          },
          "included_services": {
            "items": {
              "type": "string",
              "enum": [
                "maintenance",
                "tyres",
                "insurance",
                "roadside_assistance",
                "road_tax",
                "replacement_car"
              ]
            },
            "type": "array",
            "maxItems": 6
          },
          "services_monthly_value": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 10000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ]
          },
          "annual_rate_pct": {
            "type": "number",
            "maximum": 20.0,
            "minimum": 0.0,
            "default": 5.0
          },
          "resale_discount_pct": {
            "type": "number",
            "maximum": 40.0,
            "minimum": 0.0,
            "default": 0.0
          }
        },
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "fuel",
          "car_price",
          "term_months",
          "km_per_year",
          "monthly_payment",
          "payment_includes_vat"
        ]
      },
      "LeaseCheckResponse": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "km": {
            "type": "integer"
          },
          "fuel": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_type": {
            "type": "string"
          },
          "vat_included": {
            "type": "boolean"
          },
          "term_months": {
            "type": "integer"
          },
          "km_per_year": {
            "type": "integer"
          },
          "car_price": {
            "type": "number"
          },
          "monthly_payment": {
            "type": "number"
          },
          "deposit": {
            "type": "number"
          },
          "car_value_at_end": {
            "$ref": "#/components/schemas/ValueRange"
          },
          "car_value_at_end_pct": {
            "type": "number"
          },
          "implied_residual": {
            "type": "number"
          },
          "implied_residual_pct": {
            "type": "number"
          },
          "fair_monthly_payment": {
            "$ref": "#/components/schemas/ValueRange"
          },
          "monthly_difference": {
            "type": "number"
          },
          "total_cost_lease": {
            "type": "number"
          },
          "total_cost_buy": {
            "type": "number"
          },
          "present_cost_lease": {
            "type": "number"
          },
          "present_cost_buy": {
            "type": "number"
          },
          "verdict": {
            "type": "string",
            "enum": [
              "good_deal",
              "fair",
              "expensive"
            ]
          },
          "verdict_holds_across_range": {
            "type": "boolean"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "explanation": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "assumptions": {
            "$ref": "#/components/schemas/LeaseAssumptions"
          },
          "confidence": {
            "type": "string"
          },
          "detail_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_recognized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens_remaining": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "year",
          "km",
          "fuel",
          "currency",
          "customer_type",
          "vat_included",
          "term_months",
          "km_per_year",
          "car_price",
          "monthly_payment",
          "deposit",
          "car_value_at_end",
          "car_value_at_end_pct",
          "implied_residual",
          "implied_residual_pct",
          "fair_monthly_payment",
          "monthly_difference",
          "total_cost_lease",
          "total_cost_buy",
          "present_cost_lease",
          "present_cost_buy",
          "verdict",
          "verdict_holds_across_range",
          "warnings",
          "explanation",
          "assumptions",
          "confidence",
          "tokens_remaining"
        ]
      },
      "MarketIndex": {
        "properties": {
          "countries": {
            "additionalProperties": {
              "$ref": "#/components/schemas/MarketIndexCountry"
            },
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "countries"
        ]
      },
      "MarketIndexCountry": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "months": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "available"
        ]
      },
      "PVPRHintResponse": {
        "properties": {
          "pvpr_min": {
            "type": "number"
          },
          "pvpr_max": {
            "type": "number"
          },
          "pvpr_mean": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "year_used": {
            "type": "integer"
          },
          "catalog_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pvpr_min",
          "pvpr_max",
          "pvpr_mean",
          "currency",
          "year_used"
        ]
      },
      "RateLimitError": {
        "properties": {
          "error": {
            "type": "string"
          },
          "retry_after_s": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "retry_after_s",
          "detail"
        ],
        "type": "object"
      },
      "ServiceAssumption": {
        "properties": {
          "service": {
            "type": "string"
          },
          "monthly_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "service"
        ]
      },
      "Usage": {
        "properties": {
          "key_ref": {
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "calls_today": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "month": {
            "type": "string"
          },
          "limits": {
            "additionalProperties": {
              "$ref": "#/components/schemas/UsageLimit"
            },
            "type": "object"
          },
          "usage": {
            "additionalProperties": {
              "$ref": "#/components/schemas/UsageCount"
            },
            "type": "object"
          },
          "tokens": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageTokens"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "key_ref",
          "month",
          "limits",
          "usage"
        ]
      },
      "UsageCount": {
        "properties": {
          "today": {
            "type": "integer"
          },
          "month": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "today",
          "month"
        ]
      },
      "UsageLimit": {
        "properties": {
          "per_minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "per_day": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "UsageTokens": {
        "properties": {
          "days": {
            "type": "integer"
          },
          "by_reason": {
            "items": {
              "$ref": "#/components/schemas/UsageTokensByReason"
            },
            "type": "array"
          },
          "total_charged": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "days",
          "by_reason",
          "total_charged"
        ]
      },
      "UsageTokensByReason": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "calls": {
            "type": "integer"
          },
          "tokens": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "reason",
          "calls",
          "tokens"
        ]
      },
      "ValidationIssue": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array"
          },
          "msg": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object"
      },
      "ValuationRequest": {
        "properties": {
          "country": {
            "type": "string",
            "maxLength": 8,
            "description": "ISO 3166-1 alpha-2 code of a country in service (GB, DE, FR…). UK is accepted as GB."
          },
          "brand": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1,
            "description": "Brand, e.g. VOLKSWAGEN."
          },
          "model": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "description": "Model, e.g. GOLF."
          },
          "year": {
            "type": "integer",
            "maximum": 2030.0,
            "minimum": 2000.0,
            "description": "Year of first registration."
          },
          "km": {
            "type": "integer",
            "maximum": 500000.0,
            "minimum": 0.0,
            "description": "Mileage today."
          },
          "fuel": {
            "type": "string",
            "maxLength": 40,
            "description": "diesel, petrol, electric, hybrid, lpg, cng or hydrogen (common synonyms are accepted)."
          },
          "transmission": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "power_cv": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "description": "Version or trim as free text, e.g. 1.5 TSI Life."
          },
          "body_style": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "km_per_year": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 200000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected kilometres per year for the future horizons. Default 15,000."
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VehicleCondition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Declared condition. Optional; with it the response adds `condition_adjustment` for today."
          }
        },
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "year",
          "km",
          "fuel"
        ]
      },
      "ValuationResponse": {
        "properties": {
          "sandbox": {
            "type": "boolean",
            "default": false,
            "description": "Present and true only for sample data from a sk_test_ key."
          },
          "country": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "km": {
            "type": "integer"
          },
          "fuel": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency of every amount in the response: the currency of the country."
          },
          "p10": {
            "type": "number",
            "description": "Low end of today's market value range."
          },
          "p50": {
            "type": "number",
            "description": "Central market value today."
          },
          "p90": {
            "type": "number",
            "description": "High end of today's market value range."
          },
          "confidence": {
            "type": "string"
          },
          "sample_size": {
            "type": "integer"
          },
          "model_level": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated alias of detail_level, removed after 2027-01-31."
          },
          "detail_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "high, standard, basic or sandbox."
          },
          "horizons": {
            "additionalProperties": {
              "$ref": "#/components/schemas/HorizonDetail"
            },
            "type": "object",
            "description": "Value at each horizon. Keys are months from today: 0, 6, 12 … 72."
          },
          "tokens_remaining": {
            "type": "integer",
            "description": "Credits left after this call."
          },
          "rv_conservative": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_recognized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "pvpr_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "condition_adjustment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConditionAdjustment"
              },
              {
                "type": "null"
              }
            ]
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "version_used": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "version_matched": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "version_note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Signature required by /api/v1/pdf. Keep the JSON unchanged to print the report."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "country",
          "brand",
          "model",
          "year",
          "km",
          "fuel",
          "p10",
          "p50",
          "p90",
          "confidence",
          "sample_size",
          "model_level",
          "horizons",
          "tokens_remaining"
        ]
      },
      "ValueRange": {
        "properties": {
          "central": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "high": {
            "type": "number"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "central",
          "low",
          "high"
        ]
      },
      "VehicleCondition": {
        "properties": {
          "grade": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "A",
                  "B",
                  "C"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "body_damage": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minor",
                  "major"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "mechanical_damage": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minor",
                  "major"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "repaired_accident": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "owners": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ]
          },
          "inspection_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "white",
                  "black",
                  "grey",
                  "silver",
                  "blue",
                  "red",
                  "green",
                  "brown_beige",
                  "yellow_orange",
                  "purple_pink",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "extras": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "panoramic_roof",
                    "leather",
                    "navigation",
                    "tow_bar",
                    "adas_pack",
                    "premium_audio",
                    "heat_pump",
                    "sport_pack"
                  ]
                },
                "type": "array",
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ]
          },
          "service_history": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key: sk_live_… for real valuations, sk_test_… for free sample data."
      }
    }
  },
  "servers": [
    {
      "url": "https://rv.arstdata.com"
    }
  ],
  "externalDocs": {
    "description": "Guide and examples",
    "url": "https://www.arstdata.com/en/api"
  },
  "tags": [
    {
      "name": "valuation"
    },
    {
      "name": "catalog"
    },
    {
      "name": "certificates"
    },
    {
      "name": "meta"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
