> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idmetagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Verification

> Validate document authenticity and integrity through forensic checks.

When the request fails validation or image quality checks, the API may return an error whose message matches one of the entries below.

| Description                                   | Message                                                                                                                                                                               |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Document uploaded is not an image             | The image front side must be an image.                                                                                                                                                |
| Failure to upload front image                 | Something went wrong                                                                                                                                                                  |
| Failure to upload back image                  | Something went wrong regarding back image status                                                                                                                                      |
| Invalid front/back image extension            | Invalid Image, only JPG, JPEG and PNG are allowed                                                                                                                                     |
| Image uploaded is cropped                     | The provided document is fully cropped which is not in line with image quality guidelines.                                                                                            |
| Image extraction failure due to image quality | Unable to process due to extraction failure. Providing better-quality front and back images might solve this issue. Ensure the images are not cropped and that all edges are visible. |
| Missing front side image                      | The image front side field is required.                                                                                                                                               |


## OpenAPI

````yaml api-reference-legacy/openapi.json POST /api/v1/verification/document_verification
openapi: 3.0.3
info:
  title: IDmeta API
  description: IDmeta verification and integration API.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://{environment-subdomain}.idmetagroup.com
    description: Your environment (replace `{environment-subdomain}`)
    variables:
      environment-subdomain:
        default: integrate
        description: IDmeta environment subdomain
security:
  - bearerAuth: []
tags:
  - name: Processes
    description: Verification process endpoints
  - name: Compliance
    description: Compliance verification endpoints
  - name: Government Data
    description: Government data verification endpoints
