---
title: "PAN OCR v2"
method: POST
path: "/v2/verify/pan_ocr"
tags: ["PAN OCR v2"]
---

# PAN OCR v2

`POST /v2/verify/pan_ocr`

Extracts structured PAN card details (PAN number, name, father's name, date of birth) from an uploaded image or PDF using OCR, via the customer's configured v2 verification setup.

**Response contract:** A successful extraction returns HTTP 200 with `status: "success"`, `error_code: null`, and a populated `data` object. A valid upload with nothing readable also returns HTTP 200, but with `status: "failed"`, a non-null `error_code` (`IDTO_202`), and `data: null` — do not treat HTTP 200 alone as success; always branch on `status` and inspect `error_code`. An unreadable or oversized image returns HTTP 413 (`IDTO_503`). Authenticate with your `X-Client-ID` and `X-API-KEY` headers.

## Response `200`

OCR completed. Inspect `status` and `error_code` for the business result.

- PanOcrResponse
  - `status` string, required
  - `message` string, nullable
  - `error_code` string, nullable
  - `data` PanOcrData
    - `pan_number` string, nullable
    - `name` string, nullable
    - `father_name` string, nullable
    - `dob` string, nullable
  - `tranx_id` string, nullable
  - `timestamp` string, nullable

## Other responses

- `400` — Invalid input — malformed request or missing file.
- `401` — Missing or invalid authentication credentials (X-Client-ID / X-API-KEY).
- `413` — The uploaded image could not be processed — unreadable or too large (IDTO_503). Retry with a clearer, smaller image.
- `422` — Request failed schema validation (e.g. no file part).
- `429` — Too many requests — rate limited (IDTO_006). Retry after a short wait.
- `500` — Internal server error.
- `503` — Vendor temporarily unavailable — OCR could not be completed (IDTO_008). Retry shortly.

---

[API](https://skmtc.dev/idto/apis/verification-api.md) · [All operations](https://skmtc.dev/idto/apis/verification-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/idto/verification-api/revisions/e3d57dab8db4/schema)
