openapi: 3.0.0
info:
  title: Assets Api
  description: Swagger Assets Api
  contact:
    email: api.support@lifeishard.ro
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.3.0
servers:
  - url: https://assets.api.lifeishard.ro
    description: Production server
  - url: https://assets-qa.api.lifeishard.ro
    description: Development server
paths:
  /nomenclature/country:
    get:
      tags:
        - Nomenclature
      summary: List of countries
      operationId: 932f578cda8bfa334022b303905f8b5f
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of countries
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        id:
                          type: string
                          example: '1'
                        name:
                          type: string
                          example: GRECIA
                        iso2:
                          type: string
                          example: GR
                        iso3:
                          type: integer
                          example: GRC
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/county:
    get:
      tags:
        - Nomenclature
      summary: List of counties
      operationId: 22c15f2c1e8e20cd4bfb2505cf06b275
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of counties
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        county_code:
                          type: string
                          example: CJ
                        name:
                          type: string
                          example: CLUJ
                        siruta:
                          type: integer
                          example: '127'
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/locality/{county_code}:
    get:
      tags:
        - Nomenclature
      summary: List of localities filtered by county code
      operationId: d93dcacadd2907931d086d38bc5066ea
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: county_code
          in: path
          description: County code
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: List of localities
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: boolean
                    example: 'false'
                  status:
                    type: number
                    example: '200'
                  data:
                    type: array
                    items:
                      properties:
                        nume:
                          type: string
                          example: CLUJ-NAPOCA
                        cod_judet:
                          type: string
                          example: CJ
                        cod_siruta:
                          type: integer
                          example: '54984'
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /package:
    get:
      tags:
        - Nomenclature
      summary: List of Packages
      operationId: 079b08d89e29ff50dc8f1cfbaca505b0
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of Packages
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        code:
                          type: string
                          example: BASIC
                        name:
                          type: string
                          example: Basic
                        description:
                          type: string
                          example: description
                        product_id:
                          type: integer
                          example: 1 (Pointer)
                        amount:
                          type: number
                          example: '10'
                        currency_id:
                          type: integer
                          example: '1'
                        status:
                          type: integer
                          example: '1'
                        amount_without_vat:
                          type: number
                          example: '8.4'
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /currency:
    get:
      tags:
        - Nomenclature
      summary: List of Currencies
      operationId: 4313912c708d45054c0877b1fba6acb2
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of Currencies
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        code:
                          type: string
                          example: dollar
                        name:
                          type: string
                          example: Dolar american
                        symbol:
                          type: string
                          example: $
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/vehicle-brand:
    get:
      tags:
        - Nomenclature
      summary: List of vehicle brands
      operationId: 0d5a759f1f234ed2b6f071acc01f67cd
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of vehicle brands
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: ABARTH
                        created_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T07:08:54.000000Z'
                        updated_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T07:08:54.000000Z'
                        deleted_at:
                          type: string
                          format: date-time
                          example: null
                          nullable: true
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/vehicle-model/{vehicle_brand_id}:
    get:
      tags:
        - Nomenclature
      summary: List of vehicle models for a given brand
      operationId: e8205e218042ca1cc1b8f0d8f2da132a
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: vehicle_brand_id
          in: path
          description: ID of the vehicle brand
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: List of vehicle models
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        id:
                          type: integer
                          example: 25711
                        name:
                          type: string
                          example: Grand Vitara
                        vehicle_brand_id:
                          type: integer
                          example: 193
                        michelin_external_code:
                          type: string
                          example: '11926'
                        created_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T07:13:35.000000Z'
                        updated_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T07:13:35.000000Z'
                        deleted_at:
                          type: string
                          format: date-time
                          example: null
                          nullable: true
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/tire-brand:
    get:
      tags:
        - Nomenclature
      summary: List of tire brands
      operationId: baa2022a009f459abe5cd2000b1b5bd9
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of tire brands
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        code:
                          type: string
                          example: michelin
                        name:
                          type: string
                          example: Michelin
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/tire-model/{tire_brand}:
    get:
      tags:
        - Nomenclature
      summary: List of tire models for a given brand
      operationId: aafdf0046574db3e381865ad0238697c
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: tire_brand
          in: path
          description: Code of the tire brand
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of tire models
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        id:
                          type: integer
                          example: 1
                        brand:
                          type: string
                          example: michelin
                        name:
                          type: string
                          example: 4X4 DIAMARIS
                        created_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T08:10:48.000000Z'
                        updated_at:
                          type: string
                          format: date-time
                          example: '2025-07-29T08:10:48.000000Z'
                        deleted_at:
                          type: string
                          format: date-time
                          example: null
                          nullable: true
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/tire-size:
    get:
      tags:
        - Nomenclature
      summary: List of tire sizes
      operationId: 3ed1723bca2fc31f67d5cf0f4489b66c
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of tire sizes
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        code:
                          type: string
                          example: R16
                        size:
                          type: integer
                          example: 16
                        name:
                          type: string
                          example: 16 inch
                      type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /offer:
    post:
      tags:
        - Products
      summary: Get a quote
      description: >-
        A quote is obtained from the insurer for the product specified in the
        request.
      operationId: getOffer
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      requestBody:
        description: JSON format body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiQuotationRequest'
      responses:
        '200':
          description: Offer response
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      provider:
                        properties:
                          organization:
                            properties:
                              businessName:
                                type: string
                                example: NUME_SAS
                            type: object
                        type: object
                      offers:
                        type: array
                        items:
                          $ref: '#/components/schemas/Offer'
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          description: Validation error
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /offer/{id}:
    get:
      tags:
        - Products
      summary: Download offer
      description: Download offer in PDF format
      operationId: getOfferPdf
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Offer identification number
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Offer PDF file
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      files:
                        type: array
                        items:
                          properties:
                            type:
                              type: string
                              example: application/pdf
                            name:
                              type: string
                              example: document.pdf
                            content:
                              type: string
                              example: JVBERi0xLjQKJcfs...
                          type: object
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          description: Validation error
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /policy:
    get:
      tags:
        - Products
      summary: Policy PDF file
      description: Retrieve policy PDF file
      operationId: getPolicyPdfBySeriesAndNumber
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: series
          in: query
          description: Policy series
          required: true
          schema:
            type: string
          example: XX/12/12
        - name: number
          in: query
          description: Policy number
          required: true
          schema:
            type: string
          example: '1234567890'
      responses:
        '200':
          description: Policy PDF file
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      files:
                        type: array
                        items:
                          properties:
                            type:
                              type: string
                              example: application/pdf
                            name:
                              type: string
                              example: document.pdf
                            content:
                              type: string
                              example: JVBERi0xLjQKJcfs...
                          type: object
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          description: Validation error
        '500':
          $ref: '#/components/responses/Response500ServerError'
    post:
      tags:
        - Products
      summary: Transform the offer into a policy.
      description: The offer is transformed into a policy based on the offer identifier.
      operationId: getPolicy
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      requestBody:
        description: JSON formatted body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiPolicyRequest'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      policies:
                        type: array
                        items:
                          $ref: '#/components/schemas/Policy'
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          description: Validation error
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /policy/{id}:
    get:
      tags:
        - Products
      summary: Download policy
      description: Download policy in PDF format
      operationId: getPolicyPdf
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Policy identification number
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Policy PDF file
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      files:
                        type: array
                        items:
                          properties:
                            type:
                              type: string
                              example: application/pdf
                            name:
                              type: string
                              example: document.pdf
                            content:
                              type: string
                              example: JVBERi0xLjQKJcfs...
                          type: object
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          description: Validation error
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /product/details:
    get:
      tags:
        - Products
      summary: Get product details
      description: >-
        Returns product details including packages. If amount and currency are
        null, the price is dynamic.
      operationId: getProductDetails
      parameters:
        - name: company
          in: query
          required: true
          schema:
            type: string
        - name: product
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Product details response
          content:
            application/json:
              schema:
                properties:
                  company:
                    type: string
                    example: allianz
                  product:
                    type: string
                    example: house_assistance
                  packages:
                    type: array
                    items:
                      properties:
                        code:
                          type: string
                          example: BASIC
                        name:
                          type: string
                          example: HSA-BASIC-2024
                        amount:
                          description: If null, price is dynamic
                          type: number
                          format: float
                          example: 199
                          nullable: true
                        currency:
                          description: If null, price is dynamic
                          type: string
                          example: RON
                          nullable: true
                      type: object
                type: object
        '404':
          description: Product not found
  /auth:
    post:
      tags:
        - Authentication
      summary: Authenticate
      description: Authenticate an account by account/password
      operationId: authPost
      parameters:
        - name: account
          in: query
          description: Account
          required: true
          schema:
            type: string
        - name: password
          in: query
          description: Password
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/ApiCoreLibAuthResponse200'
    delete:
      tags:
        - Authentication
      summary: Deautenticate
      description: Deautenticate an existing and valid auth token
      operationId: authDelete
      responses:
        '202':
          description: Deleted
    patch:
      tags:
        - Authentication
      summary: Renew token
      description: Renew an authentication token
      operationId: authPatch
      parameters:
        - name: Token
          in: header
          description: >-
            The Refresh token received from the `POST /auth` or `PATCH /auth`
            endpoint's response field name `refresh_token`.
          required: true
          schema:
            type: string
            example: Refresh [refresh_token]
          example: Refresh [refresh_token]
      responses:
        '200':
          $ref: '#/components/responses/ApiCoreLibAuthResponse200'