paths:
  /api/v1/verification/document_verification:
    post:
      tags:
        - Compliance
      summary: Document Verification V2 Beta
      description: Validate document authenticity and integrity through forensic checks.
      operationId: documentVerification
      parameters:
        - name: Accept
          in: header
          required: false
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: false
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentVerificationRequest'
            examples:
              default:
                summary: Document verification with base64 images
                value:
                  imageFrontSide: base64string_of_front_image
                  imageBackSide: base64string_of_back_image
                  template_id: '{your_trust_flow_id}'
                  verification_id: '{your_created_verification_id}'
      responses:
        '200':
          description: Document verification completed successfully
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerificationResponse'
              example:
                processingStatus: Completed
                verification:
                  recommendedOutcome: Accept
                  result: Pass
                  certaintyLevel: High
                  performedChecks: 16
                  type: DetailedCheck
                checks:
                  - name: ExtractedDataCheck
                    result: Pass
                    certaintyLevel: High
                    type: DetailedCheck
                    checks:
                      - name: MatchCheck
                        result: NotPerformed
                        matchLevel: Unknown
                        type: TieredCheck
                        checks:
                          - field: FirstName
                            result: NotPerformed
                            type: FieldCheck
                          - field: LastName
                            result: NotPerformed
                            type: FieldCheck
                          - field: FullName
                            result: NotPerformed
                            type: FieldCheck
                          - field: Address
                            result: NotPerformed
                            type: FieldCheck
                          - field: PlaceOfBirth
                            result: NotPerformed
                            type: FieldCheck
                          - field: Race
                            result: NotPerformed
                            type: FieldCheck
                          - field: Religion
                            result: NotPerformed
                            type: FieldCheck
                          - field: Profession
                            result: NotPerformed
                            type: FieldCheck
                          - field: MaritalStatus
                            result: NotPerformed
                            type: FieldCheck
                          - field: ResidentialStatus
                            result: NotPerformed
                            type: FieldCheck
                          - field: Employer
                            result: NotPerformed
                            type: FieldCheck
                          - field: Sex
                            result: NotPerformed
                            type: FieldCheck
                          - field: DateOfBirth
                            result: NotPerformed
                            type: FieldCheck
                          - field: DateOfIssue
                            result: NotPerformed
                            type: FieldCheck
                          - field: DateOfExpiry
                            result: NotPerformed
                            type: FieldCheck
                          - field: DocumentNumber
                            result: NotPerformed
                            type: FieldCheck
                          - field: PersonalIdNumber
                            result: NotPerformed
                            type: FieldCheck
                          - field: DocumentAdditionalNumber
                            result: NotPerformed
                            type: FieldCheck
                          - field: DocumentOptionalAdditionalNumber
                            result: NotPerformed
                            type: FieldCheck
                      - name: LogicCheck
                        result: Pass
                        type: Check
                        checks:
                          - name: DateLogicCheck
                            result: Pass
                            type: Check
                            checks:
                              - name: DateOfBirthInPastCheck
                                result: Pass
                                type: Check
                          - name: DocumentNumberLogic
                            result: Pass
                            type: Check
                      - name: FieldFormatCheck
                        result: Pass
                        type: Check
                        checks:
                          - field: DateOfBirth
                            result: Pass
                            type: FieldCheck
                          - field: DocumentNumber
                            result: Pass
                            type: FieldCheck
                          - field: Sex
                            result: Pass
                            type: FieldCheck
                      - name: BarcodeAuthenticity
                        result: NotPerformed
                        matchLevel: Unknown
                        type: TieredCheck
                        checks:
                          - name: ContentCheck
                            result: NotPerformed
                            type: Check
                          - name: ReadCheck
                            result: NotPerformed
                            type: Check
                      - name: SuspiciousDataCheck
                        result: Pass
                        certaintyLevel: High
                        type: DetailedCheck
                        checks:
                          - name: SuspiciousNumberCheck
                            result: Pass
                            certaintyLevel: High
                            type: DetailedCheck
                          - name: SampleStringCheck
                            result: Pass
                            certaintyLevel: High
                            type: DetailedCheck
                      - name: DataIntegrityCheck
                        result: Pass
                        type: Check
                      - name: MRZCheck
                        result: NotPerformed
                        type: Check
                        checks:
                          - name: Parsed
                            result: NotPerformed
                            type: Check
                          - name: CheckDigits
                            result: NotPerformed
                            type: Check
                  - name: DocumentLivenessCheck
                    result: Pass
                    type: Check
                    checks:
                      - name: ScreenCheck
                        result: Pass
                        matchLevel: Level10
                        type: TieredCheck
                      - name: PhotocopyCheck
                        result: Pass
                        matchLevel: Level10
                        type: TieredCheck
                  - name: VisualCheck
                    result: Pass
                    type: Check
                    checks:
                      - name: PhotoForgeryCheck
                        result: Pass
                        matchLevel: Level10
                        type: TieredCheck
                      - name: SecurityFeatures
                        result: Pass
                        matchLevel: Level10
                        type: TieredCheck
                        details:
                          Segments:
                            - result: Pass
                              type: Rectangle
                              bounds:
                                x: 0.041353516
                                'y': 0.019382654
                                width: 0.5466787
                                height: 0.20280664
                            - result: Pass
                              type: Rectangle
                              bounds:
                                x: 0.5870397
                                'y': 0.0046767755
                                width: 0.15426645
                                height: 0.23176001
                            - result: Pass
                              type: Rectangle
                              bounds:
                                x: 0.7454213
                                'y': 0.029417524
                                width: 0.2191328
                                height: 0.19485275
                            - result: Pass
                              type: Rectangle
                              bounds:
                                x: 0.09376193
                                'y': 0.324977
                                width: 0.17347312
                                height: 0.24438348
                      - name: GenerativeAiCheck
                        result: NotPerformed
                        matchLevel: Unknown
                        type: TieredCheck
                  - name: DocumentValidityCheck
                    result: NotPerformed
                    type: Check
                    checks:
                      - name: VersionCheck
                        result: NotPerformed
                        type: Check
                      - name: ExpiredCheck
                        result: NotPerformed
                        type: Check
                processIndicators:
                  - name: Clarity
                    type: ImageQuality
                    result: Pass
                  - name: HandPresence
                    type: ScanProcess
                    result: Fail
                  - name: Cropped
                    type: ImageQuality
                    result: Pass
                extraction:
                  processingStatus: AwaitingOtherSide
                  recognitionStatus: StageValid
                  overall:
                    - side: Unknown
                      script: Latin
                      value: JOHN DOE
                      type: DetailedStringResult
                      field: FullName
                    - side: Unknown
                      script: Latin
                      value: SAMPLE ADDRESS
                      type: DetailedStringResult
                      field: Address
                    - originalResult:
                        - side: Unknown
                          script: Latin
                          value: '900101'
                          type: DetailedStringResult
                      day: 1
                      month: 1
                      year: 1990
                      successfullyParsed: true
                      filledByDomainKnowledge: false
                      type: DetailedDateResult
                      field: DateOfBirth
                    - side: Unknown
                      script: Latin
                      value: 900101-08-5555
                      type: DetailedStringResult
                      field: DocumentNumber
                    - side: Unknown
                      script: Latin
                      value: LELAKI
                      type: DetailedStringResult
                      field: Sex
                  viz:
                    front:
                      - side: Front
                        script: Latin
                        value: JOHN DOE
                        type: DetailedStringResult
                        field: FullName
                      - side: Front
                        script: Latin
                        value: SAMPLE ADDRESS
                        type: DetailedStringResult
                        field: Address
                      - originalResult:
                          - side: Unknown
                            script: Latin
                            value: '900101'
                            type: DetailedStringResult
                        day: 1
                        month: 1
                        year: 1990
                        successfullyParsed: true
                        filledByDomainKnowledge: false
                        type: DetailedDateResult
                        field: DateOfBirth
                      - side: Front
                        script: Latin
                        value: 900101-08-5555
                        type: DetailedStringResult
                        field: DocumentNumber
                      - side: Front
                        script: Latin
                        value: LELAKI
                        type: DetailedStringResult
                        field: Sex
                    back: []
                  barcode:
                    - value: ''
                      type: StringResult
                      field: RawDataBase64
                  classInfo:
                    country: Malaysia
                    type: MyKad
                    region: None
                    isoAlpha3CountryCode: MYS
                    isoAlpha2CountryCode: MY
                    isoNumericCountryCode: '458'
                images:
                  - name: FullDocumentFrontImage
                    base64: https://storage.googleapis.com/...
                  - name: FaceImage
                    base64: https://storage.googleapis.com/...
