> ## 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 V2

> Verify identity documents with OCR extraction, cropped images, and security checks.

Document Verification V2 evaluates the uploaded document images and returns structured results in the response `data` object. Use these fields to understand both what was extracted from the document and why the overall `verificationStatus` was assigned.

### Verification statuses

`verificationStatuses` gives a high-level result for each major stage. Each item includes a `verificationType` and a `verificationStatus` of `Passed`, `Failed`, or `Not Performed` (when the check does not apply or could not run):

| Check                     | What it evaluates                                             |
| ------------------------- | ------------------------------------------------------------- |
| `DocumentTypeCheck`       | Whether the document type and issuing country were recognized |
| `DocumentSecurityCheck`   | Whether authenticity and security signals passed              |
| `DocumentExpirationCheck` | Whether the document is within its validity period            |
| `DocumentQualityCheck`    | Whether the capture meets quality requirements                |
| `DocumentTextExtraction`  | Whether OCR successfully extracted text from the document     |

### Image quality

`imageQuality` reports capture-level checks so you can tell if a failure came from a poor photo rather than a fraudulent document. Typical checks include focus, glare, portrait presence, document bounds, perspective, resolution, and colorness.

### Security checks

`securityChecks` reports authenticity and fraud signals, including:

* Document image patterns
* Photo forgery
* Human face in the portrait
* Document liveness
* Black-and-white copy detection
* Occlusion (blocked or covered areas)

### Extracted data and document type

`extractedData` returns OCR text fields (often from both visual and barcode sources), cropped images such as the portrait and document sides, and barcode payloads when available. `documentType` identifies the recognized document name, country, year, and type (for example, `identity_card`).


## OpenAPI

````yaml api-reference/openapi.json POST /api/v3/verifications/document-verification-v2
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: Trust Flow Links
    description: Trust Flow link generation endpoints
  - name: Compliance
    description: Compliance verification endpoints
  - name: Government Data
    description: Government data verification endpoints
  - name: Alternative Verifications
    description: Alternative verification and intelligence endpoints
  - name: OCR
    description: Document OCR extraction endpoints
