About this endpoint
What it does
Validates a 14-digit Egyptian national ID and decodes its birth date, age, gender and governorate. Invalid values still return 200 with valid: false and the reasons in problems. The last digit is an official check digit whose formula is not public, so it is not verified.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| value | String | Yes | The 14-digit national ID. Spaces, dashes and Arabic-Indic digits are allowed and cleaned up. Other JSON types (number, array, boolean) return 422. |
Response
Returns a JSON object with a data object holding the validation result and a meta object with the request_id and API version. Invalid values still return 200 with valid: false and the reasons in problems. Requests with a missing or wrong-type field return 422 with an error object.
| Parameter | Type | Description |
|---|---|---|
| data | Object | The validation result. |
| data.valid | Boolean | true if the value passes all checks for its format. |
| data.input | String | The value you sent. |
| data.normalized | String | The value after cleanup: spaces and separators removed and Arabic-Indic digits converted to Latin digits. |
| data.problems | String Array | Problem codes when the value is not valid, e.g. checksum_failed, must_be_14_digits. Empty when valid. |
| data.birth_date | String | Birth date encoded in the ID (YYYY-MM-DD). |
| data.age | Integer | Age in years, from the birth date. |
| data.gender | String | male or female, from the 13th digit. |
| data.governorate_code | String | Two-digit code of the governorate of birth. |
| data.governorate | Object | Governorate of birth, with en (English) and ar (Arabic) names. |
| data.governorate.en | String | Governorate name in English, e.g. Dakahlia. |
| data.governorate.ar | String | Governorate name in Arabic. |
| data.note | String | Reminder that only the structure is checked: the last digit is an official check digit whose formula is not public. |
| meta | Object | Request details. |
| meta.request_id | String | Unique id of this request, useful for support. |
| meta.version | String | API version, e.g. v1. |