components:
  schemas:
    DocumentVerificationRequest:
      type: object
      required:
        - imageFrontSide
        - template_id
        - verification_id
      properties:
        imageFrontSide:
          type: string
          description: Base64 string for the front-side document image.
        imageBackSide:
          type: string
          description: Base64 string for the back-side document image.
        template_id:
          type: string
          description: >-
            Identifier used to categorize or group requests for tracking or
            reporting.
        verification_id:
          type: string
          description: A unique ID used to identify your verification request.
    DocumentVerificationResponse:
      type: object
      properties:
        processingStatus:
          type: string
        verification:
          type: object
          additionalProperties: true
        checks:
          type: array
          items:
            type: object
            additionalProperties: true
        processIndicators:
          type: array
          items:
            type: object
            additionalProperties: true
        extraction:
          type: object
          additionalProperties: true
        messages:
          type: array
          items:
            type: object
            additionalProperties: true
        runtime:
          type: object
          additionalProperties: true
        images:
          type: array
          items:
            type: object
            additionalProperties: true
        optionsUsed:
          type: object
          additionalProperties: true
        useCaseUsed:
          type: object
          additionalProperties: true
        riskRating:
          type: string
          description: >-
            Overall risk rating for the document verification result (for
            example LOW, MEDIUM, HIGH).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use `Bearer {your_api_token}` in the Authorization header.

````