openapi: 3.0.0
info:
  version: '1.0'
  title: Identification origination
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
paths:
  /v1/identification_origination/persons/{person_id}/identifications:
    post:
      tags:
        - Identification Origination
      summary: Create identification origination for a customer
      security:
        - oauth2:
            - solaris_service_identification_origination_identification#create
      responses:
        '201':
          description: Identification
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/IdentificationOriginationWeb.GetIdentificationOriginationResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/IdentificationOriginationWeb.CreateIdentificationOriginationRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The person ID of the customer for whom the identification
            origination is created.
      operationId: >-
        IdentificationOriginationWeb.V1.IdentificationOrigination.CreateOperation
      description: >-
        Creates an identification origination resource for a customer to be used
        for the identification and e-signing process for a Solarisbank product.
        The identification origination triggers a video identification for the
        customer and the e-signing process, in which the customer must provide a
        qualified electronic signature (QES) on the product agreement (e.g.,
        loan contract) during the video identification process.
      deprecated: false
      callbacks: {}
  /v1/identification_origination/persons/{person_id}/identifications/{identification_origination_id}:
    get:
      tags:
        - Identification Origination
      summary: Retrieve a customer identification origination
      security:
        - oauth2:
            - solaris_service_identification_origination_identification#find
      responses:
        '200':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/IdentificationOriginationWeb.GetIdentificationOriginationResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The person ID of the customer who must complete the identification
            process.
        - schema:
            type: string
          required: true
          name: identification_origination_id
          in: path
          description: >-
            The unique ID of an identification origination resource assigned to
            a specific customer.
      operationId: IdentificationOriginationWeb.V1.IdentificationOrigination.ShowOperation
      description: >-
        Returns the details of a customer identification origination. Call this
        endpoint to check the identification_origination_status and get the
        esigning_id and the identification_id, which are required to prompt your
        customer to complete the e-signing and the video identification
        processes.
      deprecated: false
      callbacks: {}
components:
  schemas:
    IdentificationOriginationWeb.CreateIdentificationOriginationRequest:
      x-struct: >-
        Elixir.IdentificationOriginationWeb.V1.IdentificationOrigination.CreateOperation.CreateIdentificationOriginationRequest
      type: object
      title: IdentificationOriginationWeb.CreateIdentificationOriginationRequest
      required:
        - method
      properties:
        method:
          type: string
          enum:
            - idnow
          description: The identification method.
        additional_documents:
          type: array
          items:
            type: object
            required:
              - document_id
              - identifier
              - signature_position
            properties:
              signature_position:
                type: object
                properties: {}
                minProperties: 1
                additionalProperties:
                  type: object
                  required:
                    - position
                  properties:
                    position:
                      type: object
                      required:
                        - page
                        - left
                        - width
                        - bottom
                        - height
                      properties:
                        width:
                          type: integer
                        page:
                          type: string
                        left:
                          type: integer
                        height:
                          type: integer
                        bottom:
                          type: integer
              identifier:
                type: string
              document_id:
                type: string
          description: >-
            The documents to be uploaded for the customer to e-sign during the
            video identification process.
          default: []
      example:
        method: idnow
        additional_documents:
          - signature_position:
              mysignature1:
                position:
                  width: 100
                  page: '1'
                  left: 20
                  height: 20
                  bottom: 10
            identifier: cpc
            document_id: document_id
    IdentificationOriginationWeb.GetIdentificationOriginationResponse:
      x-struct: >-
        Elixir.IdentificationOriginationWeb.V1.IdentificationOrigination.ShowOperationView.GetIdentificationOriginationResponse
      type: object
      title: IdentificationOriginationWeb.GetIdentificationOriginationResponse
      required:
        - identification_origination_id
        - status
      properties:
        status_description:
          type: string
          nullable: true
          example: Waiting for signing process to finish
          description: The description of the identification status
        status:
          type: string
          example: esign_pending
          enum:
            - identification_trigger_pending
            - esign_pending
            - identification_completion_pending
            - screening_pending
            - failed
            - completed
            - expired
          description: The status of the identification origination.
        identification_origination_id:
          type: string
          example: 589e12da53154010ad180894acbe07ebio
          description: >-
            The unique ID of an identification origination resource assigned to
            a specific customer.
        identification_id:
          type: string
          nullable: true
          example: 17905779039e75dce7bf8d68f3184942cidt
          description: >-
            The unique ID of the identification resource assigned to a specific
            customer.
        esigning_id:
          type: string
          nullable: true
          example: 5ade4e499b299c299be2987ad597c42ecsig
          description: The unique ID of the e-signing resource.
    Error400:
      x-struct: Elixir.SolarisToolkit.Web.Schemas.HttpError.Error400
      type: object
      title: Error400
      properties:
        title:
          type: string
          example: Failed to build pagination headers.
        status:
          type: string
          example: '400'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Cannot connect to database.
        code:
          type: string
          example: build_pagination_headers_failure
    Error403:
      x-struct: Elixir.SolarisToolkit.Web.Schemas.HttpError.Error403
      type: object
      title: Error403
      properties:
        title:
          type: string
          example: Unauthorized Action
        status:
          type: string
          example: '403'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Unauthorized action is not allowed.
        code:
          type: string
          example: unauthorized_action
    Error404:
      x-struct: Elixir.SolarisToolkit.Web.Schemas.HttpError.Error404
      type: object
      title: Error404
      properties:
        title:
          type: string
          example: Model Not Found
        status:
          type: string
          example: '404'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Couldn't find 'Account' for id 'DE24112233445566'.
        code:
          type: string
          example: model_not_found
    Error409:
      x-struct: Elixir.SolarisToolkit.Web.Schemas.HttpError.Error409
      type: object
      title: Error409
      properties:
        title:
          type: string
          example: Record Not Unique
        status:
          type: string
          example: '409'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Could not save `terms_and_conditions_event`.
        code:
          type: string
          example: record_not_unique
    SolarisToolkit.Web.Json.Error:
      x-struct: Elixir.SolarisToolkit.Web.Json.ErrorBody.Error
      type: object
      title: SolarisToolkit.Web.Json.Error
      required:
        - id
        - status
        - code
        - title
        - detail
      properties:
        title:
          type: string
          description: Some short human friendly string
        status:
          type: integer
          description: The HTTP status
        source:
          type: object
          required:
            - field
            - message
          properties:
            message:
              type: string
            field:
              type: string
          nullable: true
          example:
            message: is_required
            field: name
          description: Optional computer-friendly error source description
        id:
          type: string
          description: A UUID, preferably the request ID
        detail:
          type: string
          description: 'Some human friendly-ish detail: field is required'
        code:
          type: string
          description: some_computer_friendly_string
        backtrace:
          type: array
          nullable: true
          items:
            type: string
          description: Optional array of backtrace lines
    SolarisToolkit.Web.Json.ErrorBody:
      x-struct: Elixir.SolarisToolkit.Web.Json.ErrorBody
      type: object
      title: SolarisToolkit.Web.Json.ErrorBody
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SolarisToolkit.Web.Json.Error'
