openapi: 3.0.0
info:
  title: rca-qa.api.lifeishard.ro
  description: >-
    RCA Api documentation <br><br> <a
    href='https://rca-qa.api.lifeishard.ro/changelog'
    target='_blank'>Changelog</a>
  contact:
    email: api.support@lifeishard.ro
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.4'
servers:
  - url: https://rca.api.lifeishard.ro
    description: Production server
  - url: https://rca-qa.api.lifeishard.ro
    description: Development server
paths:
  /vehicle:
    get:
      tags:
        - Vehicle
      summary: Get a car by license plate or VIN
      operationId: c862c576f5de125fa51343f13d38d904
      parameters:
        - name: licensePlate
          in: query
          description: The license plate of the car, required if vin is not provided
          schema:
            type: string
        - name: vin
          in: query
          description: The VIN of the car, required if licensePlate is not provided
          schema:
            type: string
        - name: Token
          in: header
          description: Authorization token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarApiResponseData'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /company/{taxId}:
    get:
      tags:
        - Company
      summary: Get company details by tax id
      operationId: 56a88ef92677123699c5b857bdf0d5c3
      parameters:
        - name: taxId
          in: path
          description: The tax id of the company, required
          required: true
          schema:
            type: string
        - name: Token
          in: header
          description: Authorization token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyResponseData'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /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:
                  error:
                    type: boolean
                    example: 'false'
                  status:
                    type: number
                    example: '200'
                  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 countries
      operationId: 22c15f2c1e8e20cd4bfb2505cf06b275
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of countries
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: boolean
                    example: 'false'
                  status:
                    type: number
                    example: '200'
                  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'
  /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/Response400InputValidation'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '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
        - name: withDirectCompensation
          in: query
          description: |-
            Download offer with or without direct compensation included.
                 * Default value is without direct compensation.
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Offer PDF file
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      files:
                        type: array
                        items:
                          $ref: '#/components/schemas/File'
                    type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '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:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/Policy'
                      - properties:
                          files:
                            type: array
                            items:
                              $ref: '#/components/schemas/File'
                        type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '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/Response400InputValidation'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '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:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/Policy'
                      - properties:
                          files:
                            type: array
                            items:
                              $ref: '#/components/schemas/File'
                        type: object
                type: object
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /product:
    get:
      tags:
        - ProductList
      summary: Get a list of all products
      operationId: 8c950340763771577b31044f17b5598c
      parameters:
        - name: Token
          in: header
          description: Authorization token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProductResponseData'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /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:
    CarApiResponseData:
      title: CarApiResponseData
      description: Car response data
      properties:
        brand:
          type: string
          example: VOLVO
        model:
          type: string
          example: C
        commercialModel:
          type: string
          example: XC90
        color:
          type: string
          example: NEGRU
        fuelType:
          type: string
          example: diesel
        vehicleType:
          type: string
          example: M1G
        nationalVehicleType:
          type: string
          example: AUTOTURISM
        vin:
          type: string
          example: string
        licensePlate:
          type: string
          example: string
        identification:
          type: string
          example: 'null'
        engineDisplacement:
          type: integer
          example: '2401'
        enginePower:
          type: number
          example: '136'
        totalWeight:
          type: number
          example: '2560'
        yearOfConstruction:
          type: number
          example: '2005'
        seats:
          type: number
          example: '5'
        seatsStanding:
          type: number
          example: 'null'
        firstRegistration:
          type: string
          example: '2024-06-19'
        currentRegistration:
          type: string
          example: '2024-06-19'
        endOfCurrentRegistration:
          type: string
          example: '2024-06-19'
        registrationType:
          type: string
          example: recorded
        updatedAt:
          type: string
          example: '2024-06-19'
      type: object
    CompanyResponseData:
      title: CompanyResponseData
      description: Company response data
      properties:
        caenCode:
          type: string
          example: '1234'
        businessName:
          type: string
          example: Company Example SRL
        isLegalForm:
          type: boolean
          example: 'true'
        email:
          type: string
          example: example@gmail.com
        mobileNumber:
          type: string
          example: '1234'
        taxId:
          type: string
          example: '1234'
        address:
          $ref: '#/components/schemas/Address'
      type: object
    ApiQuotationRequest:
      title: ApiQuotationRequest
      description: Offer request
      required:
        - provider
        - product
      properties:
        provider:
          required:
            - organization
            - authentication
          properties:
            organization:
              $ref: '#/components/schemas/ProviderOrg'
            authentication:
              $ref: '#/components/schemas/Authentication'
          type: object
        product:
          required:
            - motor
            - policyholder
            - vehicle
          properties:
            motor:
              $ref: '#/components/schemas/Motor'
            policyholder:
              $ref: '#/components/schemas/Person'
            vehicle:
              $ref: '#/components/schemas/Vehicle'
            additionalData:
              anyOf:
                - $ref: '#/components/schemas/AllianzRCAQuotationRequest'
                - $ref: '#/components/schemas/AsiromRCAQuotationRequest'
                - $ref: '#/components/schemas/GeneraliRCAQuotationRequest'
                - $ref: '#/components/schemas/OmniasigRCAQuotationRequest'
                - $ref: '#/components/schemas/GraweRCAQuotationRequest'
                - $ref: '#/components/schemas/HellasDirectRCAQuotationRequest'
          type: object
      type: object
    ApiPolicyRequest:
      title: ApiPolicyRequest
      description: Policy issuance request
      required:
        - offerId
        - payment
      properties:
        offerId:
          type: integer
          example: '23'
        includeDirectCompensation:
          type: boolean
          example: 'false'
        payment:
          $ref: '#/components/schemas/Payment'
        additionalData:
          description: If the product does not exist in the list, this field is ignored.
          anyOf:
            - $ref: '#/components/schemas/GeneraliRCATransformOfferRequest'
      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
        generatePaymentLink:
          description: >-
            Generate a payment link for the offer.<br><b>Default:
            false</b><br><br>*❗❗ Note:* This field is only available for
            specific products. Please check the manual for more information.
          type: boolean
          example: 'false'
        webhookLink:
          description: >-
            Webhook link where notifications regarding a policy will be
            sent.<br><br>*❗❗ Note:* This field is only available for specific
            products. Please check the manual for more information.
          type: string
          example: https://domain.com/webhook/example
      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'
        drivingLicense:
          $ref: '#/components/schemas/DrivingLicense'
        address:
          $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:
        - 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'
        isNew:
          description: 'Indicates if the vehicle is new. <strong>Default: false</strong>'
          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'
        bonusMalusClass:
          type: string
          enum:
            - M8
            - M7
            - M6
            - M5
            - M4
            - M3
            - M2
            - M1
            - B0
            - B1
            - B2
            - B3
            - B4
            - B5
            - B6
            - B7
            - B8
          example: B2
        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'
        directCompensation:
          properties:
            providerOfferCode:
              type: string
              example: DC01230123
            premiumAmount:
              description: >-
                Gross premium amount for direct compensation defined in the
                currency returned in `currency` field
              type: number
              example: '89'
            commissionValue:
              description: >-
                Commission value defined in the currency returned in `currency`
                field
              type: number
              example: '6.23'
            commissionPercent:
              description: The percentage value of the commission
              type: number
              example: '7'
            paymentLink:
              description: >-
                Link used to access a payment processor (apears only if
                configured by developer and `product.motor.generatePaymentLink`
                set to `true`)
              type: string
              example: paymeny-url.com
            installments:
              description: >-
                Installment details for the direct compensation (apears only if
                configured by developer and `product.motor.generatePaymentLink`
                set to `true`)
              type: array
              items:
                $ref: '#/components/schemas/Installment'
          type: object
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
        greenCardExclusions:
          type: string
          example: RU, MD
        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
        paymentLink:
          description: >-
            Link used to access a payment processor (apears only if configured
            by developer and `product.motor.generatePaymentLink` set to `true`)
          type: string
          example: paymeny-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'
      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:
            - allianz
            - asirom
            - axeria
            - eazy_insure
            - generali
            - grawe
            - groupama
            - hellas_nextins
            - hellas_autonom
            - omniasig
            - dallbogg
          example: allianz
      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
    ProductResponseData:
      title: ProductResponseData
      description: Product response data
      properties:
        insurer:
          type: string
          example: allianz
        name:
          type: string
          example: rca
        slug:
          type: string
          example: rca
        termsAndConditions:
          type: string
          example: https://example.com
        productInformationDocument:
          type: string
          example: https://example.com
      type: object
    AllianzRCAQuotationRequest:
      properties:
        product:
          properties:
            motor:
              properties:
                hasCasco:
                  description: Default it is considered `false`
                  type: boolean
                  example: 'true'
              type: object
            coordinatorId:
              description: From the issurer
              type: number
              example: '76241'
            recommenderTaxId:
              description: CNP
              type: string
              example: '1900105125781'
            protocolId:
              description: From the issurer
              type: number
              example: '222'
            extraCoverage:
              description: Default it is considered `false`
              type: boolean
              example: 'true'
            isAcquiredFromRomanianDealer:
              description: Default it is considered `false`
              type: boolean
              example: 'true'
          type: object
      type: object
    AsiromRCAQuotationRequest:
      properties:
        conventionNumber:
          type: number
          example: '1'
        previousBonusMalus:
          type: string
          enum:
            - M8
            - M7
            - M6
            - M5
            - M4
            - M3
            - M2
            - M1
            - B0
            - B1
            - B2
            - B3
            - B4
            - B5
            - B6
            - B7
            - B8
          example: B7
        previousDamageNumber:
          type: number
          example: '123'
        communicationChannel:
          description: Offer will be sent using specified communication channel
          type: string
          enum:
            - email
            - broker
          example: email
        partnershipAuctionAgreement:
          properties:
            policyType:
              type: string
              enum:
                - Auction
                - Leasing and partnerships
                - Simple
              example: Licitatie
            leasingType:
              type: string
              enum:
                - Financial leasing
                - Operational leasing
                - Other partnerships
              example: Leasing financiar
            auctionNumber:
              type: string
              example: LX111
            isPartnership:
              type: boolean
              example: 'false'
            partnershipNumber:
              type: string
              example: X112
          type: object
      type: object
    GeneraliRCAQuotationRequest:
      properties:
        product:
          properties:
            vehicle:
              required:
                - expirationDatePti
              properties:
                expirationDatePti:
                  description: Expiry date of PTI (periodic technical inspection)
                  type: string
                  format: date
                  example: '2023-09-21'
                isOwnerTransfer:
                  type: boolean
                  example: 'true'
              type: object
            bonusMalusClaimsNo:
              description: 'No of claims paid in the reference period. Default: `0`'
              type: number
              example: '0'
            bonusMalusPrevClass:
              description: 'Current class of Bonus Malus. Default: `B0`'
              type: string
              example: B0
            noYoungDriver:
              description: >-
                Declaration on own responsibility: `all drivers are over 35
                years old`. Default: `false`
              type: boolean
              example: 'true'
            blockPendingOffer:
              description: >-
                In case the offer is blocked by the insurer, setting this field
                to `false` can bypass it. Default: `true`
              type: boolean
              example: 'true'
          type: object
        rafCode:
          description: >-
            RAF code. Must have the format RAFNNNNN (max. 10 digits) or value
            `emitere online`
          type: string
          example: RAF12345
      type: object
    GeneraliRCAPersonAdditionalData:
      properties:
        residency:
          description: 'Default: `resident in Romania`'
          type: string
          enum:
            - resident in Romania
            - resident outside Romania but within the EC
            - resident outside the EC
          example: resident in Romania
        politicallyExposed:
          description: 'Default: `no`'
          type: string
          enum:
            - 'no'
            - 'yes'
            - person with a public management function
          example: 'no'
      type: object
    GeneraliRCATransformOfferRequest:
      properties:
        product:
          properties:
            policyholder:
              $ref: '#/components/schemas/GeneraliRCAPersonAdditionalData'
            vehicle:
              properties:
                owner:
                  $ref: '#/components/schemas/GeneraliRCAPersonAdditionalData'
              type: object
          type: object
      type: object
    GraweRCAQuotationRequest:
      properties:
        product:
          properties:
            vehicle:
              properties:
                owner:
                  properties:
                    isPoliticallyExposed:
                      type: boolean
                      example: 'false'
                  type: object
                isOwnerTransfer:
                  type: boolean
                  example: 'true'
              type: object
            policyholder:
              properties:
                isPoliticallyExposed:
                  type: boolean
                  example: 'false'
              type: object
          type: object
      type: object
    HellasDirectRCAQuotationRequest:
      properties:
        vehicle:
          properties:
            purchasedNew:
              description: Determines if the vehicl was purchased new.
              type: boolean
              example: 'false'
            transferredDate:
              description: Required if purchasedNew is set to false.
              type: string
              format: date
              example: '2025-03-03'
            bodyType:
              description: Vehcile body type
              type: string
              enum:
                - CABRIO
                - COUPE
                - HATCHBACK
                - MPV
                - SUV
                - VAN
                - MINI_VAN
                - PICK_UP
                - CROSSOVER
                - SEDAN
                - STATION_WAGON
            numberOfWheels:
              description: Number of wheels
              type: number
              example: '4'
            taxableHorsePower:
              description: Taxable horsepower.
              type: number
              example: '100'
          type: object
      type: object
    OmniasigRCAQuotationRequest:
      properties:
        rafCode:
          description: Raf code
          type: string
          example: RAF12345
        product:
          properties:
            discount:
              description: Discount
              type: number
              example: '0'
            discountReason:
              description: Discount reason
              type: string
            blockPendingOffer:
              description: >-
                In case the offer is blocked by the insurer, setting this field
                to `false` can bypass it. Default: `true`
              type: boolean
              example: 'true'
            bonusMalusClaimsNo:
              description: 'No of claims paid in the reference period. Default: `0`'
              type: number
              example: '0'
            bonusMalusPrevClass:
              description: Previous class of Bonus Malus
              type: string
              example: B0
            bonusMalusCurrentClass:
              description: Current class of Bonus Malus
              type: string
              example: B0
          type: object
      type: object
  responses:
    Response400:
      description: A JSON object containing general error
      content:
        application/json:
          schema:
            properties:
              message:
                type: string
                example: Something wrong
            type: object
    Response400InputValidation:
      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:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 403
              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: ''
  - name: Vehicle
    description: ''
  - name: Company
    description: Company
  - name: ProductList
    description: ProductList
