ID Document
Extract name, document number, dates, and nationality.
Schema Key
id-document
Usage
Use this template when creating a schema via the API or SDK:
const schema = await client.schemas.create('my-workspace', {
schemaKey: 'id-document',
name: 'ID Document',
definition: { /* see definition below */ },
});
Definition
{
"type": "object",
"properties": {
"document_type": {
"type": "string",
"description": "Type of identity document (e.g. Passport, Driver License, National ID)."
},
"document_number": {
"type": "string",
"description": "Unique document identifier or number."
},
"personal_info": {
"type": "object",
"description": "Personal information of the document holder.",
"properties": {
"full_name": {
"type": "string",
"description": "Full legal name as printed on the document."
},
"date_of_birth": {
"type": "object",
"description": "Date of birth.",
"properties": {
"year": {
"type": "integer",
"description": "Year (e.g. 1990)."
},
"month": {
"type": "integer",
"description": "Month (1-12).",
"minimum": 1,
"maximum": 12
},
"day": {
"type": "integer",
"description": "Day of the month.",
"minimum": 1,
"maximum": 31
}
},
"required": [
"year",
"month",
"day"
],
"additionalProperties": false
},
"gender": {
"type": "string",
"description": "Gender as indicated on the document."
},
"nationality": {
"type": "string",
"description": "Nationality or citizenship."
},
"place_of_birth": {
"type": "string",
"description": "Place of birth as printed on the document."
}
},
"required": [
"full_name",
"date_of_birth",
"nationality"
],
"additionalProperties": false
},
"issue_date": {
"type": "object",
"description": "Date the document was issued.",
"properties": {
"year": {
"type": "integer",
"description": "Year (e.g. 2020)."
},
"month": {
"type": "integer",
"description": "Month (1-12).",
"minimum": 1,
"maximum": 12
},
"day": {
"type": "integer",
"description": "Day of the month.",
"minimum": 1,
"maximum": 31
}
},
"required": [
"year",
"month",
"day"
],
"additionalProperties": false
},
"expiration_date": {
"type": "object",
"description": "Date the document expires.",
"properties": {
"year": {
"type": "integer",
"description": "Year (e.g. 2030)."
},
"month": {
"type": "integer",
"description": "Month (1-12).",
"minimum": 1,
"maximum": 12
},
"day": {
"type": "integer",
"description": "Day of the month.",
"minimum": 1,
"maximum": 31
}
},
"required": [
"year",
"month",
"day"
],
"additionalProperties": false
},
"issuing_authority": {
"type": "string",
"description": "Authority or organization that issued the document."
},
"issuing_country": {
"type": "string",
"description": "Country that issued the document."
},
"mrz": {
"type": "string",
"description": "Machine-readable zone text, if present."
}
},
"required": [
"document_type",
"document_number",
"personal_info",
"issue_date",
"expiration_date"
],
"additionalProperties": false
}