paths:
  /api/v3/verifications/document-verification-v2:
    post:
      tags:
        - Compliance
      summary: Document Verification V2
      description: >-
        Verify identity documents by uploading front and optional back images as
        multipart form data. The response returns OCR text fields and cropped
        images under `extractedData`, document type classification, image
        quality results, and security checks such as photo forgery and liveness.
      operationId: documentVerificationV2
      parameters:
        - name: Accept
          in: header
          required: false
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DocumentVerificationV2Request'
            examples:
              default:
                summary: Document verification v2 with front and back images
                value:
                  trustFlowId: 0
                  trustValidationId: '{your_trust_validation_id}'
                  imageFrontSide: '@/path/to/front.jpg'
                  imageBackSide: '@/path/to/back.jpg'
      responses:
        '200':
          description: Document verification processed successfully
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerificationV2Response'
              example:
                success: true
                message: Document verification processed successfully
                data:
                  verificationStatuses:
                    - verificationType: DocumentTypeCheck
                      verificationStatus: Passed
                    - verificationType: DocumentSecurityCheck
                      verificationStatus: Passed
                    - verificationType: DocumentExpirationCheck
                      verificationStatus: Not Performed
                    - verificationType: DocumentQualityCheck
                      verificationStatus: Passed
                    - verificationType: DocumentTextExtraction
                      verificationStatus: Passed
                  extractedData:
                    images:
                      - imageTypeName: Portrait
                        imageType: Portrait
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Portrait-sample.jpeg
                      - imageTypeName: Barcode
                        imageType: Barcode
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Barcode-sample-1.jpeg
                      - imageTypeName: Barcode
                        imageType: Barcode
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Barcode-sample-2.jpeg
                      - imageTypeName: Document Front Side
                        imageType: DocumentFrontSide
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Document-front-side-sample.jpeg
                      - imageTypeName: Document Back Side
                        imageType: DocumentBackSide
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Document-back-side-sample.jpeg
                      - imageTypeName: Ghost Portrait
                        imageType: GhostPortrait
                        imageURL: >-
                          https://storage.example.com/sample/00000000-0000-4000-8000-000000000001/Ghost-portrait-sample.jpeg
                    textFields:
                      - fieldName: Full Name
                        fieldType: FullName
                        value: JANE ALEX SAMPLE
                        source: BARCODE
                      - fieldName: Full Name
                        fieldType: FullName
                        value: JANE ALEX SAMPLE
                        source: VISUAL
                      - fieldName: Surname
                        fieldType: Surname
                        value: SAMPLE
                        source: BARCODE
                      - fieldName: Surname
                        fieldType: Surname
                        value: SAMPLE
                        source: VISUAL
                      - fieldName: Surname (English (Philippines))
                        fieldType: SurnameEnglishPhilippines
                        value: SAMPLE
                        source: BARCODE
                      - fieldName: Surname (English (Philippines))
                        fieldType: SurnameEnglishPhilippines
                        value: SAMPLE
                        source: VISUAL
                      - fieldName: Given Names
                        fieldType: GivenNames
                        value: JANE
                        source: BARCODE
                      - fieldName: Given Names
                        fieldType: GivenNames
                        value: JANE
                        source: VISUAL
                      - fieldName: Given Names (English (Philippines))
                        fieldType: GivenNamesEnglishPhilippines
                        value: JANE
                        source: BARCODE
                      - fieldName: Given Names (English (Philippines))
                        fieldType: GivenNamesEnglishPhilippines
                        value: JANE
                        source: VISUAL
                      - fieldName: Date of Birth
                        fieldType: DateOfBirth
                        value: '1990-01-15'
                        source: BARCODE
                      - fieldName: Date of Birth
                        fieldType: DateOfBirth
                        value: '1990-01-15'
                        source: VISUAL
                      - fieldName: Document Number
                        fieldType: DocumentNumber
                        value: '1234567890123456'
                        source: BARCODE
                      - fieldName: Document Number
                        fieldType: DocumentNumber
                        value: '1234567890123456'
                        source: VISUAL
                      - fieldName: Issuing State Name
                        fieldType: IssuingStateName
                        value: Philippines
                      - fieldName: Date of Issue
                        fieldType: DateOfIssue
                        value: '2023-08-29'
                        source: BARCODE
                      - fieldName: Date of Issue
                        fieldType: DateOfIssue
                        value: '2023-08-29'
                        source: VISUAL
                      - fieldName: Sex
                        fieldType: Sex
                        value: Female
                        source: BARCODE
                      - fieldName: Sex
                        fieldType: Sex
                        value: F
                        source: VISUAL
                      - fieldName: Age
                        fieldType: Age
                        value: '36'
                        source: BARCODE
                      - fieldName: Age
                        fieldType: Age
                        value: '36'
                        source: VISUAL
                      - fieldName: Address (English (Philippines))
                        fieldType: AddressEnglishPhilippines
                        value: 123 SAMPLE STREET, SAMPLE BARANGAY, SAMPLE CITY, NCR
                      - fieldName: Issuing State Code
                        fieldType: IssuingStateCode
                        value: PHL
                      - fieldName: Authority
                        fieldType: Authority
                        value: PSA
                      - fieldName: Middle Name
                        fieldType: MiddleName
                        value: ALEX
                        source: BARCODE
                      - fieldName: Middle Name
                        fieldType: MiddleName
                        value: ALEX
                        source: VISUAL
                      - fieldName: Place of Birth
                        fieldType: PlaceOfBirth
                        value: Sample City, Sample Province
                        source: BARCODE
                      - fieldName: Place of Birth
                        fieldType: PlaceOfBirth
                        value: SAMPLE CITY, SAMPLE PROVINCE
                        source: VISUAL
                      - fieldName: Age at Issue
                        fieldType: AgeAtIssue
                        value: '33'
                        source: BARCODE
                      - fieldName: Age at Issue
                        fieldType: AgeAtIssue
                        value: '33'
                        source: VISUAL
                      - fieldName: Years Since Issue
                        fieldType: YearsSinceIssue
                        value: '2'
                        source: BARCODE
                      - fieldName: Years Since Issue
                        fieldType: YearsSinceIssue
                        value: '2'
                        source: VISUAL
                      - fieldName: Middle Name (English (Philippines))
                        fieldType: MiddleNameEnglishPhilippines
                        value: ALEX
                        source: BARCODE
                      - fieldName: Middle Name (English (Philippines))
                        fieldType: MiddleNameEnglishPhilippines
                        value: ALEX
                        source: VISUAL
                      - fieldName: Marital Status
                        fieldType: MaritalStatus
                        value: SINGLE
                      - fieldName: Blood Group
                        fieldType: BloodGroup
                        value: O+
                      - fieldName: Other
                        fieldType: Other
                        value: SAMPLECODE01
                    dateFormat: yyyy-MM-dd
                    barcodeData:
                      textFields:
                        - barcodeData: U0FNUExFQkFSQ09ERTE=
                          barcodeType: 1
                        - barcodeData: eyJzYW1wbGUiOiJ0cnVlIn0=
                          barcodeType: 14
                  documentType:
                    documentName: Philippines - Id Card (2020) Side B
                    country: Philippines
                    documentYear: '2020'
                    documentType: identity_card
                    filteredCountry: null
                    filteredDocumentTypes: null
                    documentTypeMatchesFilter: null
                  imageQuality:
                    - imageQualityCheckType: ImageFocus
                      result: Passed
                    - imageQualityCheckType: ImageGlares
                      result: Failed
                    - imageQualityCheckType: Potraits
                      result: Passed
                    - imageQualityCheckType: Bounds
                      result: Passed
                    - imageQualityCheckType: Perspective
                      result: Passed
                    - imageQualityCheckType: ImageResolution
                      result: Passed
                    - imageQualityCheckType: ImageColorness
                      result: Passed
                  securityChecks:
                    - securityCheckType: DocumentImagePatterns
                      result: Passed
                    - securityCheckType: PhotoForgery
                      result: Passed
                    - securityCheckType: HumanFacePhoto
                      result: Passed
                    - securityCheckType: LivenessCheck
                      result: Passed
                    - securityCheckType: BlackAndWhiteCopyCheck
                      result: Passed
                    - securityCheckType: Occlusion
                      result: Passed
                  timeToVerify: 2315
                verificationStatus: VERIFIED
                verificationStatusCode: 3
                trustFlowId: 0
                trustValidationId: 00000000-0000-4000-8000-000000000001
                verificationType: document_verification_v2
                metadata: null
                createdAt: 2026-08-05 13:24:13+0000
