Skip to main content

Overview

Document OCR endpoints extract structured fields from a supported identity document — a KTP, Kartu Keluarga, NPWP, driving licence, passport, or Philippine ID card — and return them in the same request/response cycle. Like the rest of the Stateless Verification API, there is no trustValidationId, no session, and no separate finalize step.
Extracted fields are returned to the caller and never stored. The transaction record keeps only the outcome and quality signals (outcome, status, confidence, missing-field count, time to verify, and — for the Philippines plan — the classified document type). Cropped image regions (photo, signature) are never returned or persisted, and are always null.

Endpoints

Indonesia

Philippines

Request

All six endpoints take the same request shape:

Reading the response

Every response — success or failure — includes:
A successful response also includes data. A coded failure includes code instead — the two never appear together.

Status codes

REVIEW_NEEDED and REJECTED are still returned as HTTP 200 — the call succeeded and the engine produced an answer, it’s just not a clean extraction. Only FAILED corresponds to a non-2xx response.

Per-field confidence

Extracted values are returned as {"value": ..., "confidence": "99.35%"} whenever the value can be traced back to scored OCR text. Values that cannot be scored — null results, empty strings, and classification fields such as documentType — are returned bare, without a confidence wrapper. Confidence reflects transcription certainty, not correctness of the underlying document.

Errors

A 401 is returned for a missing or invalid bearer token, and a 403 if your account has no plan configured for the verification type at all.

Billing