openapi: 3.0.0
info:
  title: Car selectors
  description: This document lists Autopass available car selectors.
  version: 1.0.0
servers:
  - url: https://api.autopass.pro
    description: Live server
    x-environment: live
  - url: https://api-prelive.autopass.pro
    description: Prelive server
    x-environment: prelive
tags:
  - name: tecdoc
    description: Car selector based on Tecdoc.
paths:
  /car-selectors/tecdoc/manufacturers:
    get:
      summary: List TecDoc manufacturers
      description: List TecDoc manufacturers.
      operationId: list-tecdoc-manufacturers
      parameters:
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/Kind"
        - $ref: "#/components/parameters/KindId"
        - $ref: "#/components/parameters/KindIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/KtypesFields"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocManufacturersCollection"
        400:
          description: Bad request.
  /car-selectors/tecdoc/manufacturers/{manufacturer_id}:
    get:
      summary: Get TecDoc manufacturer
      description: Get a TecDoc manufacturer by its ID.
      operationId: get-tecdoc-manufaturer
      parameters:
        - in: path
          name: manufacturer_id
          schema:
            type: integer
          required: true
          example: 1
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocManufacturer"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/manufacturers/{manufacturer_id}/ktypes:
    get:
      summary: List TecDoc manufacturer's KTypes
      description: List TecDoc manufacturer's KTypes.
      operationId: list-tecdoc-manufacturer-ktypes
      parameters:
        - in: path
          name: manufacturer_id
          schema:
            type: integer
          required: true
          example: 1
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtypesCollection"
        400:
          description: Bad request.
  /car-selectors/tecdoc/manufacturers/{manufacturer_id}/models:
    get:
      summary: List TecDoc manufacturer's models
      description: List TecDoc manufacturer's models.
      operationId: list-tecdoc-manufacturer-models
      parameters:
        - in: path
          name: manufacturer_id
          schema:
            type: integer
          required: true
          example: 1
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocModelsCollection"
  /car-selectors/tecdoc/models:
    get:
      summary: List TecDoc models
      description: List TecDoc models.
      operationId: list-tecdoc-models
      parameters:
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocModelsCollection"
        400:
          description: Bad request.
  /car-selectors/tecdoc/models/{model_id}:
    get:
      summary: Get TecDoc model
      description: Get a TecDoc model by its ID.
      operationId: get-tecdoc-model
      parameters:
        - in: path
          name: model_id
          schema:
            type: integer
          required: true
          example: 1
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocModel"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/models/{model_id}/ktypes:
    get:
      summary: List TecDoc model's KTypes
      description: List TecDoc model's KTypes.
      operationId: list-tecdoc-model-ktypes
      parameters:
        - in: path
          name: model_id
          schema:
            type: integer
          required: true
          example: 1
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtypesCollection"
  /car-selectors/tecdoc/versions:
    get:
      summary: List TecDoc versions
      description: List TecDoc versions.
      operationId: list-tecdoc-versions
      parameters:
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocVersionsCollection"
        400:
          description: Bad request.
  /car-selectors/tecdoc/versions/{version_id}:
    get:
      summary: Get TecDoc version
      description: Get a TecDoc version by its ID.
      operationId: get-tecdoc-version
      parameters:
        - in: path
          name: version_id
          schema:
            type: string
          required: true
          example: 1.6 HDi
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocVersion"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/versions/{version_id}/models:
    get:
      summary: List tecdoc models (for version).
      description: List tecdoc models (for version).
      operationId: list-tecdoc-version-models
      parameters:
        - in: path
          name: version_id
          schema:
            type: string
          required: true
          example: 1
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocModelsCollection"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/engine-codes:
    get:
      summary: List TecDoc engine codes
      description: List TecDoc engine codes.
      operationId: list-tecdoc-engine-codes
      parameters:
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocEngineCodesCollection"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/engine-codes/{engine_code_id}:
    get:
      summary: Get TecDoc engine code
      description: Get a TecDoc engine code by its ID.
      operationId: get-tecdoc-engine-code
      parameters:
        - in: path
          name: engine_code_id
          schema:
            type: integer
          required: true
          example: 1
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocEngineCode"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/ktypes:
    get:
      summary: List TecDoc KTypes
      description: List TecDoc KTypes.
      operationId: list-tecdoc-ktypes
      parameters:
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtypesCollection"
  /car-selectors/tecdoc/ktypes/{ktype_id}:
    get:
      summary: Get TecDoc KType.
      description: Get a TecDoc KType by its ID.
      operationId: get-tecdoc-ktype
      parameters:
        - in: path
          name: ktype_id
          required: true
          schema:
            type: integer
            minimum: 42
          description: The ktype
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtype"
        400:
          description: Bad request.
        404:
          description: Not found.
    patch:
      summary: Patch TecDoc KType
      description: Patch a TecDoc KType by ID.
      operationId: update-tecdoc-ktype
      parameters:
        - in: path
          name: ktype_id
          required: true
          schema:
            type: integer
            minimum: 42
          description: The ktype
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                status:
                  description: Ktype status
                  example: A
                  type: string
                  enum: ["A", "S"]
              required:
                - status
        required: true
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/ktypes/{ktype_id}/models:
    get:
      summary: List tecdoc models (for ktype).
      description: List tecdoc models (for ktype).
      operationId: list-tecdoc-ktype-models
      parameters:
        - in: path
          name: ktype_id
          schema:
            type: integer
          required: true
          example: 1
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocModelsCollection"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/ktypes/{ktype_id}/status:
    get:
      summary: Get ktype status.
      description: Get ktype status.
      operationId: get-ktype-status
      parameters:
        - in: path
          name: ktype_id
          schema:
            type: integer
          required: true
          example: 1
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtypeStatus"
        400:
          description: Bad request.
        404:
          description: Not found.
  /car-selectors/tecdoc/vehicle/{vehicle_id}/ktypes:
    get:
      summary: List vehicle's KTypes
      description: List vehicle's KTypes.
      operationId: list-tecdoc-vehicle-ktype
      parameters:
        - in: path
          name: vehicle_id
          required: true
          schema:
            type: string
          description: Vehicle ID
        - $ref: "#/components/parameters/KtypeId"
        - $ref: "#/components/parameters/KtypeIds"
        - $ref: "#/components/parameters/Manufacturer"
        - $ref: "#/components/parameters/ManufacturerId"
        - $ref: "#/components/parameters/Model"
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/Body"
        - $ref: "#/components/parameters/BodyId"
        - $ref: "#/components/parameters/BodyIds"
        - $ref: "#/components/parameters/ModelFrom"
        - $ref: "#/components/parameters/ModelTo"
        - $ref: "#/components/parameters/VersionFrom"
        - $ref: "#/components/parameters/VersionTo"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/EngineCode"
        - $ref: "#/components/parameters/MatchMode"
        - $ref: "#/components/parameters/Terms"
        - $ref: "#/components/parameters/KtypesMask"
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKtypesCollection"
  /car-selectors/tecdoc/kinds:
    get:
      summary: List TecDoc kinds
      description: List TecDoc kinds.
      operationId: list-tecdoc-kinds
      parameters:
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocKindsCollection"
  /car-selectors/tecdoc/bodies:
    get:
      summary: List TecDoc bodies
      description: List TecDoc bodies.
      operationId: list-tecdoc-bodies
      parameters:
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocBodiesCollection"
  /car-selectors/tecdoc/wheel-drives:
    get:
      summary: List TecDoc wheel drives
      description: List TecDoc wheel drives.
      operationId: list-tecdoc-wheel-drives
      parameters:
        - $ref: "#/components/parameters/PaginationLimit"
        - $ref: "#/components/parameters/PaginationOffset"
      tags:
        - tecdoc
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TecdocWheelDrivesCollection"
security:
  - ApiKeyAuth: []
  - ApiKeyHeader: []
  - ApiKeyQuery: []
  - BearerAuth: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: access_token
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    PaginationLimit:
      in: query
      name: limit
      example: 100
      schema:
        type: integer
      description: Limits results to given limit.
    PaginationOffset:
      in: query
      name: offset
      example: 0
      schema:
        type: integer
      description: List results starting to given offset.
    KtypesMask:
      in: query
      name: mask
      example: all
      schema:
        type: string
        enum: ["all", "active"]
        default: active
      description: Filters depending on perimeter
    KtypesFields:
      in: query
      name: fields
      example: kinds
      schema:
        type: string
        enum: ["kinds"]
      description: Expose additional fields.
    MatchMode:
      in: query
      name: match_mode
      example: exact
      schema:
        type: string
        enum: ["exact", "partial"]
        default: partial
      description: Filters on match mode.
    Terms:
      in: query
      name: terms
      example: '["peugeot","diesel","308"]'
      schema:
        type: string
      description: >
        Filters on terms (MUST be provided as string JSON array).
        Currently, terms lookup fields are :
        - manufacturer
        - model
        - version
        - body
        - energy
        - engine_code
    KtypeId:
      in: query
      name: ktype_id
      example: 42
      schema:
        type: integer
      description: Filters on ktype ID.
    KtypeIds:
      in: query
      name: ktypes
      example: "[1,1500]"
      schema:
        type: string
      description: Filters on ktypes (MUST be provided as int JSON array).
    Manufacturer:
      in: query
      name: manufacturer
      example: RENAULT
      schema:
        type: string
      description: Filters on manufacturer.
    ManufacturerId:
      in: query
      name: manufacturer_id
      example: 42
      schema:
        type: integer
      description: Filters on manufacturer ID.
    Model:
      in: query
      name: model
      example: Clio
      schema:
        type: string
      description: Filters on model.
    ModelId:
      in: query
      name: model_id
      example: 42
      schema:
        type: integer
      description: Filters on model ID.
    Body:
      in: query
      name: body
      example: Fourgon
      schema:
        type: string
      description: Filters on body.
    BodyId:
      in: query
      name: body_id
      example: 21
      schema:
        type: integer
      description: Filters on body ID.
    BodyIds:
      in: query
      name: bodies
      example: "[1,1500]"
      schema:
        type: string
      description: Filters on bodies (MUST be provided as int JSON array).
    Kind:
      in: query
      name: kind
      example: TecDoc VL
      schema:
        type: string
      description: Filters on kind.
    KindId:
      in: query
      name: kind_id
      example: 2
      schema:
        type: integer
      description: Filters on kind ID.
    KindIds:
      in: query
      name: kinds
      example: "[1,1500]"
      schema:
        type: string
      description: Filters on kinds (MUST be provided as int JSON array).
    ModelFrom:
      in: query
      name: model_from
      example: 2009-01
      schema:
        type: string
      description: Filters from start model date (included).
    ModelTo:
      in: query
      name: model_to
      example: 2012-12
      schema:
        type: string
      description: Filters to end model date (excluded).
    Version:
      in: query
      name: version
      example: 1.6 Hdi 90
      schema:
        type: string
      description: Filters on version.
    VersionFrom:
      in: query
      name: version_from
      example: 2009-01
      schema:
        type: string
      description: Filters from start version date (included).
    VersionTo:
      in: query
      name: version_to
      example: 2012-12
      schema:
        type: string
      description: Filters to end version date (excluded).
    EngineCode:
      in: query
      name: engine_code
      example: 9HJ
      schema:
        type: string
      description: Filters on engine code.
  schemas:
    Meta:
      type: object
      properties:
        limit:
          type: integer
          example: 100
        offset:
          type: integer
          example: 0
        total:
          type: integer
          example: 200
    TecdocManufacturersCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        manufacturers:
          $ref: "#/components/schemas/TecdocManufacturers"
    TecdocManufacturers:
      type: array
      items:
        $ref: "#/components/schemas/TecdocManufacturer"
    TecdocManufacturer:
      type: object
      properties:
        manufacturer_id:
          type: integer
          example: 42
        manufacturer_name:
          type: string
          example: VW
        kinds:
          $ref: "#/components/schemas/TecdocKinds"
        links:
          $ref: "#/components/schemas/TecdocManufacturerLinks"
    TecdocManufacturerLinks:
      type: object
      properties:
        self:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/manufacturers/1234
        models:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/manufacturers/1234/models
        ktypes:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/manufacturers/1234/ktypes
    TecdocModelsCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        models:
          $ref: "#/components/schemas/TecdocModels"
    TecdocModels:
      type: array
      items:
        $ref: "#/components/schemas/TecdocModel"
    TecdocModel:
      type: object
      properties:
        model_id:
          type: integer
          example: 42
        model_name:
          type: string
          example: CLIO II
        model_range:
          type: string
          example: CLIO
        model_generation:
          example: II
          type: string
        model_type:
          example: KR0/1_
          type: string
        model_from:
          example: 2000-01
          type: string
        model_to:
          example: 2010-01
          type: string
        manufacturer:
          $ref: "#/components/schemas/TecdocManufacturer"
        links:
          $ref: "#/components/schemas/TecdocModelLinks"
    TecdocModelLinks:
      type: object
      properties:
        self:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/models/1234
        versions:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/models/1234/versions
        ktypes:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/versions/1234/ktypes
    TecdocVersionsCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        versions:
          $ref: "#/components/schemas/TecdocVersions"
    TecdocVersions:
      type: array
      items:
        $ref: "#/components/schemas/TecdocVersion"
    TecdocVersion:
      type: object
      properties:
        version_id:
          type: string
          example: 1.6 HDi 90
        version_name:
          type: string
          example: 1.6 HDi 90
        version_from:
          example: 2000-01
          type: string
        version_to:
          example: 2010-01
          type: string
        manufacturers:
          $ref: "#/components/schemas/TecdocManufacturers"
        links:
          $ref: "#/components/schemas/TecdocVersionLinks"
    TecdocVersionLinks:
      type: object
      properties:
        self:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/versions/1234
        manufacturers:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/versions/1234/manufacturers
        models:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/versions/1234/models
        ktypes:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/versions/1234/ktypes
    TecdocEngineCodesCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        engine_codes:
          $ref: "#/components/schemas/TecdocEngineCodes"
    TecdocEngineCodes:
      type: array
      items:
        $ref: "#/components/schemas/TecdocEngineCode"
    TecdocEngineCode:
      type: object
      properties:
        engine_code_id:
          type: integer
          example: 42
        engine_code:
          type: string
          example: JDH
        manufacturer:
          $ref: "#/components/schemas/TecdocManufacturer"
        links:
          $ref: "#/components/schemas/TecdocEngineCodeLinks"
    TecdocEngineCodeLinks:
      type: object
      properties:
        self:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/engine-codes/1234
    TecdocKtypesCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        ktypes:
          $ref: "#/components/schemas/TecdocKtypes"
    TecdocKtypes:
      type: array
      items:
        $ref: "#/components/schemas/TecdocKtypePreview"
    TecdocKtypePreview:
      type: object
      properties:
        ktype:
          type: integer
          example: 1234
        model:
          $ref: "#/components/schemas/TecdocModel"
        date_model_from:
          type: string
          example: 2009-02
        date_model_to:
          type: string
          example: 2012-05
        date_version_from:
          type: string
          example: 2009-02
        date_version_to:
          type: string
          example: 2012-05
        power_horses:
          type: integer
          example: 110
        power_kw:
          type: integer
          example: 90
        score:
          type: integer
          example: 3
        version:
          type: string
          example: 1.4
        wheel_drive:
          type: string
          example: Traction avant
        energy:
          type: string
          example: Essence/Electrique
        body:
          type: string
          example: Berline bicorps trois ou cinq portes
        engine_codes:
          type: array
          items:
            type: string
            example: ["9HJ (DV6DTEDM)", "9HP (DV6DTED)"]
        links:
          $ref: "#/components/schemas/TecdocKtypeLinks"
    TecdocKtype:
      type: object
      properties:
        ktype:
          type: integer
          example: 1234
        model:
          $ref: "#/components/schemas/TecdocModel"
        generation:
          type: string
          example: II
        model_type:
          type: string
          example: NC_
        version:
          type: string
          example: 1.6 HDi 90
        vehicle_type:
          type: string
          example: TecDoc VL
        date_model_from:
          type: string
          example: 2009-02
        date_model_to:
          type: string
          example: 2012-05
        date_version_from:
          type: string
          example: 2009-02
        date_version_to:
          type: string
          example: 2012-05
        power_kw:
          type: integer
          example: 60
        power_horses:
          type: integer
          example: 92
        engine_capacity_technical:
          type: integer
          example: 1590
        nb_cylinders:
          type: integer
          example: 4
        nb_doors:
          type: integer
          example: 5
        wheel_drive:
          type: string
          example: Traction avant
        energy:
          type: string
          example: Essence/Electrique
        engine_type:
          type: string
          example: hybride non rechageable
        body:
          type: string
          example: Berline bicorps trois ou cinq portes
        engine_codes:
          type: array
          items:
            $ref: "#/components/schemas/TecdocEngineCode"
        links:
          $ref: "#/components/schemas/TecdocKtypeLinks"
    TecdocKtypeLinks:
      type: object
      properties:
        self:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/ktypes/1234
        manufacturer:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/manufacturers/42
        models:
          type: string
          example: https://api.autopass.pro/car-selectors/tecdoc/ktypes/42/models

    TecdocKtypeStatus:
      type: object
      properties:
        status:
          type: string
          example: A
          enum: ["A", "S"]
        replaced_by:
          type: string
        replaces:
          type: string
        total_vr:
          type: integer
        total_vr_called:
          type: integer
        links:
          $ref: "#/components/schemas/TecdocKtypeStatusLinks"
    TecdocKtypeStatusLinks:
      type: object
      properties:
        self:
          example: https://api.autopass.pro/car-selectors/tecdoc/ktypes/2
          type: string
    TecdocBodiesCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        bodies:
          $ref: "#/components/schemas/TecdocBodies"
    TecdocBodies:
      type: array
      items:
        $ref: "#/components/schemas/TecdocBodyPreview"
    TecdocBodyPreview:
      type: object
      properties:
        body_id:
          type: integer
          example: 1234
        body_name:
          type: string
          example: Berline bicorps trois ou cinq portes
    TecdocKindsCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        kinds:
          $ref: "#/components/schemas/TecdocKinds"
    TecdocKinds:
      type: array
      nullable: true
      items:
        $ref: "#/components/schemas/TecdocKindPreview"
    TecdocKindPreview:
      type: object
      properties:
        kind_id:
          type: integer
          example: 1234
        kind_name:
          type: string
          example: TecDoc Voiture électrique
    TecdocWheelDrivesCollection:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        wheel_drives:
          $ref: "#/components/schemas/TecdocWheelDrives"
    TecdocWheelDrives:
      type: array
      items:
        $ref: "#/components/schemas/TecdocWheelDrivePreview"
    TecdocWheelDrivePreview:
      type: object
      properties:
        wheel_drive_id:
          type: integer
          example: 1234
        wheel_drive_name:
          type: string
          example: Traction avant
