openapi: 3.2.0 info: title: Baloise Documents API version: 0.1.0 contact: email: Group.CH_Open-Source@baloise.ch license: name: Apache License 2.0 url: https://github.com/baloise/corellia/blob/master/LICENSE.txt description: 'Operations tagged documents across 2 of this provider''s published API definitions: corellia-openapi.json, baloise-corellia-contracts-openapi.yml. Each path carries the servers of the definition it was published in.' tags: - name: Documents paths: /contracts/v2/documents: post: tags: - Documents summary: Upload a document for a contract description: Please note that this operation needs to be called per document for a contract to be uploaded. The response contains a handle to the document. This handle should be provided with the contract to be uploaded via uploadContract operationId: uploadDocument parameters: - name: X-Caller-Name in: header description: 'Identifying the sender of this event (request) ' required: true schema: type: string description: Defined by the callee - name: X-Event-ID in: header description: Unique identifier per event (request) required: true schema: type: string description: Generated UUID format: uuid requestBody: description: a documnent that is part of a contract content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/Document' required: true responses: default: description: A handle for the uploaded document which can be used in providing a new contract via POST contracts content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/FileHandle' '400': description: Invalid document is provided. See ErrorResponse for more information about validation issues content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' '503': description: Technical issue on server side, please retry later content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: Document: required: - contractId - data - documentType - fileName - mediaType type: object properties: data: type: array description: The document itself. If the documentType is CONTRACT then the document must contain one of these keywords 'Versicherungsvertrag, Contrat d�assurance, Contratto di assicurazione, Insurance policy' items: type: string format: byte contractId: maxLength: 20 minLength: 0 type: string description: The contract this document belongs to mediaType: type: string description: Accepted media types for documents represented by data byte[] enum: - APPLICATION_PDF - IMAGE_JPEG - IMAGE_TIFF - IMAGE_PNG - IMAGE_BMP - IMAGE_GIF fileName: maxLength: 256 minLength: 0 type: string documentType: type: string enum: - CONTRACT - RECEIPT - COVER_LETTER ErrorResponse: required: - errorCause - message type: object properties: errorCause: type: string enum: - httpClientError - httpClientErrorInputValidation - httpServerError message: type: string description: Information about the error detailMessages: type: array description: In case of e.g. validation error, each validation error is represented by one detail message items: type: string FileHandle: required: - handle type: object properties: handle: type: string description: Reference to an uploaded document. This can be a PDF or a picture (e.g. JPG) of a contract or a purchase receipt. Document_2: required: - contractId - data - documentType - fileName - mediaType type: object properties: data: type: array description: The document itself. If the documentType is CONTRACT then the document must contain one of these keywords 'Versicherungsvertrag, Contrat d’assurance, Contratto di assicurazione, Insurance policy' items: type: string format: byte contractId: maxLength: 20 minLength: 0 type: string description: The contract this document belongs to mediaType: type: string description: Accepted media types for documents represented by data byte[] enum: - APPLICATION_PDF - IMAGE_JPEG - IMAGE_TIFF - IMAGE_PNG - IMAGE_BMP - IMAGE_GIF fileName: maxLength: 256 minLength: 0 type: string documentType: type: string enum: - CONTRACT - RECEIPT - COVER_LETTER x-refined-from: - corellia-openapi.json - baloise-corellia-contracts-openapi.yml