openapi: 3.0.0
info:
  title: Deployed Resources
  version: 1.0.0
servers:
- url: https://gateway.europisti.gr/mtr-api
  description: Default Server.
- url: https://gateway.europisti.gr/dev/mtr-api
  description: Default sandboxed Server.
paths:
  /resources:
    get:
      operationId: resource
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications:
    get:
      operationId: listApplications
      parameters:
      - name: start
        in: query
        style: simple
        schema:
          type: integer
      - name: limit
        in: query
        style: simple
        schema:
          type: integer
      - name: lastname
        in: query
        style: simple
        schema:
          type: string
      - name: fromdate
        in: query
        style: simple
        schema:
          type: object
      - name: clientafm
        in: query
        style: simple
        schema:
          type: string
      - name: plateno
        in: query
        style: simple
        schema:
          type: string
      - name: status
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: insertApplication
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/MtrApplication'
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/template:
    get:
      operationId: getTemplateApplication
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MtrApplication'
  /resources/applications/{application}:
    get:
      operationId: getApplication
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
    put:
      operationId: updateApplication
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/MtrApplication'
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
    delete:
      operationId: cancelApplication
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/documents:
    get:
      operationId: listDocuments
      parameters:
      - name: start
        in: query
        style: simple
        schema:
          type: integer
      - name: size
        in: query
        style: simple
        schema:
          type: integer
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
    post:
      operationId: insertDocument
      parameters:
      - name: fileName
        in: query
        style: simple
        schema:
          type: string
      - name: categoryId
        in: query
        style: simple
        schema:
          type: integer
      - name: comments
        in: query
        style: simple
        schema:
          type: string
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: Content-Length
        in: header
        style: simple
        schema:
          type: number
      - name: Content-Type
        in: header
        style: simple
        schema:
          type: string
      requestBody:
        content:
          image/jpeg:
            schema:
              type: object
          image/png:
            schema:
              type: object
          image/tiff:
            schema:
              type: object
          application/pdf:
            schema:
              type: object
          text/csv:
            schema:
              type: object
          text/plain:
            schema:
              type: object
          application/zip:
            schema:
              type: object
          application/rtf:
            schema:
              type: object
          application/msword:
            schema:
              type: object
          application/vnd.openxmlformats-officedocument.wordprocessingml.document:
            schema:
              type: object
          application/vnd.ms-excel:
            schema:
              type: object
          application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
            schema:
              type: object
          application/vnd.ms-powerpoint:
            schema:
              type: object
          application/vnd.openxmlformats-officedocument.presentationml.presentation:
            schema:
              type: object
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/documents/{documentId}:
    get:
      operationId: getDocument
      parameters:
      - name: withfile
        in: query
        style: simple
        schema:
          type: integer
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
    put:
      operationId: editDocument
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
    delete:
      operationId: removeDocument
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/documents/{documentId}/image:
    get:
      operationId: getDocumentImage
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/issueCharge:
    put:
      operationId: issueCharge
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/issuePrepay:
    put:
      operationId: issuePrepay
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/notification:
    get:
      operationId: getNotification
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/applications/{application}/requestApproval:
    put:
      operationId: requestApproval
      parameters:
      - name: application
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/parameters:
    get:
      operationId: resource
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/bundleCode:
    get:
      operationId: bundleCode
      parameters:
      - name: postCode
        in: query
        style: simple
        schema:
          type: string
      - name: usageCode
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/discountCode:
    get:
      operationId: discountCode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/documentCategory:
    get:
      operationId: documentCategory
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/doyCode:
    get:
      operationId: doyCode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/jobCode:
    get:
      operationId: jobCode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/licenceType:
    get:
      operationId: licenceType
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/makeCode:
    get:
      operationId: makeCode
      parameters:
      - name: usageCode
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/makeModelCode:
    get:
      operationId: makeModelCode
      parameters:
      - name: usageCode
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/modelCode:
    get:
      operationId: modelCode
      parameters:
      - name: usageCode
        in: query
        style: simple
        schema:
          type: string
      - name: makeCode
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/nationality:
    get:
      operationId: nationality
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/personTypeCode:
    get:
      operationId: personTypeCode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/usageCode:
    get:
      operationId: usageCode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/parameters/usageSubcode:
    get:
      operationId: usageSubcode
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/policies:
    get:
      operationId: findAll
      parameters:
      - name: start
        in: query
        style: simple
        schema:
          type: integer
      - name: limit
        in: query
        style: simple
        schema:
          type: integer
      - name: lastname
        in: query
        style: simple
        schema:
          type: string
      - name: clientafm
        in: query
        style: simple
        schema:
          type: string
      - name: plateno
        in: query
        style: simple
        schema:
          type: string
      - name: status
        in: query
        style: simple
        schema:
          type: string
      - name: policyno
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/policies/{id}:
    get:
      operationId: get
      parameters:
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/policies/{id}/documents:
    get:
      operationId: listDocuments
      parameters:
      - name: start
        in: query
        style: simple
        schema:
          type: integer
      - name: size
        in: query
        style: simple
        schema:
          type: integer
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/policies/{id}/documents/{documentId}:
    get:
      operationId: getDocument
      parameters:
      - name: withfile
        in: query
        style: simple
        schema:
          type: integer
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/policies/{id}/documents/{documentId}/image:
    get:
      operationId: getDocumentImage
      parameters:
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      - name: documentId
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/policies/{id}/issueCharge:
    put:
      operationId: issueRenewalWithCharge
      parameters:
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/policies/{id}/notification:
    get:
      operationId: getNotification
      parameters:
      - name: id
        in: path
        required: true
        style: simple
        schema:
          type: number
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/quotes/bonusMalus:
    get:
      operationId: validBonusMalus
      parameters:
      - name: plateNo
        in: query
        style: simple
        schema:
          type: string
      - name: clientAfm
        in: query
        style: simple
        schema:
          type: string
      - name: manufactureYear
        in: query
        style: simple
        schema:
          type: string
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
  /resources/quotes/prices:
    get:
      operationId: resource
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
    post:
      operationId: pricing
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricingParam'
      responses:
        default:
          description: Default Response.
          content:
            application/json:
              schema:
                type: object
  /resources/tokens:
    post:
      operationId: authenticate
      requestBody:
        content:
          '*/*':
            schema:
              type: object
      responses:
        default:
          description: Default Response.
          content:
            '*/*':
              schema:
                type: object
