Extract ID Document Data & Face Image
/api/v2/id_extract
operationId: id_extract
Live: https://gdapi.globaldata.net.au/api/v2/id_extract · Sandbox: https://sandbox-gdapi.globaldata.net.au/api/v2/id_extract
Performs OCR / data extraction on an identity document image and (when available) returns parsed fields
plus a cropped face portrait (photo). Supported document types are:
passportlicence(Australian driver licence – requires front & back images)medicare(Australian Medicare card – front image only)
The response structure under result varies by document_type (see schema & examples below). All
successful responses include a base64-encoded face image when a face is detected (photo).
Inputs
Supply images as base64 data URI strings (e.g. data:image/jpeg;base64,/9j/4AA...) or raw base64.
Only JPEG format is accepted for this endpoint. Maximum file size per image is 16 MB. For licence, both
front (document_photo) and back (document_back) images are required.
| Field | Required | Type | Notes |
|---|---|---|---|
document_type |
Yes | enum | One of passport, licence, medicare |
document_photo |
Yes | string | Base64 JPEG (front) |
document_back |
Conditionally | string | Base64 JPEG (back) – required when document_type = licence |
photo_border_percent |
No | integer | Border padding around the extracted face photo as a percentage of the detected face box (0-50, default 15) |
Output (result object)
Depending on document_type, typical extracted fields include:
- Passport:
first_name,last_name,birth_date(YYYY-MM-DD),expiry_date(YYYY-MM-DD),gender,passport_number,country,photo,face_occluded. - Licence:
first_name,middle_name,last_name,birth_date,address,expiry_date(YYYY-MM-DD),conditions,licence_state,card_number,photo,face_occluded. - Medicare:
card_color,card_number,expiry_date(YYYY-MM or YYYY-MM-DD),people(array of holders withref_number&namelines).
Additional or fewer fields may appear depending on document quality and internal extraction logic.
Error Handling
- Validation errors (missing / invalid fields, size limits, unsupported mime) return HTTP 400 with a descriptive
message. - Known processing errors from the document analysis engine (e.g.
no_face_found) return HTTP 400 with that message. - Unknown processing failures return HTTP 500 with
An error occurred while processing the document. - Entitlement / auth / rate limit errors use standard Global Data API response references.
Auditing & Privacy
For compliance, sensitive fields and raw images are obfuscated in internal audit logs (masked with X). The
API response itself returns the actual extracted values so you should persist / redact them according to your
own data handling policies.
Request body
Content type application/json.
ID document type and base64-encoded image(s) to extract.
| Field | Description |
|---|---|
document_typerequired |
string Type of document supplied. |
document_photorequired |
string Base64 (optionally data URI) JPEG image of the front of the document. |
document_back |
string Base64 (optionally data URI) JPEG image of the back of the document (licence only). |
photo_border_percent |
integer [0..50] Border padding added around the detected face box in the extracted face photo ( |
Responses
Document successfully processed and data extracted.
application/json
| Field | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
string Always |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
api_reference |
string (uuid) Unique audit reference for this request. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
result |
one of 3 shapes Extracted document data (structure depends on |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Passport extraction result
Driver licence extraction result
Medicare card extraction result
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||