openapi: 3.1.0
info:
  title: GetRentacar Partner API
  version: "302"
  summary: Vehicle inventory and rental option management
  description: |
    Public partner contract for GetRentacar API v302.

    Read-only catalog methods can be called without authentication. Account and
    inventory methods require a bearer API key. The private Cardoo, Steam, and
    JSON-RPC integration routes are intentionally outside this public contract.
  contact:
    name: GetRentacar API Support
    email: info@getrentacar.com
  license:
    name: Proprietary
servers:
  - url: https://getrentacar.com
    description: Production
  - url: https://test.grcbox.org
    description: Test environment
externalDocs:
  description: Developer portal
  url: https://getrentacar.com/api/v302/docs/index
tags:
  - name: Setup
    description: Integration bootstrap and localization dictionaries
  - name: Vehicle catalog
    description: Public vehicle reference data
  - name: Vehicles
    description: Authenticated vehicle inventory management
  - name: Extras
    description: Optional paid services attached to vehicles
paths:
  /api/v302/setup:
    get:
      tags: [Setup]
      operationId: getSetup
      summary: Get integration setup data
      description: Returns the dictionaries needed to initialize a partner integration.
      x-docs-page: /api/v302/docs/methods/setup/index
      parameters:
        - $ref: "#/components/parameters/SegmentIdOptional"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/currencies:
    get:
      tags: [Setup]
      operationId: listCurrencies
      summary: List currencies
      x-docs-page: /api/v302/docs/methods/setup/currencies
      responses:
        "200":
          description: Supported currencies
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CurrencyListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/locales:
    get:
      tags: [Setup]
      operationId: listLocales
      summary: List locales
      x-docs-page: /api/v302/docs/methods/setup/locales
      responses:
        "200":
          description: Supported locales
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LocaleListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/segments:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleSegments
      summary: List vehicle segments
      x-docs-page: /api/v302/docs/methods/vehicle/options/segments
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/brands:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleBrands
      summary: List brands for a vehicle segment
      x-docs-page: /api/v302/docs/methods/vehicle/options/brands
      parameters:
        - $ref: "#/components/parameters/SegmentIdOptional"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/models:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleModels
      summary: List models for a brand
      x-docs-page: /api/v302/docs/methods/vehicle/options/models
      parameters:
        - $ref: "#/components/parameters/BrandId"
        - $ref: "#/components/parameters/SegmentIdOptional"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/equipments:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleEquipments
      summary: List equipment variants for a model
      x-docs-page: /api/v302/docs/methods/vehicle/options/equipments
      parameters:
        - $ref: "#/components/parameters/ModelId"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/years_of_issue:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleYears
      summary: List available years of manufacture
      x-docs-page: /api/v302/docs/methods/vehicle/options/years_of_issue
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
  /api/v302/vehicles/classes_or_types:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleClasses
      summary: List vehicle classes or types
      x-docs-page: /api/v302/docs/methods/vehicle/options/classes_or_types
      parameters:
        - $ref: "#/components/parameters/SegmentIdRequired"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/transmissions:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleTransmissions
      summary: List transmission types
      x-docs-page: /api/v302/docs/methods/vehicle/options/transmissions
      parameters:
        - $ref: "#/components/parameters/SegmentIdRequired"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/benefits:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleBenefits
      summary: List vehicle benefits
      x-docs-page: /api/v302/docs/methods/vehicle/options/benefits
      parameters:
        - $ref: "#/components/parameters/SegmentIdOptional"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/additional_features:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleFeatures
      summary: List additional vehicle features
      x-docs-page: /api/v302/docs/methods/vehicle/options/additional_features
      parameters:
        - $ref: "#/components/parameters/SegmentIdOptional"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/options:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleTuningOptions
      summary: List racing and tuning options
      x-docs-page: /api/v302/docs/methods/vehicle/options/tuning
      parameters:
        - $ref: "#/components/parameters/SegmentIdOptional"
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
  /api/v302/vehicles/protection_plans:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleProtectionPlans
      summary: List protection plan settings
      x-docs-page: /api/v302/docs/methods/vehicle/protection_plans
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/delivery:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleDeliveryPlaces
      summary: List delivery and return places
      x-docs-page: /api/v302/docs/methods/vehicle/delivery
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/fuel_policy:
    get:
      tags: [Vehicle catalog]
      operationId: listVehicleFuelPolicies
      summary: List fuel policies
      x-docs-page: /api/v302/docs/methods/vehicle/fuel_policy
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/distance_units:
    get:
      tags: [Vehicle catalog]
      operationId: listDistanceUnits
      summary: List distance measurement units
      x-docs-page: /api/v302/docs/methods/vehicle/options/distance_units
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/payment_systems:
    get:
      tags: [Vehicle catalog]
      operationId: listPaymentSystems
      summary: List payment systems
      x-docs-page: /api/v302/docs/methods/vehicle/options/payment_systems
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/payment/types:
    get:
      tags: [Vehicle catalog]
      operationId: listPaymentTypes
      summary: List accepted payment types
      x-docs-page: /api/v302/docs/methods/vehicle/options/payment_types
      parameters:
        - $ref: "#/components/parameters/LocaleId"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/list:
    get:
      tags: [Vehicles]
      operationId: listVehicles
      summary: List account vehicles
      x-docs-page: /api/v302/docs/methods/vehicle/list
      security:
        - bearerAuth: []
      parameters:
        - $ref: "#/components/parameters/UserId"
        - $ref: "#/components/parameters/LocaleIdRequired"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Offset"
      responses:
        "200":
          $ref: "#/components/responses/PaginatedResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
  /api/v302/vehicles/list/id:
    get:
      tags: [Vehicles]
      operationId: getVehicle
      summary: Get a vehicle by ID
      x-docs-page: /api/v302/docs/methods/vehicle/id
      security:
        - bearerAuth: []
      parameters:
        - $ref: "#/components/parameters/VehicleId"
        - $ref: "#/components/parameters/LocaleIdRequired"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/create:
    post:
      tags: [Vehicles]
      operationId: createVehicle
      summary: Create a vehicle
      x-docs-page: /api/v302/docs/methods/vehicle/create
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/VehicleCreateRequest"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/VehicleCreateRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
  /api/v302/vehicles/edit:
    post:
      tags: [Vehicles]
      operationId: updateVehicle
      summary: Update a vehicle
      description: |
        Supply `vehicle_id` together with every field that should remain populated.
        The legacy endpoint accepts partial input but may replace omitted values.
      x-docs-page: /api/v302/docs/methods/vehicle/update
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/VehicleUpdateRequest"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/VehicleUpdateRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/remove:
    post:
      tags: [Vehicles]
      operationId: removeVehicle
      summary: Remove a vehicle
      x-docs-page: /api/v302/docs/methods/vehicle/remove
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: false
              required: [user_id, vehicle_id]
              properties:
                user_id:
                  $ref: "#/components/schemas/Identifier"
                vehicle_id:
                  $ref: "#/components/schemas/Identifier"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/upload:
    post:
      tags: [Vehicles]
      operationId: uploadVehicleImages
      summary: Upload vehicle images
      x-docs-page: /api/v302/docs/methods/vehicle/upload_images
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              additionalProperties: false
              required: [user_id, file]
              properties:
                user_id:
                  $ref: "#/components/schemas/Identifier"
                file:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    format: binary
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
  /api/v302/vehicles/extras/options:
    get:
      tags: [Extras]
      operationId: listExtraOptions
      summary: List available extra option types
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/options
      parameters:
        - $ref: "#/components/parameters/LocaleIdRequired"
      responses:
        "200":
          $ref: "#/components/responses/ListResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
  /api/v302/vehicles/extras/list:
    get:
      tags: [Extras]
      operationId: listExtras
      summary: List account extras
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/list
      security:
        - bearerAuth: []
      parameters:
        - $ref: "#/components/parameters/LocaleIdRequired"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Offset"
      responses:
        "200":
          $ref: "#/components/responses/PaginatedResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
  /api/v302/vehicles/extras/list/id:
    get:
      tags: [Extras]
      operationId: getExtra
      summary: Get an extra by ID
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/id
      security:
        - bearerAuth: []
      parameters:
        - $ref: "#/components/parameters/ExtraId"
        - $ref: "#/components/parameters/LocaleIdRequired"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/extras/create:
    post:
      tags: [Extras]
      operationId: createExtra
      summary: Create an account extra
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/create
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/ExtraCreateRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
  /api/v302/vehicles/extras/update:
    post:
      tags: [Extras]
      operationId: updateExtra
      summary: Update an account extra
      description: |
        Replacement-style legacy operation. Send the current option, price,
        currency, period, and quantity so omitted values are not cleared.
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/update
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/ExtraUpdateRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/extras/switch:
    post:
      tags: [Extras]
      operationId: switchExtra
      summary: Toggle an extra
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/switch
      security:
        - bearerAuth: []
      requestBody:
        $ref: "#/components/requestBodies/ExtraIdRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/v302/vehicles/extras/delete:
    post:
      tags: [Extras]
      operationId: deleteExtra
      summary: Delete an extra
      x-docs-page: /api/v302/docs/methods/vehicle/options/extras/delete
      security:
        - bearerAuth: []
      requestBody:
        $ref: "#/components/requestBodies/ExtraIdRequest"
      responses:
        "200":
          $ref: "#/components/responses/SuccessfulResponse"
        "400":
          $ref: "#/components/responses/ValidationError"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key issued by GetRentacar
  parameters:
    LocaleId:
      name: locale_id
      in: query
      required: false
      description: Response locale identifier. Use 40 for English.
      schema:
        type: integer
        example: 40
    LocaleIdRequired:
      name: locale_id
      in: query
      required: true
      description: Response locale identifier. Use 40 for English.
      schema:
        type: integer
        example: 40
    SegmentIdOptional:
      name: segment_id
      in: query
      required: false
      description: Vehicle segment identifier. Defaults to cars.
      schema:
        type: integer
        default: 1
        example: 1
    SegmentIdRequired:
      name: segment_id
      in: query
      required: true
      description: Vehicle segment identifier
      schema:
        type: integer
        example: 1
    BrandId:
      name: brand_id
      in: query
      required: true
      description: Vehicle brand identifier
      schema:
        type: integer
        example: 31111
    ModelId:
      name: model_id
      in: query
      required: true
      description: Vehicle model identifier
      schema:
        type: integer
        example: 23205
    UserId:
      name: user_id
      in: query
      required: true
      description: Account owner identifier associated with the API key
      schema:
        $ref: "#/components/schemas/Identifier"
    VehicleId:
      name: vehicle_id
      in: query
      required: true
      description: Vehicle identifier
      schema:
        $ref: "#/components/schemas/Identifier"
    ExtraId:
      name: extra_id
      in: query
      required: true
      description: Extra identifier
      schema:
        $ref: "#/components/schemas/Identifier"
    Limit:
      name: limit
      in: query
      required: false
      description: Maximum number of items returned
      schema:
        type: integer
        minimum: 1
        default: 15
        example: 15
    Offset:
      name: offset
      in: query
      required: false
      description: Legacy page offset
      schema:
        type: integer
        minimum: 0
        default: 0
        example: 0
  requestBodies:
    ExtraIdRequest:
      required: true
      content:
        application/x-www-form-urlencoded:
          schema:
            type: object
            additionalProperties: false
            required: [extra_id]
            properties:
              extra_id:
                $ref: "#/components/schemas/Identifier"
  responses:
    SuccessfulResponse:
      description: Successful response
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FlexibleResponse"
    ListResponse:
      description: Successful list response
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ListResponse"
    PaginatedResponse:
      description: Successful paginated response
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PaginatedResponse"
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
          example:
            is_success: false
            errors:
              message: validation error
              code: 400
    Unauthorized:
      description: API key is missing, invalid, or cannot access the requested resource
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    NotFound:
      description: Requested resource was not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
  schemas:
    Identifier:
      type: integer
      minimum: 1
      example: 123
    Meta:
      type: object
      additionalProperties: true
      properties:
        method:
          type: string
          example: GET
        path:
          type: string
          example: /api/v302/vehicles/segments
        vars:
          type: object
          additionalProperties: true
        api_version:
          type: integer
          example: 302
    FlexibleResponse:
      type: object
      additionalProperties: true
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
    ListResponse:
      type: object
      additionalProperties: true
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        list:
          type: array
          items:
            type: object
            additionalProperties: true
    PaginatedResponse:
      type: object
      additionalProperties: true
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        total:
          type: integer
          minimum: 0
        per_page:
          type: integer
          minimum: 1
        current_page:
          type: integer
          minimum: 0
        limit:
          type: integer
          minimum: 1
        last_page:
          type: integer
          minimum: 0
        data:
          type: array
          items:
            type: object
            additionalProperties: true
    ErrorResponse:
      type: object
      additionalProperties: true
      properties:
        is_success:
          type: boolean
          const: false
        errors:
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
    Currency:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        code:
          type: string
          example: EUR
        symbol:
          type: string
          example: €
    CurrencyListResponse:
      type: object
      additionalProperties: true
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        list:
          type: array
          items:
            $ref: "#/components/schemas/Currency"
    Locale:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
          example: 40
        name:
          type: string
          example: English
        code:
          type: string
          example: en
    LocaleListResponse:
      type: object
      additionalProperties: true
      properties:
        meta:
          $ref: "#/components/schemas/Meta"
        list:
          type: array
          items:
            $ref: "#/components/schemas/Locale"
    VehicleFields:
      type: object
      additionalProperties: true
      properties:
        user_id:
          $ref: "#/components/schemas/Identifier"
        locale_id:
          type: integer
          example: 40
        pickup_location:
          type: string
          example: Nîmes, France
        vehicle_class_id:
          type: integer
          example: 0
        vehicle_model_id:
          type: integer
          example: 23205
        vehicle_segment_id:
          type: integer
          example: 1
        vehicle_year_of_issue_id:
          type: integer
          example: 2024
        vehicle_vin:
          type: string
          example: WDB12345678901234
        vehicle_odometer:
          type: string
          example: "25000"
        vehicle_reg_number_country:
          type: integer
          example: 8
        vehicle_reg_number:
          type: string
          example: ABC123
        vehicle_activity:
          type: integer
          enum: [0, 1]
          example: 1
        price_per_day:
          type: integer
          minimum: 0
          example: 80
        price_per_3days:
          type: integer
          minimum: 0
          example: 75
        price_per_week:
          type: integer
          minimum: 0
          example: 70
        price_per_14days:
          type: integer
          minimum: 0
          example: 65
        vehicle_currency_id:
          type: integer
          example: 0
        vehicle_protection_plans_insurance_price:
          type: integer
          minimum: 0
          example: 15
        vehicle_protection_plans_insurance_exclude_security_deposit:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_no_deposit:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_third_party_insurance:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_deposit_price:
          type: integer
          minimum: 0
          example: 500
        vehicle_protection_plans_deposit_pay_cash:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_deposit_pay_debit_card:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_deposit_pay_credit_card:
          type: integer
          enum: [0, 1]
        vehicle_protection_plans_deposit_return_period_cash:
          type: integer
        vehicle_protection_plans_deposit_return_period_card:
          type: integer
        vehicle_protection_plans_cdw1_price_day:
          type: integer
          minimum: 0
        vehicle_protection_plans_cdw1_franchise:
          type: integer
          minimum: 0
        vehicle_protection_plans_cdw1_security_deposit:
          type: integer
          minimum: 0
        vehicle_protection_plans_cdw2_price_day:
          type: integer
          minimum: 0
        vehicle_protection_plans_cdw2_franchise:
          type: integer
          minimum: 0
        vehicle_protection_plans_cdw2_security_deposit:
          type: integer
          minimum: 0
        vehicle_protection_plans_tire_windshield_price_day:
          type: integer
          minimum: 0
        vehicle_protection_plans_theft_price_day:
          type: integer
          minimum: 0
        vehicle_protection_plans_interior_price_day:
          type: integer
          minimum: 0
        vehicle_protection_plans_roadside_price_day:
          type: integer
          minimum: 0
        vehicle_tuning_text:
          type: string
          maxLength: 5000
        vehicle_delivery_address_fixed_place:
          type: array
          items:
            type: integer
        vehicle_delivery_address_fixed_location:
          type: array
          items:
            type: string
        vehicle_delivery_address_fixed_price:
          type: array
          items:
            type: integer
            minimum: 0
        vehicle_delivery_return_fixed_place:
          type: array
          items:
            type: integer
        vehicle_delivery_return_fixed_location:
          type: array
          items:
            type: string
        vehicle_delivery_return_fixed_price:
          type: array
          items:
            type: integer
            minimum: 0
        vehicle_distance_unit_id:
          type: integer
          example: 1
        vehicle_distance_included:
          type: integer
          minimum: 0
          example: 250
        vehicle_surcharge_for_excess:
          type: integer
          minimum: 0
          example: 1
        price_surcharge_over_time:
          type: integer
          minimum: 0
          example: 20
        vehicle_images:
          type: array
          items:
            type: integer
        vehicle_minimal_renting_period:
          type: integer
          minimum: 1
          example: 1
        vehicle_minimal_age_to_rent:
          type: integer
          minimum: 18
          example: 21
        vehicle_drivers_experience:
          type: integer
          minimum: 0
          example: 2
        price_subscription_month:
          type: integer
          minimum: 0
        price_subscription_3month:
          type: integer
          minimum: 0
        price_subscription_6month:
          type: integer
          minimum: 0
        price_subscription_year:
          type: integer
          minimum: 0
        price_subscription_2years:
          type: integer
          minimum: 0
        price_subscription_3years:
          type: integer
          minimum: 0
        vehicle_description:
          type: string
          maxLength: 5000
        vehicle_benefits_id:
          type: array
          items:
            type: integer
        vehicle_options_id:
          type: array
          items:
            type: integer
        vehicle_payment_types:
          type: array
          items:
            type: integer
        vehicle_availability_calendar:
          type: string
          description: Comma-separated dates in DD.MM.YYYY format
          example: 25.12.2026,26.12.2026
        vehicle_passenger_capacity:
          type: integer
          minimum: 1
          example: 5
        vehicle_luggage_capacity:
          type: integer
          minimum: 0
          example: 2
        vehicle_extras:
          type: array
          items:
            type: integer
        vehicle_fuel_policy:
          type: integer
          example: 1
        vehicle_booking_lead_time:
          type: integer
          minimum: 1
          maximum: 3
          example: 1
    VehicleCreateRequest:
      allOf:
        - $ref: "#/components/schemas/VehicleFields"
        - type: object
          required:
            - user_id
            - pickup_location
            - vehicle_class_id
            - vehicle_model_id
            - vehicle_segment_id
            - vehicle_year_of_issue_id
            - vehicle_vin
            - vehicle_odometer
            - vehicle_reg_number_country
            - vehicle_reg_number
            - vehicle_activity
            - price_per_day
            - price_per_3days
            - price_per_week
            - price_per_14days
            - vehicle_distance_included
            - vehicle_surcharge_for_excess
            - price_surcharge_over_time
            - vehicle_minimal_renting_period
            - vehicle_minimal_age_to_rent
            - vehicle_drivers_experience
            - vehicle_passenger_capacity
            - vehicle_luggage_capacity
            - vehicle_protection_plans_insurance_price
            - vehicle_protection_plans_no_deposit
            - vehicle_protection_plans_third_party_insurance
            - vehicle_protection_plans_deposit_price
            - vehicle_fuel_policy
    VehicleUpdateRequest:
      allOf:
        - $ref: "#/components/schemas/VehicleCreateRequest"
        - type: object
          required: [vehicle_id]
          properties:
            vehicle_id:
              $ref: "#/components/schemas/Identifier"
    ExtraFields:
      type: object
      additionalProperties: true
      properties:
        option_id:
          type: integer
          example: 20
        quantity:
          type: integer
          minimum: 1
          example: 1
        price:
          type: integer
          minimum: 0
          example: 25
        currency_id:
          type: integer
          example: 0
        period:
          type: integer
          enum: [1, 2]
          description: 1 is per day; 2 is per trip.
        extra_quantity:
          type: integer
          minimum: 1
          maximum: 10
          default: 1
    ExtraCreateRequest:
      allOf:
        - $ref: "#/components/schemas/ExtraFields"
        - type: object
          required: [option_id, quantity, price, currency_id, period]
    ExtraUpdateRequest:
      allOf:
        - $ref: "#/components/schemas/ExtraFields"
        - type: object
          required: [extra_id, option_id, price, currency_id, period, extra_quantity]
          properties:
            extra_id:
              $ref: "#/components/schemas/Identifier"
