# Accept a KYC document

`POST /kyc-documents/{id}/acceptance`

> This is a subset of the full specification, limited to the `POST /kyc-documents/{id}/acceptance` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST /kyc-documents/{id}/acceptance` operation. Components more than 3 `$ref` hops away are not included.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: KYC documents
    description: |-
      Use Know Your Customer (KYC) documents to verify your customers identity.
      The KYC document operations generate a signed link to the Rebilly [KYC document gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).

      Document types:
        - `identity-proof`: Validates a customer's identity.
        - `address-proof`: Validates a customer's address.
        - `purchase-proof`: Validates a customer's purchase.
        - `funds-proof`: Validates that a customer has funds.
        - `credit-file-proof`: Verifies that there is an existing credit file with two sources that match the customer's name, DOB, and address.

      Rebilly parses and analyzes the documents and accepts or rejects them according to a configurable scoring algorithm.
      When all document types in a KYC request are accepted, the status is fulfilled, and the [KYC request fulfilled webhook](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-fulfilled/) is sent.

      ### Credit file proof

      The `credit-file-proof` KYC document request type is only available in the API,
      this option is not available in the [KYC document gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).
      This request verifies that there is an existing credit file with two sources that match the person's name, date of birth, and address.

      In Canada, to meet FINTRAC requirements, the `credit-file-proof` KYC document request verifies the customer's name, address, and date of birth with a credit agency.

      If `credit-file-proof` is requested in combination with `identity-proof` and `address-proof`,
      `credit-file-proof` is attempted first.
      If `credit-file-proof` validates the identity and address,
      the KYC request is considered fulfilled.
      If the request is not fulfilled,
      redirect your customer to the KYC document gatherer to collect their KYC documents.
x-tagGroups:
  - name: Risk
    tags:
      - KYC documents
paths:
  /kyc-documents/{id}/acceptance:
    parameters:
      - $ref: '#/components/parameters/resourceId'
    post:
      x-products:
        - Core
      tags:
        - KYC documents
      summary: Accept a KYC document
      operationId: PostKycDocumentAcceptance
      x-sdk-operation-name: accept
      description: |-
        Accepts a KYC document and changes the documents `status` to `accepted`.
        The review time and reviewer information is also updated.

        > **Note:** Use this operation for manual overrides.
      responses:
        '201':
          description: KYC document acceptance created.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            Rate-Limit-Limit:
              $ref: '#/components/headers/Rate-Limit-Limit'
            Rate-Limit-Remaining:
              $ref: '#/components/headers/Rate-Limit-Remaining'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KycDocument'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            const acceptedDocument = await api.kycDocuments.accept({id: 'my-second-id'});
            console.log(acceptedDocument.fields.status);
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  parameters:
    resourceId:
      name: id
      in: path
      description: ID of the resource.
      required: true
      schema:
        type: string
        maxLength: 50
        pattern: ^[@~\-\.\w]+$
  headers:
    Location:
      description: Location of the related resource.
      schema:
        type: string
        format: uri
      example: https://api.rebilly.com/example
    Rate-Limit-Limit:
      description: |-
        Maximum number of requests available at one time for this rate limit.
        For more information, see [Rate limits](#section/Rate-limits).
      schema:
        type: integer
      example: 500
    Rate-Limit-Remaining:
      description: |-
        Number of requests still available for this rate limit.
        For more information, see [Rate limits](#section/Rate-limits).
      schema:
        type: integer
      example: 499
    Rate-Limit-Retry-After:
      description: Number of seconds to wait before retrying the request.
      schema:
        type: integer
      example: 1
  schemas:
    CreatedTime:
      type: string
      description: |-
        Date and time when the resource is created.
        This value is set automatically when the resource is created.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Creation Time
    UpdatedTime:
      type: string
      description: |-
        Date and time when the resource is updated.
        This value is set automatically when the resource is updated.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Update Time
    Tag:
      type: object
      description: |-
        Use tags to organise and categorize customers or KYC documents based on keywords.
        For more information, see [Tags](https://www.rebilly.com/docs/dev-docs/api/tags/).
      required:
        - name
        - type
      properties:
        id:
          description: ID of the tag.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        name:
          description: |-
            Unique name for the tag.
            Tag names are not case-sensitive.
          type: string
          maxLength: 255
          pattern: ^[@~\-\.\w\s+]+$
          example: New
        type:
          description: |-
            Type of tag.
            Tags of a specific type can only be assigned to corresponding entity types.
            For example, you can only use customer tags on customers.
          type: string
          enum:
            - customer
            - kyc-document
            - aml-check
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          $ref: '#/components/schemas/SelfLink'
    BaseProblem:
      type: object
      additionalProperties: true
      minProperties: 1
      description: RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object.
      properties:
        type:
          type: string
          description: |-
            Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
            It should provide human-readable documentation for the problem type.
            When this member is not present, its value is assumed to be "about:blank".
          format: uri
        title:
          type: string
          description: |-
            Short, human-readable summary of the problem type.
            Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
        detail:
          type: string
          description: Human-readable explanation that is specific to this occurrence of the problem.
        instance:
          type: string
          description: |-
            URI reference that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
    Unauthorized:
      allOf:
        - title: Unauthorized
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 401
              maximum: 401
        - $ref: '#/components/schemas/BaseProblem'
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    Forbidden:
      allOf:
        - title: Forbidden
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 403
              maximum: 403
            error:
              type: string
              description: |-
                Message that describes why the request is forbidden.
                Most responses use a descriptive message, such as `Not allowed to change security settings`.
                If the organization requires multi-factor authentication (MFA) and MFA verification has not been completed for the session, this value is `mfa_required`.
                If MFA verification has not been completed for the session and the operation requires a confirmed session, this value is `mfa_required_for_caller`.
                This includes turning on `requireMfa` and resetting MFA for a user.
                If the organization restricts access to a list of IP addresses and the request comes from an IP address that is not in the list, this value is `ip_not_allowed`.
            organizationId:
              description: |-
                ID of the organization that requires MFA or does not allow the IP address of the request.
                This property is present only if `error` is `mfa_required` or `ip_not_allowed`.
                The organization is the organization of the request or another organization that the request acts on.
              $ref: '#/components/schemas/OrganizationId'
        - $ref: '#/components/schemas/BaseProblem'
    NotFound:
      allOf:
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 404
              maximum: 404
        - $ref: '#/components/schemas/BaseProblem'
    TooManyRequests:
      type: object
      additionalProperties: true
      minProperties: 1
      description: RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object.
      properties:
        type:
          type: string
          description: |-
            Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
            It should provide human-readable documentation for the problem type.
            When this member is not present, its value is assumed to be "about:blank".
          format: uri
          example: about:blank
        title:
          type: string
          description: |-
            Short, human-readable summary of the problem type.
            Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
          example: Rate Limit Exceeded
        status:
          type: integer
          description: HTTP status code.
          minimum: 429
          maximum: 429
        detail:
          type: string
          description: Human-readable explanation that is specific to this occurrence of the problem.
          example: A request cannot be executed because the user has sent too many requests within a certain period of time
        instance:
          type: string
          description: |-
            URI reference that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
    CustomerId:
      type: string
      description: ID of the customer resource.
      maxLength: 50
      example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
      x-basic: true
    KycDocumentTypes:
      type: string
      enum:
        - identity-proof
        - address-proof
        - funds-proof
        - purchase-proof
        - credit-file-proof
    KycDocumentSubtypes:
      type:
        - string
        - 'null'
      enum:
        - passport
        - id-card
        - driver-license
        - birth-certificate
        - utility-bill
        - rental-receipt
        - lease-agreement
        - copy-credit-card
        - credit-card-statement
        - bank-statement
        - inheritance-documentation
        - tax-return
        - salary-slip
        - sale-of-assets
        - public-health-card
        - proof-of-age-card
        - reverse-of-id
        - public-service
        - ewallet-holder-details
        - ewallet-transaction-statement
        - marriage-certificate
        - firearms-license
        - insurance-letter
        - income-statement
        - debtors-letter
        - other
        - null
    KycDocumentMatchLevels:
      description: Document verification level.
      type: integer
      enum:
        - 1
        - 2
        - 3
      default: 2
      x-enumDescriptions:
        '1': Moderate verification requirements. This option is used for sale transactions.
        '2': Strict verification requirements. This option is used for credit transactions.
        '3': Basic verification requirements. This option is used when a high level of verification is not required.
    KycDocumentRejection:
      description: Reason the document is rejected.
      type:
        - object
        - 'null'
      required:
        - type
      readOnly: true
      properties:
        type:
          $ref: '#/components/schemas/KycDocumentRejectionReasonTypes'
        message:
          description: KYC document rejection message.
          type: string
          maxLength: 255
          example: Provided document is unreadable
    KycDocumentMatchesVersion:
      type: string
      description: Version of the document matches.
      readOnly: true
      example: '2.0'
    KycDocumentMatchesScore:
      type: integer
      description: Calculated score that represents the percentage of confidence that this ID document represents the customer.
      minimum: 0
      maximum: 100
      example: 75
    KycDocumentCheckList:
      type:
        - array
        - 'null'
      description: List of checks executed against the document during KYC verification.
      items:
        $ref: '#/components/schemas/KycDocumentCheck'
    KycIdentityMatches:
      type: object
      description: Matched identity data.
      properties:
        containsImage:
          description: Specifies if the document includes an image that contains a face.
          type: boolean
          example: true
        isIdentityDocument:
          description: Specifies if the document resembles an ID.
          type: boolean
          example: true
        isPublishedOnline:
          description: Specifies if an exact match of the document has been found online.
          type: boolean
          example: false
        matchingImages:
          description: URLs where matching images have been found online.
          type: array
          readOnly: true
          maxItems: 3
          items:
            type: string
        firstName:
          description: |-
            First name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: John
        lastName:
          description: |-
            Last name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: Doe
        dateOfBirth:
          description: |-
            Date of birth detected on the document.
            This value is null if no match is detected.
          type:
            - string
            - 'null'
          format: date-time
        expirationDate:
          description: |-
            Expiration date detected on the document.
            This value is null if no expiration date is detected.
          type:
            - string
            - 'null'
          format: date-time
        isExpired:
          description: |-
            Specifies if the expiration date detected on the document has passed.
            This value is `null` if no expiration date is detected.
          type:
            - boolean
            - 'null'
          readOnly: true
          example: false
        issueDate:
          description: |-
            Issue date detected on the document.
            This value is null if no issue date is detected.
          type:
            - string
            - 'null'
          format: date-time
        hasMinimalAge:
          description: |-
            Specifies that the individual is older than the minimal age limit.
            The minimal age is 21+ the for USA and 18+ for all other countries.
            This value is null if `dateOfBirth` is not determined.
          type:
            - boolean
            - 'null'
          readOnly: true
          example: true
        matchesDateOfBirth:
          description: |-
            Specifies if the date of birth detected on the document matches the date of birth of the customer.
            This value is `null` if no date of birth is detected on the document or the customer has no date of birth.
          type:
            - boolean
            - 'null'
          readOnly: true
          example: true
        nationality:
          description: |-
            Nationality detected on a passport or citizenship document.
            This value is null if no nationality is detected.
          type:
            - string
            - 'null'
          example: US
          maxLength: 3
        issuanceCountry:
          description: Country that issued the document.
          type:
            - string
            - 'null'
          example: CA
          minLength: 2
          maxLength: 2
        issuanceRegion:
          description: Region, state, province, or territory that issued the document.
          type:
            - string
            - 'null'
          example: Ontario
        documentNumber:
          description: |-
            Unique number on the identity document.
            This value may contain alphanumeric characters.
          type:
            - string
            - 'null'
          example: '1234567890'
        sex:
          description: |-
            MRZ sex code (ICAO 9303).
            `M`, `F`, or `X`.
            Null if not extracted.
          type:
            - string
            - 'null'
          pattern: ^[MFX]$
          example: M
        mrzChecksumValid:
          description: |-
            MRZ check digits validation.
            Null if there is no MRZ, no check data, or a non-standard layout.
          type:
            - boolean
            - 'null'
          readOnly: true
          example: true
        documentSubtype:
          description: Interpreted subtype of the uploaded document.
          type:
            - string
            - 'null'
          $ref: '#/components/schemas/KycDocumentSubtypes'
        hasMatchingFaceProof:
          description: Specifies if an identity document has matching face proof.
          type: boolean
          example: false
        isTampered:
          description: Specifies if an identity document has been tampered with.
          type: boolean
          example: false
        isDigitallyTampered:
          description: Specifies if an identity document has been digitally tampered with (experimental).
          type: boolean
          example: false
        isPhotocopy:
          description: Specifies if an identity document is detected as a photocopy.
          type: boolean
          example: false
        hasCompletedFaceLiveness:
          description: Specifies if the face liveness session completed.
          type: boolean
          readOnly: true
          example: false
        faceProofBrightness:
          description: |-
            Brightness of the lighting in the detected face area of the face proof image, on a scale from `0` to `100`.
            A higher value indicates brighter lighting.
            This value is `null` if no face proof is compared with the document.
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 100
          readOnly: true
          example: 72.5
        expiryDate:
          description: Use `expirationDate` field instead.
          type:
            - string
            - 'null'
          format: date-time
          deprecated: true
    KycSettingsIdentity:
      type: object
      description: Identity proof settings.
      properties:
        weights:
          type: object
          description: |-
            Property weights that are used for the KYC document verification process.

            All KYC documents start the verification process with a score of 100.
            If a check fails, the score is reduced by the corresponding weight.
            For example, if the `firstName` check weight is set to `5`, and the check fails,
            the KYC document score becomes `95`.
          properties:
            containsImage:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document does not include an image that contains a face.
            isIdentityDocument:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document does not resemble an ID.
            isPublishedOnline:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if an exact match of the document is not found online.
            firstName:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's first name is not matched.
            lastName:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's last name is not matched.
            expirationDate:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if an expiration date is not detected on the document.
            dateOfBirth:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if a date of birth is not detected on the document, or if the date of birth detected on the document is not matched.
            issueDate:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if an issue date is not detected on the document.
            hasMinimalAge:
              type: integer
              minimum: 0
              maximum: 100
              description: |-
                Weight added if the document does not verify the minimal age limit.
                Minimal age is 21+ the for USA and 18+ for all other countries.
            hasMatchingFaceProof:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if an identity document does not have matching face proof.
            nationality:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if a nationality is not detected on the document.
            documentSubtype:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document is not one of the recognized document subtypes.
            isTampered:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document has been tampered with.
            isPhotocopy:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document is detected as a photocopy.
            mrzChecksum:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added when MRZ check digits fail validation.
            documentNumber:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if a document number is not detected on the document.
            issuanceCountry:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the country that issued the document is not detected.
            issuanceRegion:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the region, state, province, or territory that issued the document is not detected.
        thresholds:
          type: object
          description: Pass and fail threshold definition for the document verification process.
          properties:
            rejectBelow:
              type: integer
              minimum: 0
              maximum: 100
              description: Overall score by which an identity proof document fails the verification process.
            acceptAbove:
              type: integer
              minimum: 0
              maximum: 100
              description: Overall score by which an identity proof document passes the verification process.
        minimumAgeSettings:
          type: object
          description: Minimum age settings for identity proof documents.
          properties:
            defaultMinimumAge:
              type: integer
              minimum: 1
              maximum: 100
              description: |-
                Default minimum age requirement for identity proof documents.
                This is used when no location-specific override is configured.
              default: 18
            locationOverrides:
              type: array
              description: |-
                Location-specific minimum age.
                Each item specifies a minimum age for a specific location.
                For country-wide rules, omit the state field.
                For state-specific rules, include the state field.
              items:
                type: object
                required:
                  - country
                  - minimumAge
                properties:
                  country:
                    type: string
                    description: Country code in ISO 3166 alpha-2 format.
                    pattern: ^[A-Z]{2}$
                    example: US
                  state:
                    type: string
                    description: Name or code of the state or region.
                    maxLength: 45
                    example: AZ
                  minimumAge:
                    type: integer
                    description: Minimum age requirement for this location.
                    minimum: 1
                    maximum: 100
                    example: 21
              example:
                - country: US
                  minimumAge: 21
                - country: US
                  state: AL
                  minimumAge: 19
        faceProofSettings:
          type: object
          description: Quality requirements for the face proof image of an identity proof document.
          properties:
            minimumBrightness:
              type: integer
              minimum: 0
              maximum: 100
              default: 40
              description: |-
                Minimum brightness of the lighting in the detected face area of the face proof image.
                The brightness scale ranges from `0` to `100`.
                A higher value indicates brighter lighting.
                If the detected brightness is below this value,
                the `hasMatchingFaceProof` check fails with the `face_match_low_brightness` reason.
                Use `0` to disable the brightness requirement.
    ProofOfIdentityKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of identity document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycIdentityMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycIdentityMatches'
        settings:
          description: Settings used to score the document.
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/KycSettingsIdentity'
            - type: 'null'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    KycAddressMatches:
      type: object
      description: Matched address data.
      properties:
        firstName:
          description: |-
            First name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: John
        lastName:
          description: |-
            Last name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: Doe
        line1:
          description: |-
            Address of the customer's residence.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: 36 Craven St
        city:
          description: |-
            Customer's city of residence.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: London
        region:
          description: |-
            Customer's region of residence.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: London
        postalCode:
          description: |-
            Postal code of the customer's residence.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: WC2N 5NF
        wordCount:
          description: Total number of words in the document.
          type: integer
          example: 350
        uniqueWords:
          description: Total number of unique words in the document.
          type: integer
          example: 175
        date:
          description: |-
            Date detected on the document.
            Use this field to determine if the document is recent.
          type:
            - string
            - 'null'
          format: date-time
          example: '2021-01-01T00:00:00+00:00'
        phone:
          description: Phone number of the company or agency that issued the document.
          type:
            - string
            - 'null'
          example: (123) 456-7890
        documentSubtype:
          description: Interpreted subtype of the uploaded document.
          type:
            - string
            - 'null'
          $ref: '#/components/schemas/KycDocumentSubtypes'
        isTampered:
          description: Specifies if an address proof document has been tampered with.
          type: boolean
          example: false
    KycSettingsAddress:
      type: object
      description: Address proof settings.
      properties:
        weights:
          type: object
          description: |-
            Property weights that are used for the KYC document verification process.

            All KYC documents start the verification process with a score of 100.
            If a check fails, the score is reduced by the corresponding weight.
            For example, if the `firstName` check weight is set to `5`, and the check fails,
            the KYC document score becomes `95`.
          properties:
            firstName:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's first name is not matched.
            lastName:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's last name is not matched.
            line1:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's address is not matched.
            city:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's city is not matched.
            region:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's region is not matched.
            postalCode:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the customer's postal code is not matched.
            date:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if a date is not detected on the document.
            phone:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if a phone number is not detected on the document.
            documentSubtype:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document is not one of the recognized document subtypes.
            isTampered:
              type: integer
              minimum: 0
              maximum: 100
              description: Weight added if the document has been tampered with.
        thresholds:
          type: object
          description: Pass and fail threshold definition for the document verification process.
          properties:
            rejectBelow:
              type: integer
              minimum: 0
              maximum: 100
              description: Overall score by which an identity proof document fails the verification process.
            acceptAbove:
              type: integer
              minimum: 0
              maximum: 100
              description: Overall score by which an identity proof document passes the verification process.
    ProofOfAddressKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycAddressMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycAddressMatches'
        settings:
          description: Settings used to score the document.
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/KycSettingsAddress'
            - type: 'null'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    FundsMatches:
      type: object
      properties:
        firstName:
          description: |-
            First name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: John
        lastName:
          description: |-
            Last name of the customer.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: Doe
        documentSubtype:
          description: Interpreted subtype of the uploaded document.
          type:
            - string
            - 'null'
          $ref: '#/components/schemas/KycDocumentSubtypes'
    ProofOfFundsKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of funds document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/FundsMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/FundsMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    PurchaseMatches:
      type: object
      properties:
        firstName:
          description: |-
            First name of the customer if it is matched.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: John
        lastName:
          description: |-
            Last name of the customer if it is matched.
            This value is null if no match is found.
          type:
            - string
            - 'null'
          example: Doe
        paymentInstrumentId:
          type:
            - string
            - 'null'
          description: |-
            ID of the payment instrument related to the document.
            This value is null if no match is found.
          example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
        documentSubtype:
          description: Interpreted subtype of the uploaded document.
          type:
            - string
            - 'null'
          $ref: '#/components/schemas/KycDocumentSubtypes'
    ProofOfPurchaseKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of purchase document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/PurchaseMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/PurchaseMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
                  - paymentInstrument
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    CreditFileMatches:
      type: object
      properties:
        creditBureau:
          description: Credit bureau from which the credit file data is sourced.
          type: string
          readOnly: true
          enum:
            - equifax
            - experian
            - transunion
            - test-bureau
        creditFileNumber:
          description: Credit file number from the credit bureau.
          type: string
          readOnly: true
        name:
          description: Name of the person to consult about the credit file.
          type: string
          readOnly: true
        consultedDate:
          description: Date to consult with the credit bureau about the credit file.
          type: string
          format: date-time
          readOnly: true
        decision:
          description: Specifies if the credit file is used in a single source, or as part of a dual source, proof of identity decision.
          type: string
          enum:
            - single-source
            - dual-source
            - other
          x-enumDescriptions:
            single-source: Credit file used as a single source of proof for an identity decisions.
            dual-source: |-
              Credit file used as a source of proof where the credit bureau agency found two reliable trade sources.
              At least two sources are required for a dual-source proof of identity decision.
            other: Credit file cannot be used for KYC decisions.
          readOnly: true
        trades:
          description: Contains information to support the dual process.
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Trade name.
                example: Rogers
              accountNumber:
                type: string
                example: 123-ABC-123
              dateOpened:
                type: string
                format: date
          readOnly: true
        referenceData:
          description: Extra data from the credit bureau.
          readOnly: true
          type: object
          properties:
            singleSourceHit:
              description: Single source hit.
              type: string
              readOnly: true
              example: 'Y'
            dualSourceHit:
              description: Dual source hit.
              type: string
              readOnly: true
              example: 'Y'
            waterfallProcess:
              description: Waterfall process.
              type: string
              readOnly: true
              example: 'Y'
            creditFileCreatedDate:
              description: Date when the credit file is created.
              type: string
              readOnly: true
            numberOfTradesOnFile:
              description: Number of trades on file.
              type: string
              readOnly: true
              example: '001'
            singleDecision:
              description: Data related to a single source decision.
              type: object
              allOf:
                - $ref: '#/components/schemas/CreditFileCommonDecisionData'
            dualDecision:
              description: Data related to a dual source decision.
              type:
                - array
                - 'null'
              items:
                allOf:
                  - $ref: '#/components/schemas/CreditFileCommonDecisionData'
    ProofOfCreditFileKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          description: Proof of credit document matches.
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/CreditFileMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/CreditFileMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    KycDocument:
      type: object
      description: KYC document information.
      discriminator:
        propertyName: documentType
        mapping:
          identity-proof: '#/components/schemas/ProofOfIdentityKycDocument'
          address-proof: '#/components/schemas/ProofOfAddressKycDocument'
          funds-proof: '#/components/schemas/ProofOfFundsKycDocument'
          purchase-proof: '#/components/schemas/ProofOfPurchaseKycDocument'
          credit-file-proof: '#/components/schemas/ProofOfCreditFileKycDocument'
      oneOf:
        - $ref: '#/components/schemas/ProofOfIdentityKycDocument'
        - $ref: '#/components/schemas/ProofOfAddressKycDocument'
        - $ref: '#/components/schemas/ProofOfFundsKycDocument'
        - $ref: '#/components/schemas/ProofOfPurchaseKycDocument'
        - $ref: '#/components/schemas/ProofOfCreditFileKycDocument'
  responses:
    Unauthorized:
      description: |-
        Unauthorized access.
        Invalid credentials used.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    Forbidden:
      description: |-
        Access forbidden.
        If the organization requires multi-factor authentication (MFA) and the session has not passed MFA, `error` is `mfa_required`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    TooManyRequests:
      description: Request rate limit exceeded.
      headers:
        Rate-Limit-Limit:
          $ref: '#/components/headers/Rate-Limit-Limit'
        Rate-Limit-Remaining:
          description: |-
            Number of requests still available for this rate limit.
            For more information, see [Rate limits](#section/Rate-limits).
          schema:
            type: integer
          example: 0
        Rate-Limit-Retry-After:
          $ref: '#/components/headers/Rate-Limit-Retry-After'
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
          example: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TooManyRequests'
```