components:
  schemas:
    DocumentVerificationV2Request:
      type: object
      required:
        - imageFrontSide
        - trustFlowId
        - trustValidationId
      properties:
        imageFrontSide:
          type: string
          format: binary
          description: Front-side document image file (JPG, JPEG, or PNG).
        imageBackSide:
          type: string
          format: binary
          description: >-
            Back-side document image file (JPG, JPEG, or PNG). Required when the
            document type has a back side.
        trustFlowId:
          type: integer
          description: >-
            Identifier used to categorize or group requests for tracking or
            reporting.
        trustValidationId:
          type: string
          description: A unique ID used to identify your verification request.
    DocumentVerificationV2Response:
      type: object
      required:
        - success
        - message
        - data
        - verificationStatus
        - verificationStatusCode
        - trustFlowId
        - trustValidationId
        - verificationType
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            verificationStatuses:
              type: array
              description: High-level status for each verification check performed.
              items:
                type: object
                properties:
                  verificationType:
                    type: string
                  verificationStatus:
                    type: string
            extractedData:
              type: object
              description: >-
                OCR text fields, cropped images, and barcode data extracted from
                the document.
              properties:
                images:
                  type: array
                  items:
                    type: object
                    properties:
                      imageTypeName:
                        type: string
                      imageType:
                        type: string
                      imageURL:
                        type: string
                        format: uri
                textFields:
                  type: array
                  items:
                    type: object
                    properties:
                      fieldName:
                        type: string
                      fieldType:
                        type: string
                      value:
                        type: string
                      source:
                        type: string
                dateFormat:
                  type: string
                barcodeData:
                  type: object
                  properties:
                    textFields:
                      type: array
                      items:
                        type: object
                        properties:
                          barcodeData:
                            type: string
                          barcodeType:
                            type: integer
            documentType:
              type: object
              properties:
                documentName:
                  type: string
                country:
                  type: string
                documentYear:
                  type: string
                documentType:
                  type: string
                filteredCountry:
                  nullable: true
                filteredDocumentTypes:
                  nullable: true
                documentTypeMatchesFilter:
                  nullable: true
            imageQuality:
              type: array
              items:
                type: object
                properties:
                  imageQualityCheckType:
                    type: string
                  result:
                    type: string
            securityChecks:
              type: array
              description: >-
                Security and authenticity checks such as photo forgery and
                liveness.
              items:
                type: object
                properties:
                  securityCheckType:
                    type: string
                  result:
                    type: string
            timeToVerify:
              type: integer
              description: Time taken to complete verification, in milliseconds.
        verificationStatus:
          type: string
        verificationStatusCode:
          type: integer
        trustFlowId:
          type: integer
        trustValidationId:
          type: string
        verificationType:
          type: string
        metadata:
          nullable: true
        createdAt:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use `Bearer {your_api_token}` in the Authorization header.

````