openapi: 3.0.0
info:
  title: Aggregate API
  description: Aggregate API specification
  version: 1.0.0
servers:
  - url: https://kyx.amer-1.jumio.ai
    description: Root URL for the US datacenter
  - url: https://kyx.emea-1.jumio.ai
    description: Root URL for the EU datacenter
  - url: https://kyx.apac-1.jumio.ai
    description: Root URL for the SGP datacenter
tags:
  - name: Aggregate API
paths:
  /api/v1/workflows/accounts:
    post:
      summary: Account Create
      description: >-
        API for the account create and triggering workflow. Authentication for
        these APIs will remain same as current authentication for Account
        Initiate and Account Update API .
      operationId: processAccount
      parameters:
        - name: User-Agent
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            description: |
              OTP token which has been received on the account create / update
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                initiate:
                  type: string
                  nullable: false
                  description: >-
                    Json String of AccountRequest. Example -
                    customerInternalReference, callbackUrl, workflowDefinition,
                    userReference, tokenLifetime.
                prepared-data:
                  type: string,
                  nullable: false,
                  description: >-
                    Json String of PreparedData. Example - firstName, lastName,
                    middleName, dateOfBirth, phoneNumber, socialSecurityNumber,
                    ipAddress, address.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowExecutionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/workflows/accounts/{accountId}:
    put:
      summary: Account Update
      description: >-
        API for the account update and triggering workflow. Authentication for
        these APIs will remain same as current authentication for Account
        Initiate and Account Update API
      parameters:
        - name: User-Agent
          in: header
          required: true
          schema:
            type: string
        - name: accountId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                initiate:
                  type: string
                  nullable: false
                  description: >-
                    Json String of Account Request. Example -
                    customerInternalReference, callbackUrl, workflowDefinition,
                    userReference, tokenLifetime.
                prepared-data:
                  type: string
                  nullable: false
                  description: >-
                    Json String of Prepared Data. Example - firstName, lastName,
                    middleName, dateOfBirth, phoneNumber, socialSecurityNumber,
                    ipAddress, address.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowExecutionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PredefinedType:
      type: string
      enum:
        - DEFINED
        - RECOMMENDED
        - OPTIONAL
      default: DEFINED
      description: |
        Type of the predefined property during account creation:
          - DEFINED ( end user is not able to change the value on the Jumio client side )
          - RECOMMENDED ( recommendation for end user based on the existing information not available for Jumio )
          - OPTIONAL ( optional type which is definied in the customer settings and not part of the Jumio default configuration )
    AccountRequest:
      type: object
      properties:
        userReference:
          type: string
          minLength: 1
          maxLength: 100
          description: >
            reference for the end user in the customer backend (must not contain
            any PII)
        customerInternalReference:
          type: string
          minLength: 1
          maxLength: 100
          description: >
            customer internal reference for a request to link it in the customer
            backend (must not contain any PII)
        reportingCriteria:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            additional information provided by a customer for searching and
            aggregation purposes
        callbackUrl:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            possibility to override default callback url for this particular
            request
        tokenLifetime:
          type: string
          pattern: ^([+-]?\d+)([smhd]{1})$
          description: >
            should be a valid date period unit definition (example '1d' or '30m'
            or '600s'):

            - s - seconds

            - m - minutes

            - h - hours

            - d - days
          example: 15m
        web:
          $ref: '#/components/schemas/WebSettings'
        workflowDefinition:
          $ref: '#/components/schemas/WorkflowDefinition'
        userConsent:
          $ref: '#/components/schemas/UserConsent'
      required:
        - customerInternalReference
        - workflowDefinition
    AccountResponse:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        account:
          type: object
          properties:
            id:
              type: string
              format: uuid
        web:
          type: object
          properties:
            href:
              type: string
              format: uri
            successUrl:
              type: string
              format: uri
            errorUrl:
              type: string
              format: uri
        sdk:
          type: object
          properties:
            token:
              type: string
        workflowExecution:
          type: object
          properties:
            id:
              type: string
              format: uuid
            credentials:
              type: array
              items:
                $ref: '#/components/schemas/CredentialResponse'
    WebSettings:
      type: object
      description: |
        web client related settings
      properties:
        successUrl:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            customer served endpoint to handle successfull acquisition scenarios
            during end user journey
        errorUrl:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            customer served endpoint to handle error acquisition scenarios
            during end user journey
        locale:
          type: string
          minLength: 1
          maxLength: 5
          description: >
            Hyphenated combination of ISO 639-1:2002 alpha-2 language code plus
            ISO 3166-1 alpha-2 country. Example values:
              - 'en'
              - 'en-GB'
              - 'de'
              - 'es'
              - 'zh-CN'
    UserConsent:
      type: object
      description: |
        user consent information
      properties:
        userIp:
          type: string
          maxLength: 100
          description: |
            The end user's IP address. It has to be a ipv4 or ipv6 address.
        userLocation:
          $ref: '#/components/schemas/UserLocation'
        consent:
          $ref: '#/components/schemas/Consent'
        privacyPolicy:
          $ref: '#/components/schemas/PrivacyPolicy'
      required:
        - userLocation
    UserLocation:
      type: object
      description: |
        the end user's location including country and state where applicable
      properties:
        country:
          type: string
          format: '#/components/schemas/CountryCodeISO3166alpha3'
          description: the end user's country in ISO-3166-alpha-3 format
        state:
          type: string
          maxLength: 100
          description: >
            The end user's state. State is mandatory when country is USA. For
            USA states, the format is alpha-2 code, for example: 'IL', 'CA'. For
            all other countries state is optional.
    PrivacyPolicy:
      type: object
      description: |
        privacy policy related information
      properties:
        read:
          type: string
          example: 'yes'
          description: |
            Values:
            'yes' - the user has read the privacy policy
            'no' - the user has not read the privacy policy
            'na' - not applicable for the current request
        readAt:
          type: string
          format: date-time
          example: '2022-07-20T17:20:35.000Z'
          description: >
            The date and time in UTC when the privacy policy was read. It has to
            be in the past relative to UTC time.
    Consent:
      type: object
      description: |
        consent related information
      properties:
        read:
          type: string
          example: 'yes'
          description: |
            Values:
            'yes' - the user's consent was obtained
            'no' - the user's consent was not obtained
            'na' - not applicable for the current request
        readAt:
          type: string
          format: date-time
          example: '2022-07-20T17:20:35.000Z'
          description: >
            The date and time in UTC when the consent was obtained. It has to be
            in the past relative to UTC time.
    WorkflowDefinition:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 100
          example: '1'
          description: |
            Key of the workflow definition which you want to execute.
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/CredentialRequest'
        capabilities:
          $ref: '#/components/schemas/CapabilityOptions'
      required:
        - key
      description: >
        Definition of the specific documents necessary to execute for the
        particular capabilities on them.
    CredentialRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        category:
          $ref: '#/components/schemas/CredentialCategory'
        country:
          $ref: '#/components/schemas/CredentialCountry'
        type:
          $ref: '#/components/schemas/CredentialType'
      required:
        - category
      description: >
        Optional workflow definition object part to customize acquiring process
        and workflow process.
    CapabilityOptions:
      type: object
      description: |
        options to provide capability specific fields as part of the request
      properties:
        watchlistScreening:
          type: object
          description: |
            provide request options for watchlistScreening capability
          additionalProperties:
            type: string
    CredentialCategory:
      type: string
      example: ID
      description: >
        Credential category. More information and all supported values are in
        the implementation guide. Example values:
          - 'ID'
          - 'FACEMAP'
          - 'DOCUMENT'
          - 'SELFIE'
    CredentialType:
      type: object
      properties:
        predefinedType:
          $ref: '#/components/schemas/PredefinedType'
        values:
          type: array
          items:
            type: string
          example:
            - ID_CARD
            - DRIVING_LICENSE
      description: >
        Defined number of credential type codes. More information about possible
        values for particular credential categories in the implementation guide.
      required:
        - values
    CredentialCountry:
      type: object
      properties:
        predefinedType:
          $ref: '#/components/schemas/PredefinedType'
        values:
          type: array
          items:
            $ref: '#/components/schemas/CountryCodeISO3166alpha3'
          example:
            - USA
            - AUT
      description: >
        Defined at least one ISO 3166-1 alpha-3 country code for the workflow
        definition.
      required:
        - values
    CountryCodeISO3166alpha3:
      type: string
      enum:
        - AND
        - ARE
        - AFG
        - ATG
        - AIA
        - ALB
        - ARM
        - ANT
        - AGO
        - ATA
        - ARG
        - ASM
        - AUT
        - AUS
        - ABW
        - ALA
        - AZE
        - BIH
        - BRB
        - BGD
        - BEL
        - BFA
        - BGR
        - BHR
        - BDI
        - BEN
        - BLM
        - BMU
        - BRN
        - BOL
        - BES
        - BRA
        - BHS
        - BTN
        - BVT
        - BWA
        - BLR
        - BLZ
        - CAN
        - CCK
        - COD
        - CAF
        - COG
        - CHE
        - CIV
        - COK
        - CHL
        - CMR
        - CHN
        - COL
        - CRI
        - SCG
        - CUB
        - CPV
        - CUW
        - CXR
        - CYP
        - CZE
        - DEU
        - DJI
        - DNK
        - DMA
        - DOM
        - DZA
        - ECU
        - EST
        - EGY
        - ESH
        - ERI
        - ESP
        - ETH
        - FIN
        - FJI
        - FLK
        - FSM
        - FRO
        - FRA
        - GAB
        - GBR
        - GRD
        - GEO
        - GUF
        - GGY
        - GHA
        - GIB
        - GRL
        - GMB
        - GIN
        - GLP
        - GNQ
        - GRC
        - SGS
        - GTM
        - GUM
        - GNB
        - GUY
        - HKG
        - HMD
        - HND
        - HRV
        - HTI
        - HUN
        - IDN
        - IRL
        - ISR
        - IMN
        - IND
        - IOT
        - IRQ
        - IRN
        - ISL
        - ITA
        - JEY
        - JAM
        - JOR
        - JPN
        - KEN
        - KGZ
        - KHM
        - KIR
        - COM
        - KNA
        - PRK
        - KOR
        - KWT
        - CYM
        - KAZ
        - LAO
        - LBN
        - LCA
        - LIE
        - LKA
        - LBR
        - LSO
        - LTU
        - LUX
        - LVA
        - LBY
        - MAR
        - MCO
        - MDA
        - MNE
        - MAF
        - MDG
        - MHL
        - MKD
        - MLI
        - MMR
        - MNG
        - MAC
        - MNP
        - MTQ
        - MRT
        - MSR
        - MLT
        - MUS
        - MDV
        - MWI
        - MEX
        - MYS
        - MOZ
        - NAM
        - NCL
        - NER
        - NFK
        - NGA
        - NIC
        - NLD
        - NOR
        - NPL
        - NRU
        - NIU
        - NZL
        - OMN
        - PAN
        - PER
        - PYF
        - PNG
        - PHL
        - PAK
        - POL
        - SPM
        - PCN
        - PRI
        - PSE
        - PRT
        - PLW
        - PRY
        - QAT
        - REU
        - ROU
        - SRB
        - RUS
        - RWA
        - SAU
        - SLB
        - SYC
        - SDN
        - SWE
        - SGP
        - SHN
        - SVN
        - SJM
        - SVK
        - SLE
        - SMR
        - SEN
        - SOM
        - SUR
        - SSD
        - STP
        - SLV
        - SXM
        - SYR
        - SWZ
        - TCA
        - TCD
        - ATF
        - TGO
        - THA
        - TJK
        - TKL
        - TLS
        - TKM
        - TUN
        - TON
        - TUR
        - TTO
        - TUV
        - TWN
        - TZA
        - UKR
        - UGA
        - UMI
        - USA
        - URY
        - UZB
        - VAT
        - VCT
        - VEN
        - VGB
        - VIR
        - VNM
        - VUT
        - WLF
        - WSM
        - XKX
        - YEM
        - MYT
        - ZAF
        - ZMB
        - ZWE
      description: |
        ISO 3166-1 alpha-3 country code.
    PreparedData:
      type: object
      properties:
        suffix:
          type: string
          example: Mr, Mrs, Ms
        firstName:
          type: string
        middleName:
          type: string
        lastName:
          type: string
        paternalSurname:
          type: string
        maternalSurname:
          type: string
        sex:
          type: string
          description: Gender of person. M for male and F for female
          example: M, F
        dateOfBirth:
          type: string
          format: date
          description: Date of Birth in ISO 8601 Date format only
          example: 2021-12-23, 2021-12-24
        socialSecurityNumber:
          type: string
        nationality:
          type: string
        email:
          type: string
          format: email
        phoneNumber:
          type: string
        phoneNumber2:
          type: string
        personalNumber:
          type: string
        ipAddress:
          type: string
          format: ip-address
          description: ip address
        address:
          $ref: '#/components/schemas/Address'
        id:
          $ref: '#/components/schemas/IdDetails'
        kyc:
          $ref: '#/components/schemas/KycDetails'
        bank:
          $ref: '#/components/schemas/BankDetails'
        business:
          $ref: '#/components/schemas/BusinessInformation'
        ine:
          $ref: '#/components/schemas/INEDetails'
    IdDetails:
      type: object
      properties:
        issuingDate:
          type: string
          format: date
          description: issuing date of the identity document in ISO 8601 Date format only
          example: 2021-12-23, 2021-12-24
        expiryDate:
          type: string
          format: date
          description: expiry date of the identity document in ISO 8601 Date format only
          example: 2021-12-23, 2021-12-24
        idNumber:
          type: string
        type:
          type: string
          description: type of identity document
          example: PASSPORT, DRIVING_LICENSE
        subType:
          type: string
          description: sub type of identity document
          example: TAX_ID, ELECTORAL_ID, NATIONAL_ID
        secondaryIdNumber:
          type: string
          description: Document Identification Number
          example: '2029438329'
    Address:
      type: object
      properties:
        line1:
          type: string
        line2:
          type: string
        line3:
          type: string
        line4:
          type: string
        line5:
          type: string
        postalCode:
          type: string
          description: postal code or zip code
          example: 123421, 86520
        city:
          type: string
        subdivision:
          type: string
        country:
          type: string
          description: Country in ISO-3166-1 Alpha-3 Code or ISO-3166-1 Alpha-2 Code format
    BankDetails:
      type: object
      properties:
        paymentMethod:
          type: string
          description: Payment method type (CC for BIN; EC for bank account)
          enum:
            - EC
            - CC
        binNumber:
          type: string
          description: Bank Identification Number
        lastDigits:
          type: string
          description: Last digits of credit/debit card
        accountNumber:
          type: string
          description: Bank account number
        routingNumber:
          type: string
          description: Identity number for bank specified account is held in
        amount:
          type: number
          format: double
          description: transaction amount
        currency:
          type: string
          pattern: ^\w{3}$
          description: Currency Code in ISO 4217 alphabetic format only
          example: USD, INR, AED
        transactionTime:
          type: string
          format: date-time
          description: time of transaction in ISO 8601 format
          example: '2022-03-22T08:04:36Z'
        transactionId:
          type: string
          description: Transaction Identifier
        ipAddress:
          type: string
          format: ip-address
          description: ip address for the transaction in IPv4 format only
          example: 8.8.8.8
    INEDetails:
      type: object
      properties:
        cic:
          type: string
          description: cic credential number mentioned on the elector card
        ocr:
          type: string
          description: ocr credential number mentioned on the elector card
        electorKey:
          type: string
          description: voter key of the card holder
        issuingNumber:
          type: string
          description: issuing number of the card
        type:
          type: string
          description: type of credential i.e., C, D, E, F, G or H
        registrationYear:
          type: integer
          description: registration year of voter for elector card
        issuingYear:
          type: integer
          description: issuing year of the card
        citizenID:
          type: string
          description: citizen id of the the voter
    KycDetails:
      type: object
      properties:
        registrationDate:
          type: string
          format: date
          description: >-
            registration date of customer for KYC purposes in ISO 8601 Date
            format only
          example: 2021-12-21, 2021-12-23
        registrationIpAddress:
          type: string
          format: ip-address
          description: >-
            ip address of customer when it was registered for KYC purposes in
            IPv4 format only
          example: 8.8.8.8
    BusinessInformation:
      type: object
      properties:
        name:
          type: string
          description: name of business you want to search for
        city:
          type: string
          description: city in which business is located in
        address:
          type: string
          description: address of business
        state:
          type: string
          description: state in which business is located in
          example: California, Oregon
        country:
          type: string
          description: >-
            country in which business is located in. In ISO-3166-1 Alpha-3 Code
            format only
          example: USA, BRA, IND
        registrationNumber:
          type: string
          description: business registration number
          example: 60704780
        searchId:
          type: string
          description: search id as received from kyb search primitive
        kybCapabilities:
          type: array
          description: which KYB capabilities to run on this business
          items:
            type: string
            description: value of KYB capability.
            x-extensible-enum:
              - ADVERSE_MEDIA
              - WEB_MONITORING
              - CREDIT
              - BUSINESS_COMPLIANCE
              - LIVE_BUSINESS_IDENTITY
              - COMPLIANCE_WATCHLIST
              - BUSINESS_IDENTITY_USA
    WorkflowExecutionResponse:
      type: object
      required:
        - workflow
        - account
        - createdAt
        - credentials
        - capabilities
      properties:
        workflow:
          $ref: '#/components/schemas/WorkflowDetails'
        account:
          $ref: '#/components/schemas/AccountDetails'
        createdAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        wipedOutAt:
          type: string
          format: date-time
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/CredentialDetails'
        decision:
          $ref: '#/components/schemas/DecisionWithRisk'
        steps:
          $ref: '#/components/schemas/WorkflowStepsWithHref'
        capabilities:
          type: object
          properties:
            extraction:
              type: array
              items:
                $ref: '#/components/schemas/ExtractionCapabilityResponse'
            similarity:
              type: array
              items:
                $ref: '#/components/schemas/SimilarityCapabilityResponse'
            liveness:
              type: array
              items:
                $ref: '#/components/schemas/LivenessCapabilityResponse'
            dataChecks:
              type: array
              items:
                $ref: '#/components/schemas/DataChecksCapabilityResponse'
            imageChecks:
              type: array
              items:
                $ref: '#/components/schemas/ImageChecksCapabilityResponse'
            usability:
              type: array
              items:
                $ref: '#/components/schemas/UsabilityCapabilityResponse'
            authentication:
              type: array
              items:
                $ref: '#/components/schemas/AuthenticationCapabilityResponse'
            watchlistScreening:
              type: array
              items:
                $ref: '#/components/schemas/WatchlistScreeningCapabilityResponse'
            addressValidation:
              type: array
              items:
                $ref: '#/components/schemas/AddressValidationCapabilityResponse'
            proofOfResidency:
              type: array
              items:
                $ref: '#/components/schemas/ProofOfResidencyCapabilityResponse'
            drivingLicenseVerification:
              type: array
              items:
                $ref: '#/components/schemas/DLVerificationCapabilityResponse'
            ekycVerification:
              type: array
              items:
                $ref: '#/components/schemas/EkycVerificationCapabilityResponse'
            deviceRiskVerification:
              type: array
              items:
                $ref: '#/components/schemas/DeviceRiskVerificationCapabilityResponse'
            braCpfValidation:
              type: array
              items:
                $ref: '#/components/schemas/BraCpfValidationCapabilityResponse'
            biometricVerification:
              type: array
              items:
                $ref: '#/components/schemas/BiometricVerificationCapabilityResponse'
            govtIdVerification:
              type: array
              items:
                $ref: '#/components/schemas/GovtIdVerificationCapabilityResponse'
            kycCheck:
              type: array
              items:
                $ref: '#/components/schemas/KycCheckCapabilityResponse'
            bankCheck:
              type: array
              items:
                $ref: '#/components/schemas/BankCheckCapabilityResponse'
            searchBusiness:
              type: array
              items:
                $ref: '#/components/schemas/SearchBusinessCapabilityResponse'
            emailVerification:
              type: array
              items:
                $ref: '#/components/schemas/EmailVerificationCapabilityResponse'
            phoneVerification:
              type: array
              items:
                $ref: '#/components/schemas/PhoneVerificationCapabilityResponse'
            geoLocationVerification:
              type: array
              items:
                $ref: '#/components/schemas/GeoLocationVerificationCapabilityResponse'
            businessInfo:
              type: array
              items:
                $ref: '#/components/schemas/BusinessInfoCapabilityResponse'
            ekycSsnVerification:
              type: array
              items:
                $ref: '#/components/schemas/EkycSsnVerificationCapabilityResponse'
            ekycAdvancedVerification:
              type: array
              items:
                $ref: >-
                  #/components/schemas/EkycAdvancedVerificationCapabilityResponse
        rules:
          $ref: '#/components/schemas/WorkflowExecutionRulesResponseWithHref'
    WorkflowExecutionRulesResponseWithHref:
      type: object
      properties:
        href:
          type: string
          format: uri
        executions:
          type: array
          items:
            $ref: '#/components/schemas/RulesExecutionResponse'
    WorkflowExecutionRulesResponse:
      type: object
      properties:
        executions:
          type: array
          items:
            $ref: '#/components/schemas/RulesExecutionResponse'
    RulesExecutionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        rulesets:
          type: array
          items:
            $ref: '#/components/schemas/RulesetResponse'
    RulesetResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        version:
          type: integer
        score:
          type: integer
        rulesMatched:
          type: array
          items:
            $ref: '#/components/schemas/RuleResponse'
        rulesNotMatched:
          type: array
          items:
            $ref: '#/components/schemas/RuleResponse'
    RuleResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        version:
          type: integer
        score:
          type: integer
    WorkflowDetails:
      type: object
      required:
        - id
        - status
        - definitionKey
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        definitionKey:
          type: string
        userReference:
          type: string
        customerInternalReference:
          type: string
        reportingCriteria:
          type: string
    AccountDetails:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
    CredentialDetails:
      type: object
      required:
        - id
        - category
        - parts
      properties:
        id:
          type: string
          format: uuid
        category:
          type: string
        parts:
          type: array
          items:
            $ref: '#/components/schemas/PartDetails'
    SimpleCredential:
      type: object
      required:
        - id
        - category
      properties:
        id:
          type: string
          format: uuid
        category:
          type: string
    PartDetails:
      type: object
      required:
        - classifier
      properties:
        classifier:
          type: string
        href:
          type: string
          format: uri
    SimpleCapability:
      type: object
      required:
        - id
        - category
      properties:
        id:
          type: string
          format: uuid
          description: |
            id of the capbility used in the step
        category:
          type: string
          description: |
            type of capability used in the step
          example: imageChecks, dataChecks
    Response:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        account:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the account which was used for an api call
        workflowExecution:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the workflow-execution which was used for an api call
        credential:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the credential which was used for an api call
        part:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the currently uploaded part
        api:
          $ref: '#/components/schemas/ApiActions'
    CredentialResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        category:
          $ref: '#/components/schemas/CredentialCategory'
        country:
          $ref: '#/components/schemas/CredentialCountry'
        type:
          $ref: '#/components/schemas/CredentialType'
        allowedChannels:
          type: array
          items:
            type: string
          description: >
            channels which can be used to upload particular credential (SDK,
            API, WEB)
        api:
          $ref: '#/components/schemas/ApiActions'
    ApiActions:
      type: object
      description: >
        available actions for the API calls, actions can be omitted due to
        unavailability
      properties:
        token:
          type: string
          description: |
            JWT token for performing any action
        parts:
          $ref: '#/components/schemas/ApiActionsParts'
        workflowExecution:
          type: string
          format: uri
          description: |
            href to manage the acquisition and workflow processing
    ExtractionCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            type:
              type: string
              example: PASSPORT, DRIVING_LICENSE, ID_CARD, VISA, UNSUPPORTED
            subType:
              type: string
            issuingCountry:
              type: string
              example: USA, AUT, GER, FRA
              description: >
                The country this document was issued. Can be any ISO 3166-1
                alpha-3 country code, and XKX for Kosovo
            firstName:
              type: string
            lastName:
              type: string
            dateOfBirth:
              type: string
              format: date
            dateOfBirthParts:
              $ref: '#/components/schemas/DateParts'
            expiryDate:
              type: string
              format: date
            expiryDateParts:
              $ref: '#/components/schemas/DateParts'
            issuingDate:
              type: string
              format: date
            issuingDateParts:
              $ref: '#/components/schemas/DateParts'
            dueDate:
              type: string
              format: date
            dueDateParts:
              $ref: '#/components/schemas/DateParts'
            accountNumber:
              format: string
            swiftCode:
              format: string
            documentType:
              format: string
            documentNumber:
              type: string
            ssn:
              type: string
              description: |
                represents the SSN for USA
            signatureAvailable:
              type: boolean
              description: >-
                whether signature is available on SSN or not (only applies to
                SSN in USA)
            state:
              type: string
              description: |
                Possible values:
                - Last two characters of ISO 3166-2:US state code
                - Last 2-3 characters of ISO 3166-2:AU state code
                - Last two characters of ISO 3166-2:CA state code
                - ISO 3166-1 country name
                - XKX (Kosovo)
                - Free text if it can't be mapped to a state/country code
            personalNumber:
              type: string
            optionalMrzField1:
              type: string
              description: Optional field of MRZ line 1
            optionalMrzField2:
              type: string
              description: Optional field of MRZ line 2
            address:
              $ref: '#/components/schemas/AddressResponse'
            issuingAuthority:
              type: string
              description: Issuing authority of the document
            issuingPlace:
              type: string
              description: Issuing place of the document
            curp:
              type: string
              description: The CURP for mexican documents
            gender:
              type: string
              description: |
                - M
                - F
                - X
            nationality:
              type: string
              description: >-
                Nationality of the document holder in ISO 3166-1 alpha-3 country
                code or country specific non ISO nationalities (3 letters)
              example: USA, AUT, GER, FRA, BNO, XCT
            placeOfBirth:
              type: string
            taxNumber:
              type: string
              description: >
                Tax number of the document in case the country is ITA and type
                is HEALTH_ID or TAX_ID
            cpf:
              type: string
            registrationNumber:
              type: string
            mothersName:
              type: string
            fathersName:
              type: string
            personalIdentificationNumber:
              type: string
            rgNumber:
              type: string
            dlCategories:
              type: array
              items:
                $ref: '#/components/schemas/DrivingLicenseCategory'
            voterIdNumber:
              type: string
              description: >-
                \"Clave de elector\" number for idCountry = MEX (if extraction
                is enabled)
            issuingNumber:
              type: string
              description: >-
                \"Numero de emission\" number for idCountry = MEX (if extraction
                is enabled)
            passportNumber:
              type: string
              description: >-
                Passport number if idType = VISA and additional extraction for
                Visa enabled
            durationOfStay:
              type: string
              description: >-
                Duration of stay if idType = VISA and additional extraction for
                Visa enabled
            numberOfEntries:
              type: string
              description: >-
                Number of entries if idType = VISA and additional extraction for
                Visa enabled
            visaCategory:
              type: string
              description: >-
                Visa category if idType = VISA and additional extraction for
                Visa enabled
            dni:
              type: string
              description: >-
                DNI as available on the ID if idCountry = ESP and idSubtype =
                NATIONAL_ID
            pesel:
              type: string
            residentPermitType:
              type: string
              description: Permit type related to "Golden Visas" (if extraction is enabled)
            residentPermitRemarks:
              type: string
              description: >-
                Permit remarks related to "Golden Visas" (if extraction is
                enabled)
            profession:
              type: string
              description: Profession (if extraction is enabled)
            citizenship:
              type: string
              description: Citizenship (if extraction is enabled)
            maritalStatus:
              type: string
              description: Marital status (if extraction is enabled)
            religion:
              type: string
              description: Religion (if extraction is enabled)
            documentIdentificationNumber:
              type: string
              description: Document identification number (if extraction is enabled)
            workPermitNumber:
              type: string
              description: Work permit number (if extraction is enabled)
            laborIdentificationNumber:
              type: string
              description: Labor identification number (if extraction is enabled)
            documentCopy:
              type: string
              description: Document copy (if extraction is enabled)
            lastNameAtBirth:
              type: string
              description: Last name at birth (if extraction is enabled)
            remarks:
              type: string
              description: Remarks (if extraction is enabled)
            disabilities:
              type: string
              description: Disabilities (if extraction is enabled)
            panNumber:
              type: string
              example: '********1234'
              description: PAN number in case of CC document type (Can be masked as well)
            monthYearExpiry:
              type: string
              example: 03/20
              description: contains credit card's expiry date in format MM/YY
            cardNumberLastFourDigits:
              type: string
              minLength: 4
              maxLength: 4
              example: 1234
              description: >-
                contains last 4 digits of credit card number for CCS document
                type
            customExtractionPoints:
              type: object
              additionalProperties: true
            currentAge:
              type: string
              description: >-
                Current age, calculated based on the date of birth or the date
                of birth parts field (if currentAge calculation is enabled)
    AddressResponse:
      type: object
      properties:
        line1:
          type: string
        line2:
          type: string
        line3:
          type: string
        line4:
          type: string
        line5:
          type: string
        country:
          type: string
        postalCode:
          type: string
        subdivision:
          type: string
        city:
          type: string
        formattedAddress:
          type: string
    DrivingLicenseCategory:
      type: object
      properties:
        category:
          type: string
        issueDate:
          type: string
          format: date
        expiryDate:
          type: string
          format: date
        isReadable:
          type: string
        availability:
          type: string
    SimilarityCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            similarity:
              type: string
              example: MATCH, NO_MATCH, NOT_POSSIBLE
            score:
              type: number
              format: double
    LivenessCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        validFaceMapForAuthentication:
          type: string
          format: href
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            type:
              type: string
              example: IPROOV_STANDARD, IPROOV_PREMIUM, JUMIO_STANDARD
            predictedAge:
              type: integer
            ageConfidenceRange:
              type: string
    UsabilityCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
    AuthenticationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        validFaceMapForAuthentication:
          type: string
          format: href
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            type:
              type: string
              example: IPROOV_STANDARD, IPROOV_PREMIUM
    ImageChecksCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            faceSearchFindings:
              type: object
              properties:
                status:
                  type: string
                  example: DONE, PENDING, ERROR
                findings:
                  description: >-
                    A face (on the ID or Selfie) is matching with another face
                    (on the ID or Selfie) from a previous transaction
                  type: array
                  items:
                    type: string
                    format: uuid
    DataChecksCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
    WatchlistScreeningCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            searchDate:
              type: string
              format: date-time
            searchId:
              type: string
            searchReference:
              type: string
            searchResultUrl:
              type: string
              format: uri
            searchResults:
              type: integer
            searchStatus:
              type: string
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    AddressValidationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          $ref: '#/components/schemas/AddressAdditionalInfo'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    ProofOfResidencyCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          $ref: '#/components/schemas/AddressAdditionalInfo'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    AddressAdditionalInfo:
      type: object
      properties:
        reasonMessage:
          type: string
    BraCpfValidationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    DLVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    EkycVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            emailValid:
              type: boolean
            phoneValid:
              type: boolean
            emailMatchToName:
              type: string
            phoneMatchToName:
              type: string
            addressValidityLevel:
              type: string
            addressMatchToName:
              type: string
            emailFirstSeenDays:
              type: integer
            ipRisk:
              type: boolean
            ipLastSeenDays:
              type: integer
            ipToAddressDistance:
              type: integer
            phoneIpLastSeenDays:
              type: integer
            phoneLineType:
              type: string
            addressFirstSeen:
              type: integer
            identityNetworkScore:
              type: number
              format: double
            identityRiskScore:
              type: integer
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    DeviceRiskVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            remoteSoftwareUsed:
              type: boolean
            rootedDeviceUsed:
              type: boolean
            emulatorUsed:
              type: boolean
            suspectedProxyUsedRisk:
              type: string
            suspectedOSAnomalyRisk:
              type: string
            suspectedRemoteSessionRisk:
              type: string
            suspectedVPNUsedRisk:
              type: string
            deviceModel:
              type: string
            deviceOS:
              type: string
            browser:
              type: string
            ipType:
              type: string
            sessionIPCount:
              type: integer
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    BiometricVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          $ref: '#/components/schemas/BiometricVerificationCapabilityResponseData'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    BiometricVerificationCapabilityResponseData:
      type: object
      properties:
        nameMatch:
          type: string
          example: MATCH, NOT_MATCH
        dobMatch:
          type: string
          example: MATCH, NOT_MATCH
        stateMatch:
          type: string
          example: MATCH, NOT_MATCH
        pincodeMatch:
          type: string
          example: MATCH, NOT_MATCH
        cityMatch:
          type: string
          example: MATCH, NOT_MATCH
        faceMatch:
          type: string
          example: MATCH, NOT_MATCH
        ocrMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        issuingNumberMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        registrationYearMatch:
          type: string
          description: |
            whether value matched or not
        issuingYearMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        electorKeyMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        paternalSurnameMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        maternalSurnameMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
        idNumberMatch:
          type: string
          example: MATCH, NOT_MATCH
          description: |
            whether value matched or not
    GovtIdVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            country:
              type: string
              description: >
                The country this document was issued. Can be any ISO 3166-1
                alpha-3 country code, and XKX for Kosovo
            type:
              type: string
              example: PASSPORT, DRIVING_LICENSE, ID_CARD, VISA, UNSUPPORTED
              description: |
                Type of ID document provided
            completeNameMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If complete name was matched, not matched or partially matched
            initialNameMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: >
                If initials of the name was matched, not matched or partially
                matched
            firstNameMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If first name was matched, not matched or partially matched
            lastNameMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If last name was matched, not matched or partially matched
            nationalIdMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If national id was matched, not matched or partially matched
            dobDayMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If DOB day was matched, not matched or partially matched
            dobMonthMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If DOB month was matched, not matched or partially matched
            dobYearMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If DOB year was matched, not matched or partially matched
            dobMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If complete DOB was matched, not matched or partially matched
            phoneMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If phone number was matched, not matched or partially matched
            addressMatch:
              type: string
              example: MATCH, NOT_MATCH, PARTIAL_MATCH
              description: |
                If address was matched, not matched or partially matched
            sexMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                If gender was matched, not matched or partially matched
            stateKeyMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                If state was matched, not matched or partially matched
            score:
              type: integer
              example: 10, 20
              description: |
                The score from the third party vendor
            reasonMessage:
              type: string
              description: |
                Detailed message description for failure or success cases
            ocrMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            issuingNumberMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            registrationYearMatch:
              type: string
              description: |
                whether value matched or not
            issuingYearMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            validity:
              type: string
              description: |
                elector card validity
            federalDistrict:
              type: string
              description: |
                voter district
            electorKeyMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            paternalSurnameMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            maternalSurnameMatch:
              type: string
              example: MATCH, NOT_MATCH
              description: |
                whether value matched or not
            message:
              type: string
              description: |
                detailed reason message for success or failure
            rawResponse:
              type: object
              description: |
                The raw response from the third party vendor
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    BankCheckCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            transactionType:
              type: string
              description: |
                type of transaction
              example: Deposit
            bankName:
              type: string
              description: |
                name of bank
              example: JPMORGAN CHASE BANK, N.A
            bankLocation:
              type: string
              description: |
                name of country in which bank is located
              example: United States, India
            cardBrand:
              type: string
              description: |
                Brand of card used
              example: VISA, MASTERCARD
            cardCountry:
              type: string
              description: |
                country of the card in ISO 3166 Alpha-2 Code
              example: US, IN
            cardLevel:
              type: string
              description: |
                level of card as def
              example: STANDARD
            cardType:
              type: string
              description: |
                type of card
              example: CREDIT, DEBIT
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    KycCheckCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            emailVerificationStatus:
              type: string
              example: >-
                GeneralError, Certified, Verified, EmailInexistent, ValidDomain,
                DomainInexistent
              description: >
                Shows the status of email verification. Available values are
                given in the examples.
            phoneType:
              type: string
              example: >-
                fixed line, invalid, mobile, other, pager, payphone, personal,
                prepaid, tollfree, voip
              description: >
                Shows the phone type. Available values are given in the
                examples.
            watchlistVerificationStatus:
              type: string
              example: >-
                false_positive, potential_match, true_positive, unknown,
                true_positive_approve, true_positive_reject
              description: >
                Shows the status of watchlist verification. Available values are
                given in the examples.
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    SearchBusinessResult:
      type: object
      properties:
        registrationNumber:
          type: string
          description: Business registration number
          example: '000680890'
        name:
          type: string
          description: Business name
        country:
          type: string
          description: >-
            Country where the business is located in ISO 3166 Alpha 3 Code
            format
          example: USA
        state:
          type: string
          description: State where the business is located
          example: CA
        city:
          type: string
          description: City where the business is located
          example: California
        address:
          type: string
          description: business address
        kybCapabilities:
          type: array
          description: which all KYB Capabilities can be run on this business
          example: ADVERSE_MEDIA, COMPLIANCE_WATCHLIST
          items:
            type: string
            description: name of KYB capability available to run on
        searchId:
          type: integer
    SearchBusinessCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/SearchBusinessResult'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    EmailVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            emailVerificationStatus:
              type: string
              example: Verified
            firstVerifiedAt:
              type: string
              format: date-time
            totalHits:
              type: string
            emailExists:
              type: boolean
            domainExists:
              type: boolean
            domainName:
              type: string
            domainCompany:
              type: string
            domainRiskLevel:
              type: string
              example: VERY_LOW,MEDIUM,HIGH
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    PhoneVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            phoneType:
              type: string
            carrier:
              type: string
            blocked:
              type: boolean
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    GeoLocationVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            anonymousProxy:
              type: string
              example: 'No'
            countryCode:
              type: string
              example: CRI
            ipCity:
              type: string
              example: Puntarenas
            ipIsp:
              type: string
              example: Grupo ICE
            ipUserType:
              type: string
              example: residential
            ipOrganization:
              type: string
              example: Grupo ICE
            ipAccuracyRadius:
              type: integer
            ipLatitude:
              type: number
              format: double
            ipLongitude:
              type: number
              format: double
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    BusinessInfoResult:
      type: object
      properties:
        kyb_source:
          type: string
        data:
          type: object
          additionalProperties: true
    BusinessInfoCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/BusinessInfoResult'
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    EkycAdvancedVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            verificationResult:
              type: string
            nameMatch:
              type: string
            addressMatch:
              type: string
            nationalIdMatch:
              type: string
            dobMatch:
              type: string
            dobDayMatch:
              type: string
            dobMonthMatch:
              type: string
            dobYearMatch:
              type: string
            phoneMatch:
              type: string
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    EkycSsnVerificationCapabilityResponse:
      type: object
      required:
        - credentials
        - decision
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCredential'
        decision:
          $ref: '#/components/schemas/Decision'
        data:
          type: object
          properties:
            addressVerificationResult:
              type: string
            ssnResult:
              type: string
            dobVerification:
              type: string
            addressDescription:
              type: string
            ssnDescription:
              type: string
            dobDescription:
              type: string
            addressResultRisk:
              type: string
            phoneResultRisk:
              type: string
            deceased:
              type: string
            addressType:
              type: string
            addressMatch:
              type: string
              description: Tells whether address matches or not
              example: MATCH
            nameMatchToSsn:
              type: string
              description: Tells whether Name matches to SSN or not
              example: MATCH
            nameMatchToAddress:
              type: string
              example: MATCH
            phoneMatch:
              type: string
              description: Tells whether Phone match or not
              example: MATCH
            ssnMatch:
              type: string
              description: Tells whether social Security number match or not
              example: MATCH
            dateOfBirthMatch:
              type: string
              description: Tells whether date of birth match or not
              example: MATCH
            isDeceased:
              type: boolean
              example: Tells whether person is alive or not
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
    ApiActionsParts:
      type: object
      properties:
        front:
          type: string
          format: uri
          description: |
            href to manage FRONT part for the account credential
        back:
          type: string
          format: uri
          description: |
            href to manage BACK part for the account credential
        face:
          type: string
          format: uri
          description: |
            href to manage FACE part for the account credential
        facemap:
          type: string
          format: uri
          description: |
            href to manage FACEMAP part for the account credential
        prepared_data:
          type: string
          format: uri
          description: |
            href to manage PREPARED_DATA part for the account credential
      additionalProperties:
        type: string
        format: uri
        description: |
          it will be a map which will contain uri for ORIGIN, 1, 2, ...
        example:
          '1': href
          '2': href
    DateParts:
      type: object
      properties:
        year:
          type: string
          example: 2021
        month:
          type: string
          example: 10
        day:
          type: string
          example: 10
    AdditionalInformation:
      type: object
      properties:
        vendor:
          type: object
          properties:
            response:
              type: object
              description: response received from vendor
            name:
              type: string
              description: name of vendor
    Decision:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          example: PASS, REJECT
        details:
          type: object
          properties:
            label:
              type: string
    Risk:
      type: object
      properties:
        score:
          type: number
          format: float
    WorkflowStep:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        decision:
          $ref: '#/components/schemas/Decision'
        capabilities:
          type: array
          items:
            $ref: '#/components/schemas/SimpleCapability'
        capabilityIds:
          type: array
          items:
            type: string
            format: uuid
    AccountResponseWorkflowExecution:
      type: object
      properties:
        id:
          type: string
          format: uuid
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/CredentialResponse'
    DecisionWithRisk:
      type: object
      required:
        - type
        - risk
      properties:
        type:
          type: string
          example: PASS, REJECT
        details:
          type: object
          properties:
            label:
              type: string
        risk:
          $ref: '#/components/schemas/Risk'
    WorkflowStatusResponse:
      type: object
      required:
        - account
        - workflowExecution
      properties:
        account:
          $ref: '#/components/schemas/AccountWithHref'
        workflowExecution:
          $ref: '#/components/schemas/WorkflowExecutionWithHref'
    WorkflowStepsResponse:
      type: object
      required:
        - steps
      properties:
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStep'
    WorkflowStepsWithHref:
      type: object
      required:
        - href
      properties:
        href:
          type: string
          format: uri
    AccountWithHref:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
        href:
          type: string
          format: uri
    WorkflowExecutionWithHref:
      type: object
      required:
        - id
        - definitionKey
        - status
      properties:
        id:
          type: string
          format: uuid
        href:
          type: string
          format: uri
        definitionKey:
          type: string
        status:
          type: string
    PreparedDataResponse:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        account:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the account which was used for an api call
        workflowExecution:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the workflow-execution which was used for an api call
        credential:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the credential which was used for an api call
        part:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: |
                id of the currently uploaded part
        api:
          $ref: '#/components/schemas/ApiActions'
    Problem:
      type: object
      description: https://tools.ietf.org/html/rfc7807
      properties:
        type:
          type: string
          format: uri
          description: >
            An absolute URI that identifies the problem type.  When
            dereferenced,

            it SHOULD provide human-readable documentation for the problem type

            (e.g., using HTML).
          default: about:blank
          example: https://jumio.github.io/problems/constraint-violation
        title:
          type: string
          description: >
            A short, summary of the problem type. Written in english and
            readable

            for engineers (usually not suited for non technical stakeholders and

            not localized); example: Service Unavailable
        status:
          type: integer
          format: int32
          description: >
            The HTTP status code generated by the origin server for this
            occurrence

            of the problem.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the
            problem.
          example: Connection to database timed out
        instance:
          type: string
          format: uri
          description: >
            An absolute URI that identifies the specific occurrence of the
            problem.

            It may or may not yield further information if dereferenced.
        errorMessage:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://jumio.github.io/problems/unauthorized
            title: Unauthorized
            status: 401
            detail: The provided credentials are invalid
    Forbidden:
      description: unexpected error happened during processing request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://jumio.github.io/problems/forbidden
            title: Forbidden
            status: 403
            detail: >-
              The provided credentials are not allowed to access the request
              resource
    NotFound:
      description: resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://jumio.github.io/problems/not-found
            title: Not found
            status: 404
            detail: The requested resource could not be found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
