openapi: 3.0.0
info:
  title: rotr-qa.api.lifeishard.ro
  description: >-
    RotrApi documentation <br><br> <a
    href='http://rotr-qa.api.lifeishard.ro/changelog'
    target='_blank'>Changelog</a>
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://rotr.api.lifeishard.ro
    description: 'Production server (branch: master)'
  - url: http://rotr-qa.api.lifeishard.ro
    description: 'Development server (branch: develop)'
paths:
  /abc/rotr/pending-offer:
    post:
      tags:
        - Auxiliary methods
      summary: Get pending offer's data
      description: >-
        If an offer is pending (it needs to be approved, it needs to be
        confirmed or it is active) then this endpoint returns informations about
        it
      operationId: getPendingOffer
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      requestBody:
        description: JSON format body
        required: true
        content:
          application/json:
            schema:
              required:
                - provider
                - ean13
              properties:
                provider:
                  required:
                    - authentication
                  properties:
                    authentication:
                      $ref: '#/components/schemas/Authentication'
                  type: object
                ean13:
                  description: ean13 code of the offer from the provider's offer response
                  type: number
                  example: '3876866826729'
              type: object
      responses:
        '200':
          description: Requested offer's data
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      offerNumber:
                        type: string
                        example: ROT100345
                      ean13:
                        type: string
                        example: '3876866826729'
                      offerStatus:
                        type: string
                        example: ACTIVE
                      insured:
                        type: string
                        example: Test Test
                      issuedBy:
                        type: string
                        example: Camscape Test test@camscape.ro
                      agency:
                        type: string
                        example: SUCURSALA CENTRALA
                      startDate:
                        type: string
                        example: '2023-06-13'
                      endDate:
                        type: string
                        example: '2024-06-12'
                      issuedAt:
                        type: string
                        example: '2023-06-12T03:20:58+03:00'
                      sumInsured:
                        type: string
                        example: '10000'
                      premiumAmount:
                        type: string
                        example: '95'
                      currency:
                        type: string
                        example: EUR
                      premiumAmountRon:
                        type: number
                        example: '469.96'
                    type: object
                type: object
        '400':
          description: Error in insurer's response | Offer not found in insurer's list
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Oferta nu s-a gasit in lista primita de la asigurator
                  correlation_id:
                    type: string
                    example: 0bb2b3b1-202b-4bf1-b3bd-2736bd5afe4d
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '422':
          $ref: '#/components/responses/Response422InputValidation'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/country:
    get:
      tags:
        - Nomenclatures
      summary: List of countries
      operationId: 5be125a85101b27af76964f705123fcc
      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
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/county:
    get:
      tags:
        - Nomenclatures
      summary: List of countries
      operationId: 34c277fe7661e94ecd088ccf318557a1
      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:
                        county_code:
                          type: string
                          example: CJ
                        name:
                          type: string
                          example: CLUJ
                        siruta:
                          type: integer
                          example: '127'
                      type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/locality/{county_code}:
    get:
      tags:
        - Nomenclatures
      summary: List of localities filtered by county code
      operationId: 91c90c925243b8196dd110e3bad922b0
      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:
                  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
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /offer:
    post:
      tags:
        - Products
      summary: Generate offer
      description: Generate an offer based on the input fields
      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: PROVIDER_NAME
                            type: object
                        type: object
                      product:
                        properties:
                          name:
                            type: string
                            example: PRODUCT_NAME
                        type: object
                      offer:
                        $ref: '#/components/schemas/Offer'
                    type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          $ref: '#/components/responses/Response422InputValidation'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /offer/{id}:
    get:
      tags:
        - Products
      summary: Offer PDF file
      description: Retrive offer PDF file
      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:
                          $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'
  /offer/{id}/status:
    get:
      tags:
        - Products
      summary: Offer status query
      description: Retrieve offer status by ID
      operationId: getOfferStatus
      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 status response
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      provider:
                        properties:
                          organization:
                            properties:
                              businessName:
                                type: string
                                example: PROVIDER_NAME
                            type: object
                        type: object
                      product:
                        properties:
                          name:
                            type: string
                            example: PRODUCT_NAME
                        type: object
                      offerNumber:
                        type: string
                        example: ROT110104
                      offerStatus:
                        type: string
                        example: initialized
                      insuredName:
                        type: string
                        example: STANTON, DENESIK AND LESCH
                      offerCreationDate:
                        type: string
                        format: date
                        example: '2024-04-18'
                      insuredAmount:
                        type: number
                        example: '1000'
                      premiumAmount:
                        type: number
                        example: '35'
                      currency:
                        type: string
                        example: EUR
                      startDate:
                        type: string
                        example: '2024-05-01'
                      endDate:
                        type: string
                        example: '2025-04-30'
                    type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '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: ROT
        - 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:
                          $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: Issue offer
      description: Issuing a selected offer
      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
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '403':
          $ref: '#/components/responses/Response403Forbidden'
        '404':
          $ref: '#/components/responses/Response404NotFound'
        '422':
          $ref: '#/components/responses/Response422InputValidation'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /policy/{id}:
    get:
      tags:
        - Products
      summary: Policy PDF file
      description: Retrieve policy PDF file
      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:
                          $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'
  /nomenclature/phoenix/cmr/transported-goods:
    post:
      tags:
        - Phoenix CMR nomenclatures
      summary: List of transported goods categories for CMR
      operationId: 05e4447d24101be2ed6d03d062b4e143
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of transported goods categories for CMR
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        Id:
                          description: Transported goods category ID
                          type: number
                          example: '12'
                        GoodsType:
                          description: Transported goods category name
                          type: string
                          example: Containere
                      type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/phoenix/cmr/vehicles-makes:
    post:
      tags:
        - Phoenix CMR nomenclatures
      summary: List of vehicle makes
      operationId: 3855e3909534f4a4dd769b11297a75c1
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of vehicle makes
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        VehicleMakeId:
                          description: Vehicle make ID
                          type: number
                          example: '52'
                        MakeName:
                          description: Vehicle make name
                          type: string
                          example: Iveco
                      type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/phoenix/cmr/vehicles-types:
    post:
      tags:
        - Phoenix CMR nomenclatures
      summary: List of vehicle types
      operationId: 1d1fca0ae943c7bdcd77f4ca7cfaaf90
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of vehicle types
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        VehicleTypeId:
                          description: Vehicle type ID
                          type: number
                          example: '1'
                        VehicleType:
                          description: Vehicle type name
                          type: string
                          example: Autotractor
                      type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '500':
          $ref: '#/components/responses/Response500ServerError'
  /nomenclature/phoenix/rot/vehicles-makes:
    post:
      tags:
        - Phoenix ROT nomenclatures
      summary: List of vehicle makes
      operationId: 89879179f978056cc9d0287b2f929bfc
      parameters:
        - name: Token
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of vehicle makes
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      properties:
                        VehicleMakeId:
                          description: Vehicle make ID
                          type: number
                          example: '52'
                        MakeName:
                          description: Vehicle make name
                          type: string
                          example: Iveco
                      type: object
                type: object
        '401':
          $ref: '#/components/responses/Response401Unauthorized'
        '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:
    Authentication:
      required:
        - account
        - password
        - code
      properties:
        account:
          type: string
          example: '123456'
        password:
          type: string
          example: 123cuidd#
        code:
          type: string
          example: ICJ1345
      type: object
    Transport:
      required:
        - startDate
        - sumInsured
        - numberOfVehicles
      properties:
        startDate:
          description: 'Format: `Y-m-d`'
          type: string
          example: '2023-05-25'
        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'
        sumInsured:
          description: Sum insured
          type: number
          example: '27000'
        numberOfVehicles:
          description: Number of vehicles
          type: number
          example: '1'
        mentions:
          description: Mentions
          type: string
          example: 'Registration number: CJ59LIH'
        discount:
          description: Discount percentage
          type: number
          example: '0'
      type: object
    Person:
      required:
        - taxId
      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
        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'
      type: object
    Identification:
      required:
        - idType
        - idNumber
        - issueAuthority
        - issueDate
      properties:
        idType:
          type: string
          enum:
            - CI
            - PASSPORT
          example: CI
        idNumber:
          type: string
          example: CJ123456
        issueAuthority:
          type: string
          example: SPCLEP Cluj
        issueDate:
          type: string
          example: '2022-11-24'
      type: object
    Address:
      required:
        - county
        - city
        - cityCode
        - street
        - houseNumber
      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: number
          example: '400356'
      type: object
    Agreements:
      properties:
        gdpr:
          description: Person agrees with the European GDPR
          type: boolean
          example: 'true'
        marketing:
          description: Person agrees with marketing policies
          type: boolean
          example: 'true'
      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
          example: RON
        amount:
          type: number
          example: '89.76'
        date:
          description: 'Format: `Y-m-d`'
          type: string
          example: '2022-09-21'
        documentNumber:
          type: string
          example: XY32344
      type: object
    ResponsePayment:
      properties:
        method:
          type: string
          example: receipt
        currency:
          type: string
          example: RON
        amount:
          type: number
          example: '89.76'
        date:
          type: string
          example: '2022-09-21'
        documentNumber:
          type: string
          example: XY32344
      type: object
    PremiumRate:
      properties:
        id:
          type: number
          example: '1'
        currency:
          type: string
          example: EUR
        amount:
          type: number
          example: '23.16'
        exchangeRate:
          type: number
          example: '4.9219'
      type: object
    Installment:
      properties:
        id:
          type: number
          example: '1'
        currency:
          type: string
          example: EUR
        amount:
          type: number
          example: '23.16'
        dueDate:
          type: string
          format: date
          example: '2024-05-01'
      type: object
    Offer:
      properties:
        offerId:
          type: number
          example: '12'
        premiumAmount:
          description: Premium amount defined in the currency returned in `currency` field
          type: number
          example: '89.76'
        currency:
          type: string
          example: RON
        premiumRates:
          type: array
          items:
            $ref: '#/components/schemas/PremiumRate'
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
        payment:
          properties:
            amount:
              type: number
              example: '89.76'
            currency:
              type: string
              example: RON
          type: object
        startDate:
          type: string
          example: '2022-09-25'
        endDate:
          type: string
          example: '2023-09-24'
        productInformationDocument:
          type: string
          example: https://www.exmaple.org/pid.pdf
        termsAndConditions:
          type: string
          example: https://www.exmaple.org/toc.pdf
        notes:
          description: Notes related to the generated offer
          type: string
        providerResponse:
          type: object
      type: object
    Policy:
      properties:
        provider:
          properties:
            organization:
              properties:
                businessName:
                  type: string
                  example: PROVIDER_NAME
              type: object
          type: object
        product:
          properties:
            name:
              type: string
              example: PRODUCT_NAME
          type: object
        policyId:
          type: number
          example: '12'
        series:
          type: string
          example: RSXX
        number:
          type: number
          example: '13124'
        payment:
          $ref: '#/components/schemas/ResponsePayment'
        startDate:
          type: string
          example: '2022-09-25'
        endDate:
          type: string
          example: '2023-09-24'
        premiumAmount:
          type: number
          example: '89.76'
        currency:
          type: string
          example: RON
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
        providerResponse:
          type: object
      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
    ApiQuotationRequest:
      title: ApiQuotationRequest
      description: Request an offer
      required:
        - provider
        - product
      properties:
        provider:
          required:
            - organization
            - authentication
          properties:
            organization:
              required:
                - businessName
              properties:
                businessName:
                  type: string
                  enum:
                    - abc
                  example: PROVIDER_NAME
              type: object
            authentication:
              $ref: '#/components/schemas/Authentication'
          type: object
        product:
          required:
            - name
            - currency
            - transport
            - policyholder
          properties:
            name:
              type: string
              example: PRODUCT_NAME
            currency:
              type: string
              enum:
                - RON
                - EUR
                - USD
              example: RON
            transport:
              $ref: '#/components/schemas/Transport'
            customer:
              $ref: '#/components/schemas/Person'
            policyholder:
              oneOf:
                - $ref: '#/components/schemas/Person'
                - type: array
                  items:
                    $ref: '#/components/schemas/Person'
            additionalData:
              oneOf:
                - $ref: '#/components/schemas/AbcRotrQuotationRequest'
                - $ref: '#/components/schemas/PhoenixCmrQuotationRequest'
                - $ref: '#/components/schemas/PhoenixRotQuotationRequest'
          type: object
        agreements:
          $ref: '#/components/schemas/Agreements'
      type: object
    ApiPolicyRequest:
      title: ApiPolicyRequest
      description: Policy issuance request
      required:
        - offerId
        - payment
      properties:
        offerId:
          type: integer
          example: '23'
        payment:
          $ref: '#/components/schemas/Payment'
        payer:
          $ref: '#/components/schemas/Person'
      type: object
    AbcRotrQuotationRequest:
      properties:
        product:
          properties:
            transport:
              required:
                - sumInsuredRRA
              properties:
                sumInsuredRRA:
                  description: Limit of liability requested by the Romanian Road Authority
                  type: number
                  example: '1500'
              type: object
          type: object
      type: object
    PhoenixCmrQuotationRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/PhoenixQuotationRequest'
        - properties:
            product:
              properties:
                transport:
                  required:
                    - vehicles
                  properties:
                    insuredOtherThanLegalPerson:
                      description: >-
                        Insured other than legal entity (sole trader, individual
                        enterprise)
                      type: boolean
                    theftRisk:
                      description: Additional theft clause
                      type: boolean
                    refrigeratingAggregatesDamageRisk:
                      description: Additional clause for damage to refrigerated units
                      type: boolean
                    cabotageRisk:
                      description: >-
                        Additional clause for cabotage operations carried out in
                        EU countries
                      type: boolean
                    handlingRisk:
                      description: Additional loading/unloading operations clause
                      type: boolean
                    undeclaredVechileRisk:
                      description: >-
                        Additional clause for undeclared vehicles to the insurer
                        (per tractor unit insurance)
                      type: boolean
                    uniqueTransport:
                      description: Single Transit Insurance
                      type: boolean
                    noClaimsRenewal:
                      description: No-claims renewal
                      type: boolean
                    deductible:
                      description: Optional deductible
                      type: boolean
                    vehicleLiabilityLimitExceedsAuthority:
                      description: >-
                        One of the vehicles exceeds the liability limit of
                        150,000 Euro
                      type: boolean
                    roadRoute:
                      description: Single Transit route
                      type: string
                    otherTransportedGoods:
                      description: Goods other than those listed
                      type: string
                    containerInsuredSum:
                      description: Insured amount per container
                      type: number
                    noOfContainers:
                      description: Number of containers
                      type: number
                    transportedGoods:
                      description: Categories of transported goods
                      type: array
                      items:
                        description: >-
                          ID of transported goods category. Accepted values: any
                          `ID` from
                          `/nomenclature/phoenix/cmr/transported-goods`
                          nomenclature
                        type: integer
                        example: '1'
                    containsTractorUnits:
                      description: The fleet of insured vehicles contains tractor units.
                      type: boolean
                    vehicles:
                      type: array
                      items:
                        $ref: '#/components/schemas/PhoenixVehicle'
                  type: object
              type: object
          type: object
    PhoenixVehicle:
      required:
        - vin
        - brand
        - model
        - licensePlate
        - liabilityLimit
      properties:
        vin:
          description: Vehicle identification number
          type: string
          example: WVWZZZ1JZ1W123456
        brand:
          description: >-
            Vehicle make. Accepted values: any `MakeName` from
            `/nomenclature/phoenix/cmr/vehicles-makes` or
            `/nomenclature/phoenix/rot/vehicles-makes` nomenclature
          type: string
        model:
          description: Vehicle model
          type: string
        licensePlate:
          description: Vehicle license plate
          type: string
          example: CJ01TST
        liabilityLimit:
          description: Liability limit
          type: number
          example: '10000'
        vehicleTypeId:
          description: >-
            Vehicle type ID, used exclusively for Phoenix CMR. Accepted values:
            any `VehicleTypeId` from `/nomenclature/phoenix/cmr/vehicles-types
          type: number
          example: '1'
      type: object
    PhoenixQuotationRequest:
      properties:
        product:
          properties:
            transport:
              required:
                - issuerEmail
              properties:
                issuerEmail:
                  description: Issuer's email address
                  type: string
                  format: email
                  example: a@a.com
                eventLiabilityLimit:
                  description: Total liability limit per event
                  type: number
                transportLicenseNo:
                  description: Transport license number
                  type: string
                additionalRequests:
                  description: Additional requests
                  type: string
                previousClaims:
                  description: Claims in the last 3 years
                  type: boolean
                includeInsurerPremiumStatement:
                  description: Includes insurer's first loss statement
                  type: boolean
              type: object
          type: object
      type: object
    PhoenixRotQuotationRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/PhoenixQuotationRequest'
        - properties:
            product:
              properties:
                transport:
                  properties:
                    fixedQuota:
                      description: >-
                        Requested preferential rate (if broker has approved
                        discount range)
                      type: number
                      example: '0'
                    capitalAndReserves:
                      description: Insured's share capital + reserves
                      type: number
                      example: '0'
                    vehicles:
                      type: array
                      items:
                        $ref: '#/components/schemas/PhoenixVehicle'
                  type: object
              type: object
          type: object
  responses:
    Response422InputValidation:
      description: Validation errors
      content:
        application/json:
          schema:
            properties:
              errors:
                properties:
                  fieldName:
                    type: array
                    items:
                      type: string
                    example:
                      - Validation error
                type: object
            type: object
    Response401Unauthorized:
      description: NO_TOKEN
      content:
        application/json:
          schema:
            properties:
              message:
                type: string
                example: Token invalid...
              code:
                type: string
                example: NO_TOKEN
            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: Internal server error...
              code:
                type: string
                example: ERROR_CODE
            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: Nomenclatures
    description: General nomenclatures
  - name: Phoenix CMR nomenclatures
  - name: Phoenix ROT nomenclatures
  - name: Auxiliary methods
    description: Auxiliary methods