components:
  schemas:
    ApiPolicyRequest:
      required:
        - offerId
        - payment
      properties:
        offerId:
          type: integer
          example: 6
        payment:
          required:
            - method
            - currency
            - amount
            - date
            - documentNumber
          properties:
            method:
              type: string
              example: pos
            currency:
              type: string
              example: RON
            amount:
              type: number
              format: float
              example: 10
            date:
              type: string
              format: date
              example: '2024-10-16'
            documentNumber:
              type: string
              example: DEMO10013664
          type: object
      type: object
    ApiQuotationRequest:
      required:
        - provider
        - product
      properties:
        provider:
          required:
            - organization
            - authentication
          properties:
            organization:
              required:
                - businessName
              properties:
                businessName:
                  type: string
                  example: colonnade
              type: object
            authentication:
              required:
                - account
                - password
              properties:
                account:
                  type: string
                  example: '{{colonnade_email}}'
                password:
                  type: string
                  example: '{{colonnade_password}}'
                code:
                  type: string
                  example: ''
              type: object
          type: object
        product:
          required:
            - policyholder
            - additionalData
            - solarPanel
            - gap
            - tire
            - houseAssistance
            - digitalProtection
            - businessCyberProtection
            - extendedWarranty
          properties:
            solarPanel:
              required:
                - startDate
                - termTime
                - solarPanelItems
              properties:
                startDate:
                  type: string
                  format: date
                  example: '{{tomorrow}}'
                termTime:
                  type: integer
                  example: 12
                solarPanelItems:
                  type: array
                  items:
                    properties:
                      category:
                        type: string
                        example: Photovoltaic/Solar/Heat Pump
                      brand:
                        type: string
                        example: Tier-1 Canadian Solar 405W
                      power:
                        type: string
                        example: '3'
                      type:
                        type: string
                        example: Single-phase, Supracharge, Three-phase
                      count:
                        type: integer
                        example: 10
                      inverter:
                        properties:
                          brand:
                            type: string
                            example: Huawei SUN2000-3/5/6/8/10KTL
                        type: object
                      smartMeter:
                        properties:
                          brand:
                            type: string
                            example: Smart meter Huawei
                        type: object
                      installationDate:
                        type: string
                        format: date
                        example: '2025-01-01'
                      address:
                        $ref: '#/components/schemas/Address'
                    type: object
              type: object
            gap:
              required:
                - startDate
                - termTime
                - vehicle
              properties:
                startDate:
                  type: string
                  format: date
                  example: '{{tomorrow}}'
                termTime:
                  type: integer
                  example: 12
                vehicle:
                  required:
                    - licensePlate
                    - registrationType
                    - vin
                    - vehicleType
                    - brand
                    - model
                    - yearOfConstruction
                    - totalWeight
                    - seats
                    - usageType
                    - address
                  properties:
                    licensePlate:
                      type: string
                      example: CT96AEC
                    registrationType:
                      type: string
                      enum:
                        - registered
                        - recorded
                        - temporaryRegistered
                        - temporaryRecorded
                      example: registered
                    vin:
                      type: string
                      example: TSMLYDD1S00C4210
                    vehicleType:
                      type: string
                      enum:
                        - M1
                        - M1G
                      example: M1
                    brand:
                      type: string
                      example: Suzuki
                    model:
                      type: string
                      example: Vitara
                    yearOfConstruction:
                      type: integer
                      example: 2023
                    totalWeight:
                      type: integer
                      example: 1880
                    seats:
                      type: integer
                      example: 5
                    usageType:
                      type: string
                      enum:
                        - personal
                        - workCar
                      example: personal
                    address:
                      $ref: '#/components/schemas/Address'
                  type: object
              type: object
            tire:
              required:
                - startDate
                - termTime
                - vehicleBrand
                - vehicleModel
                - purchaseDate
                - purchasePrice
                - tireMake
                - tireModel
                - tireWidth
              properties:
                startDate:
                  type: string
                  format: date
                  example: '{{tomorrow}}'
                termTime:
                  type: integer
                  example: 12
                vehicleBrand:
                  type: string
                  example: SUZUKI
                vehicleModel:
                  type: string
                  example: Vitara
                purchaseDate:
                  type: string
                  format: date
                  example: '2025-07-29'
                purchasePrice:
                  type: integer
                  example: 6000
                tireMake:
                  type: string
                  example: michelin
                tireModel:
                  type: string
                  example: ALPIN 6
                tireWidth:
                  type: integer
                  example: 20
                dot:
                  type: string
                  example: '3719'
              type: object
            houseAssistance:
              required:
                - startDate
                - termTime
                - builtArea
                - usableArea
                - address
              properties:
                startDate:
                  type: string
                  format: date
                  example: '{{tomorrow}}'
                termTime:
                  type: integer
                  example: 12
                builtArea:
                  type: integer
                  example: 100
                usableArea:
                  type: integer
                  example: 90
                address:
                  $ref: '#/components/schemas/Address'
              type: object
            digitalProtection:
              required:
                - startDate
                - termTime
              properties:
                startDate:
                  type: string
                  format: date
                  example: '2025-09-06'
                termTime:
                  type: integer
                  example: 12
              type: object
            businessCyberProtection:
              required:
                - installmentCount
                - termTime
                - startDate
                - website
                - turnover
                - numberOfEmployees
                - numberOfComputers
                - numberOfInsuredComputers
                - numberOfServers
                - numberOfInsuredServers
                - hasFirewall
                - hasAntivirus
                - wantsEndpointSoftware
                - wantsEdrForComputers
                - wantsEdrForServers
                - insuredAmount
              properties:
                installmentCount:
                  description: Number of installments (1-4)
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                  example: 4
                termTime:
                  description: Policy term in months
                  type: integer
                  example: 12
                startDate:
                  description: Policy start date (YYYY-MM-DD)
                  type: string
                  format: date
                  example: '2025-10-06'
                website:
                  description: Company website
                  type: string
                  format: url
                  example: https://lifeishard.ro
                turnover:
                  description: Company turnover category
                  type: string
                  enum:
                    - less_than_100k
                    - less_than_500k
                    - less_than_1m
                  example: less_than_100k
                numberOfEmployees:
                  description: Number of employees (min 1)
                  type: integer
                  minimum: 1
                  example: 100
                numberOfComputers:
                  description: Total number of computers (1-25)
                  type: integer
                  maximum: 25
                  minimum: 1
                  example: 25
                numberOfInsuredComputers:
                  description: Number of insured computers (1-25)
                  type: integer
                  maximum: 25
                  minimum: 1
                  example: 1
                numberOfServers:
                  description: Total number of servers (0-100)
                  type: integer
                  maximum: 100
                  minimum: 0
                  example: 10
                numberOfInsuredServers:
                  description: Number of insured servers (0-100)
                  type: integer
                  maximum: 100
                  minimum: 0
                  example: 1
                hasFirewall:
                  description: Whether the company has a firewall
                  type: boolean
                  example: true
                hasAntivirus:
                  description: Whether the company has antivirus protection
                  type: boolean
                  example: true
                wantsEndpointSoftware:
                  description: Whether endpoint software is desired
                  type: boolean
                  example: true
                wantsEdrForComputers:
                  description: Whether EDR is desired for computers
                  type: boolean
                  example: true
                wantsEdrForServers:
                  description: Whether EDR is desired for servers
                  type: boolean
                  example: true
                insuredAmount:
                  description: Insured amount in EUR (5000-100000)
                  type: integer
                  maximum: 100000
                  minimum: 5000
                  example: 70000
              type: object
            extendedWarranty:
              required:
                - startDate
                - termTime
                - vehicle
              properties:
                startDate:
                  type: string
                  format: date
                  example: '{{tomorrow}}'
                termTime:
                  type: integer
                  example: 12
                vehicle:
                  required:
                    - licensePlate
                    - registrationType
                    - vin
                    - vehicleType
                    - brand
                    - model
                    - enginePower
                    - currentMileage
                    - usageType
                    - yearOfConstruction
                    - firstRegistration
                  properties:
                    licensePlate:
                      type: string
                      example: CT96AEC
                    registrationType:
                      type: string
                      enum:
                        - registered
                      example: registered
                    vin:
                      type: string
                      example: TSMLYDD1S00C4210
                    vehicleType:
                      type: string
                      enum:
                        - M1
                      example: M1
                    brand:
                      type: string
                      enum:
                        - Volkswagen
                        - Audi
                        - Seat
                        - Skoda
                        - Cupra
                        - Bentley
                        - Lamborghini
                        - Bugatti
                        - Porsche
                      example: Volkswagen
                    model:
                      type: string
                      example: Golf
                    enginePower:
                      type: integer
                      example: 80
                    currentMileage:
                      type: integer
                      example: 59532
                    usageType:
                      type: string
                      enum:
                        - personal
                      example: personal
                    isFirstOwner:
                      description: Whether it is the first owner of the vehicle
                      type: boolean
                      example: true
                    yearOfConstruction:
                      type: integer
                      example: 2023
                    firstRegistration:
                      type: string
                      format: date
                      example: '2025-10-20'
                    deliveryDate:
                      type: string
                      format: date
                      example: '2025-10-15'
                  type: object
              type: object
            policyholder:
              $ref: '#/components/schemas/Person'
          type: object
      type: object
    Authentication:
      required:
        - account
        - password
        - code
      properties:
        account:
          type: string
          example: '123456'
        password:
          type: string
          example: 123cuidd#
        code:
          type: string
          example: ICJ1345
      type: object
    Motor:
      required:
        - startDate
        - termTime
      properties:
        startDate:
          type: string
          format: date
          example: '2021-01-01'
        termTime:
          description: Number of months
          type: number
          maximum: 12
          minimum: 1
          example: '12'
        installmentCount:
          description: Count of yearly installments
          type: number
          enum:
            - '1'
            - '2'
            - '4'
            - '12'
          example: '1'
        commissionPercentLimit:
          description: Commission percent applied for the broker
          type: number
          example: '12'
        renewPolicy:
          description: Both fields are required if object is set.
          required:
            - series
            - number
          properties:
            series:
              type: string
              example: XX/XX/XX
            number:
              type: number
              example: '123456789'
          type: object
      type: object
    Person:
      required:
        - taxId
        - address
      properties:
        businessName:
          description: Business name (if the person is a legal entity)
          type: string
          example: Life is Hard
        companyRegistryNumber:
          description: Company registration number (if the person is a legal entity)
          type: string
          example: J12/1403/2004
        caenCode:
          description: CAEN code (if the person is a legal entity)
          type: integer
          example: '6202'
        lastName:
          description: >-
            Individual person's last name<br />Required if `businessName` is not
            present
          type: string
          example: Pop
        firstName:
          description: >-
            Individual person's first name<br />Required if `businessName` is
            not present
          type: string
          example: Vasile
        isForeignPerson:
          type: boolean
          example: 'false'
        taxId:
          description: CNP / CUI
          type: string
          example: '1910716000000'
        nationality:
          description: >-
            Required if `isForeignPerson` is `true`<br />Accepts any `iso2` code
            from nomenclature `/nomenclature/country`
          type: string
          example: RO
        citizenship:
          description: >-
            Required if `isForeignPerson` is `true`<br />Accepts any `iso2` code
            from nomenclature `/nomenclature/country`
          type: string
          example: RO
        gender:
          description: >-
            Required if `isForeignPerson` is `true`<br />`m` => male, `f` =>
            female
          type: string
          enum:
            - m
            - f
          example: m
        birthdate:
          description: Required if `isForeignPerson` is `true`
          type: string
          format: date
          example: '2021-01-01'
        email:
          type: string
          example: email@email.ro
        mobileNumber:
          type: number
          example: '0744444444'
        identification:
          $ref: '#/components/schemas/Identification'
        address:
          $ref: '#/components/schemas/Address'
        correspondenceAddress:
          $ref: '#/components/schemas/Address'
        hasDisability:
          description: A boolean parameter indicating whether the person has a disability
          type: boolean
          example: 'false'
        isRetired:
          description: A boolean parameter that indicates whether the person is retired.
          type: boolean
          example: 'false'
      type: object
    Identification:
      description: Required if the person is an individual entity.
      required:
        - idType
        - idNumber
      properties:
        idType:
          type: string
          enum:
            - CI
            - PASSPORT
          example: CI
        idNumber:
          type: string
          example: CJ123456
        issueAuthority:
          type: string
          example: SPCLEP Cluj
        issueDate:
          type: string
          format: date
          example: '2022-11-24'
      type: object
    DrivingLicense:
      required:
        - issueDate
      properties:
        issueDate:
          type: string
          format: date
          example: '2022-11-24'
      type: object
    Address:
      required:
        - county
        - city
        - cityCode
        - street
      properties:
        country:
          description: Accepts any `iso2` code from nomenclature `/nomenclature/country`
          type: string
          example: RO
        county:
          description: Accepts any `code` from nomenclature `/nomenclature/county`
          type: string
          example: CJ
        city:
          description: >-
            Accepts any `name` from nomenclature
            `/nomenclature/locality/{county_code}`
          type: string
          example: Cluj-Napoca
        cityCode:
          description: >-
            Accepts any `siruta` from nomenclature
            `/nomenclature/locality/{county_code}`
          type: number
          example: '54984'
        street:
          type: string
          example: Principala
        houseNumber:
          type: string
          example: 19-21
        building:
          type: string
          example: A1
        staircase:
          type: string
          example: '1'
        apartment:
          type: string
          example: '12'
        floor:
          type: string
          example: '3'
        postcode:
          type: string
          example: '400356'
      type: object
    Vehicle:
      required:
        - registrationType
        - vin
        - vehicleType
        - brand
        - model
        - yearOfConstruction
        - totalWeight
        - usageType
      properties:
        owner:
          $ref: '#/components/schemas/Person'
        driver:
          type: array
          items:
            $ref: '#/components/schemas/Driver'
        licensePlate:
          type: string
          example: B101XXX
        registrationType:
          type: string
          enum:
            - registered
            - recorded
            - temporaryRegistered
            - temporaryRecorded
        vin:
          type: string
        vehicleType:
          type: string
          enum:
            - M1
            - M1G
            - M2
            - M2G
            - M3
            - M3G
            - N1
            - N1G
            - N2
            - N2G
            - N3
            - N3G
            - O1
            - O2
            - O3
            - O4
            - L1e
            - L2e
            - L3e
            - L4e
            - L5e
            - L6e
            - L7e
            - T
            - C
            - R
            - S
        brand:
          type: string
        model:
          type: string
        yearOfConstruction:
          description: Max. [current year] + 1
          type: number
          minimum: 1900
        engineDisplacement:
          description: >-
            engine displacement of the vehicle (cc), not required for electric
            vehicles or trailers
          type: number
        enginePower:
          description: engine power of the vehicle (kW), not required for trailers
          type: number
        totalWeight:
          type: number
        seats:
          description: Not required for trailers
          type: number
        fuelType:
          description: Not required for trailers
          type: string
          enum:
            - diesel
            - petrol
            - electric
            - hybrid
            - lpg
        firstRegistration:
          type: string
          format: date
        usageType:
          type: string
          enum:
            - personal
            - passengerTransportation
            - taxi
            - carRental
            - drivingSchool
            - security
            - courier
            - cargoTransportation
            - distribution
        identification:
          description: Vehicle identification document (CIV in Romania)
          required:
            - idNumber
          properties:
            idNumber:
              type: string
              example: H123456
          type: object
        currentMileage:
          description: 'The current mileage of the vehicle in kilometers. (Applied: Allianz)'
          type: number
        hasMobilityModifications:
          description: >-
            A boolean parameter indicating whether the car has been modified for
            use by people with locomotor disabilities. (Applied: Allianz)
          type: boolean
          example: 'false'
        isLeased:
          type: boolean
          example: 'false'
      type: object
    Driver:
      required:
        - lastName
        - firstName
        - taxId
        - identification
      properties:
        lastName:
          type: string
          example: Pop
        firstName:
          type: string
          example: Vasile
        taxId:
          description: CNP
          type: string
          example: '1910716000000'
        identification:
          required:
            - idNumber
          properties:
            idNumber:
              type: string
              example: CJ123456
          type: object
        mobileNumber:
          type: string
          example: '0766999000'
      type: object
    Offer:
      properties:
        offerId:
          type: number
          example: '1'
        providerOfferCode:
          type: string
          example: XY01230123
        premiumAmount:
          description: >-
            Gross premium amount defined in the currency returned in `currency`
            field
          type: number
          example: '89'
        premiumAmountNet:
          description: >-
            Net premium amount defined in the currency returned in `currency`
            field
          type: number
          example: '89'
        currency:
          type: string
          example: RON
        startDate:
          type: string
          format: date
          example: '2022-09-25'
        endDate:
          type: string
          format: date
          example: '2023-09-24'
        referenceRate:
          type: number
          example: '500'
        commissionValue:
          description: >-
            Commission value defined in the currency returned in `currency`
            field
          type: number
          example: '500'
        commissionPercent:
          description: The percentage value of the commission
          type: number
          example: '7'
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
        notes:
          description: Notes related to the generated offer
          type: string
          example: RU, MD
        offerExpiryDate:
          type: string
          format: date
          example: '2023-10-20'
        pid:
          description: PID file url (filled only if configured - done by developer)
          type: string
          example: url.com
        toc:
          description: >-
            Terms And Conditions file url (filled only if configured - done by
            developer)
          type: string
          example: url.com
      type: object
    Policy:
      properties:
        provider:
          $ref: '#/components/schemas/ProviderOrg'
        policyId:
          type: number
          example: '12'
        series:
          type: string
          example: XX/XX
        number:
          type: number
          example: '243245345'
        payment:
          $ref: '#/components/schemas/ResponsePayment'
        startDate:
          type: string
          format: date
          example: '2023-07-10'
        endDate:
          type: string
          format: date
          example: '2024-07-09'
        premiumAmount:
          type: number
          example: '89'
        currency:
          type: string
          example: RON
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
        product:
          properties:
            name:
              type: string
              enum:
                - solar_panel
                - gap
                - tire
              example: solar_panel
          type: object
      type: object
    Payment:
      required:
        - method
        - currency
        - amount
        - date
        - documentNumber
      properties:
        method:
          type: string
          enum:
            - receipt
            - broker receipt
            - payment order
            - broker payment order
            - pos
          example: receipt
        currency:
          type: string
          enum:
            - RON
          example: RON
        amount:
          type: number
          example: '89'
        date:
          type: string
          format: date
          example: '2023-07-10'
        documentNumber:
          type: string
          example: AX4984
      type: object
    ProviderOrg:
      title: ProviderOrganization
      required:
        - businessName
      properties:
        businessName:
          type: string
          enum:
            - michelin
            - colonnade
            - pointer
          example: colonnade
      type: object
    ResponsePayment:
      properties:
        method:
          type: string
          example: receipt
        currency:
          type: string
          example: RON
        amount:
          type: number
          example: '89'
        date:
          type: string
          format: date
          example: '2023-07-10'
        documentNumber:
          type: string
          example: AX4984
      type: object
    Installment:
      properties:
        id:
          description: The unique identifier for the installment / Installment number
          type: number
          example: '1'
        amount:
          description: The amount of the installment
          type: number
          example: '123'
        dueDate:
          description: The due date of the installment
          type: string
          format: date
          example: '2023-06-10'
      type: object
    File:
      properties:
        type:
          type: string
          example: Offer
        name:
          type: string
          example: offer-2149be26-d38d-40e4-ad07-1ccb384aadec.pdf
        content:
          description: base64 encoded
          type: string
          example: JVBERi0xLj...
      type: object
    OfferModel:
      required:
        - account_id
        - product_id
        - status
        - input
        - output
        - ip_address
      properties:
        id:
          type: integer
          example: 1
        account_id:
          type: integer
          example: 1
        product_id:
          type: integer
          example: 1
        status:
          type: integer
          example: 0
        input:
          type: string
          example: '{}'
        output:
          type: string
          example: '{}'
        ip_address:
          type: string
          example: 127.0.0.1
        created_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
        product:
          $ref: '#/components/schemas/Product'
      type: object
    PolicyModel:
      required:
        - offer_id
        - serie
        - number
        - input
        - output
        - ip
      properties:
        id:
          type: integer
          example: 1
        offer_id:
          type: integer
          example: 1
        serie:
          type: string
          example: A123
        number:
          type: string
          example: '456789'
        receipt_serie:
          type: string
          example: B123
        receipt_number:
          type: string
          example: '987654'
        input:
          type: string
          example: '{}'
        output:
          type: string
          example: '{}'
        ip:
          type: string
          example: 127.0.0.1
        created_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
        offer:
          $ref: '#/components/schemas/Offer'
      type: object
    Product:
      required:
        - company
        - name
        - class
        - pid
        - toc
      properties:
        id:
          type: integer
          example: 1
        company:
          type: string
          example: Company Name
        name:
          type: string
          example: Product Name
        class:
          type: string
          example: Product Class
        pid:
          type: string
          example: '12345'
        toc:
          type: string
          example: Terms and Conditions
      type: object
    PaymentMethodEnum:
      description: Enum representing payment methods
      type: string
      enum:
        - pos
        - receipt
        - broker receipt
        - payment order
        - broker payment order
      example: pos
    MichelinTireAdditionalData:
      properties:
        agreements:
          properties:
            purchased4Tires:
              type: boolean
              default: true
              example: true
            customerAgreement:
              type: boolean
              default: true
              example: true
            michelinDataAgreement:
              type: boolean
              default: false
              example: false
            marketingConsent:
              type: boolean
              default: false
              example: false
          type: object
        notes:
          type: string
          example: Additional notes about the quotation
          nullable: true
      type: object
  responses:
    Response400:
      description: Validation or application error
      content:
        application/json:
          schema:
            oneOf:
              - properties:
                  error:
                    type: boolean
                    example: 'true'
                  status:
                    type: number
                    example: '400'
                  message:
                    type: string
                    example: VALIDATION_ERROR
                  data:
                    properties:
                      fieldName:
                        type: array
                        items:
                          type: string
                        example:
                          - Validation error
                    type: object
                type: object
              - properties:
                  error:
                    type: boolean
                    example: 'true'
                  status:
                    type: number
                    example: '400'
                  message:
                    type: string
                    example: ERROR_MESSAGE
                type: object
    Response401Unauthorized:
      description: Authentication & Autorization errors
      content:
        application/json:
          schema:
            properties:
              message:
                type: string
                example: Token invalid...
              code:
                type: string
                example: TOKEN_INVALID
            type: object
    Response404NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            properties:
              message:
                type: string
                example: Not Found
              code:
                type: string
                example: NOT_FOUND
            type: object
    Response500ServerError:
      description: Application / server errors
      content:
        application/json:
          schema:
            properties:
              message:
                type: string
                example: Server error
            type: object
    ApiCoreLibAuthResponse200:
      description: Auth result
      content:
        application/json:
          schema:
            properties:
              error:
                type: boolean
                example: 'false'
              status:
                type: number
                example: '200'
              data:
                properties:
                  token:
                    description: >-
                      The JSON Web Token (JWT) to be used as the `Token` header
                      value in all subsequent API requests.
                    example: '---JWT Token---'
                  expires_at:
                    description: >-
                      The expiration date and time of the JWT token, in ISO 8601
                      format.
                    example: '2021-09-03 19:41:27'
                  refresh_token:
                    description: A token used to refresh the JWT token when it expires.
                    type: string
                    example: '---Refresh Token---'
                type: object
            type: object
    Response403Forbidden:
      description: |-
        One of the following values will be returned in the `code` property:
         *  `INVALID_TOKEN`: The provided token is invalid
         *  `TOKEN_DEACTIVATED`: The token has been deactivated
         *  `TOKEN_EXPIRED`: The token has expired
         *  `NO_PERMISSION`: The account does not have permission
      content:
        application/json:
          schema:
            properties:
              correlation_id:
                type: string
                example: 0091aade-62a9-4474-a443-dc7c96d83c1d
              message:
                type: string
                example: Token expired
              code:
                type: string
                example: TOKEN_EXPIRED
            type: object
  parameters:
    HeaderToken:
      name: Token
      in: header
      description: >-
        The JWT token received from the `POST /auth` endpoint's response field
        name `token`. This should be included in the header as `Token: <JWT
        Token>`.
      required: true
      schema:
        type: string
        format: jwt
tags:
  - name: Authentication
    description: ''
  - name: Products
    description: ''
  - name: Nomenclature
    description: ''