components:
  schemas:
    Document:
      type: object
      properties:
        fileId:
          type: object
        fileName:
          type: string
        fileMime:
          type: string
        fileBlob:
          type: array
          items:
            type: object
        docCategoryId:
          type: object
        docCategoryDescr:
          type: string
        comments:
          type: string
        error:
          $ref: '#/components/schemas/MtrError'
    MtrApplication:
      type: object
      properties:
        userName:
          type: string
        id:
          type: object
        branchCode:
          type: string
        branchTitle:
          type: string
        statusCode:
          type: string
        statusTitle:
          type: string
        policyNo:
          type: string
        applicationNo:
          type: string
        applicationDate:
          type: object
        agentCode:
          type: string
        agentTitle:
          type: string
        commisionAgentCode:
          type: string
        commisionAgentTitle:
          type: string
        serviceAgentCode:
          type: string
        serviceAgentTitle:
          type: string
        client:
          $ref: '#/components/schemas/MtrPerson'
        insured:
          $ref: '#/components/schemas/MtrPerson'
        drivers:
          type: object
        pawnerTitle:
          type: string
        policyIssueDate:
          type: object
        policyStartDate:
          type: object
        policyEndDate:
          type: object
        policyAnniversaryDate:
          type: object
        payFrequencyInMonths:
          type: object
        rateCode:
          type: string
        rateTitle:
          type: string
        bundleCode:
          type: string
        bundleTitle:
          type: string
        extraCovers:
          type: string
        regionPostcode:
          type: string
        regionCode:
          type: string
        regionName:
          type: string
        plateNo:
          type: string
        factoryName:
          type: string
        usageCode:
          type: string
        usageTitle:
          type: string
        usageSubcode:
          type: string
        bonusMalus:
          type: object
        taxableHp:
          type: object
        engineCc:
          type: object
        powerInKw:
          type: object
        insuredValue:
          type: object
        fuelType:
          type: object
        fuelTitle:
          type: string
        autonomousType:
          type: object
        autonomousTitle:
          type: string
        leaseType:
          type: object
        leaseTypeTitle:
          type: string
        vehicleSeats:
          type: object
        manufactureYear:
          type: object
        driverName:
          type: string
        driverBirthYear:
          type: object
        driverLicenceType:
          type: string
        driverLicenceTitle:
          type: string
        driverLicenceDate:
          type: object
        frameNumber:
          type: string
        makeCode:
          type: string
        makeTitle:
          type: string
        modelCode:
          type: string
        modelTitle:
          type: string
        secondOwner:
          type: string
        discountCodes:
          type: string
        contactwayCode:
          type: string
        contactwayTitle:
          type: string
        comments:
          type: string
        covers:
          type: object
        discounts:
          type: object
        pendingMessages:
          type: object
        applicationMessages:
          type: object
        actionOutcome:
          $ref: '#/components/schemas/MtrError'
    MtrError:
      type: object
      properties:
        no:
          type: string
        message:
          type: string
    MtrPerson:
      type: object
      properties:
        id:
          type: object
        lastName:
          type: string
        firstName:
          type: string
        fathersName:
          type: string
        addressStreet:
          type: string
        addressCity:
          type: string
        addressPostcode:
          type: string
        phone:
          type: string
        mobile:
          type: string
        email:
          type: string
        jobCode:
          type: string
        jobTitle:
          type: string
        birthdate:
          type: object
        licenceDate:
          type: object
        genderCode:
          type: string
        genderTitle:
          type: string
        afm:
          type: string
        doyCode:
          type: string
        doyTitle:
          type: string
        identityNo:
          type: string
        identityDate:
          type: object
        amka:
          type: string
        passport:
          type: string
        citizenship:
          type: string
        personTypeCode:
          type: string
        personTypeTitle:
          type: string
        licenceType:
          type: string
        licenceTitle:
          type: string
        personType:
          type: string
    PricingParam:
      type: object
      properties:
        agentCode:
          type: string
        plateNo:
          type: string
        clientAfm:
          type: string
        manufactureYear:
          type: string
        regionPostcode:
          type: string
        bundleCode:
          type: string
        insuredValue:
          type: object
        bonusMalus:
          type: integer
        taxableHp:
          type: integer
        usageCode:
          type: string
        usageSubcode:
          type: string
        driverBirthYear:
          type: integer
        driverLicenceDate:
          type: object
        driverLicenceType:
          type: string
        payFrequencyInMonths:
          type: integer
        extraCovers:
          type: string
        discountCodes:
          type: string
