> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Lookup South Africa National ID

> Verify a South African national ID number and fetch the holder's details from the Home Affairs database.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-get`}>GET</span>
  <code>/api/v1/za/kyc/id</code>
</div>

Verify a South African national ID number and fetch the holder’s Home Affairs record.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |

## Query parameters

| Parameter   | Type   | Required | Description                       |
| ----------- | ------ | -------- | --------------------------------- |
| `id_number` | string | Yes      | South African National ID Number. |

## Response

Returns an `entity` object with the holder’s Home Affairs record.

## With photograph

To also return the holder’s photo, call the `id_withphoto` variant. It takes the same `id_number` query parameter and returns the same `entity` object plus a base64 `photo` field.

## Errors

| Code  | Meaning                                                                                       |
| ----- | --------------------------------------------------------------------------------------------- |
| `400` | Bad request — a required parameter is missing or malformed.                                   |
| `401` | Unauthorized — check your key and `AppId` (no `Bearer` prefix).                               |
| `402` | Insufficient wallet balance. [Fund your wallet](/api-reference/core-concepts/wallet-billing). |
| `404` | No record found for the supplied identifier.                                                  |
| `424` | The upstream source was unavailable — retry shortly.                                          |
| `429` | Too many requests — back off and retry.                                                       |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    "https://api.dojah.io/api/v1/za/kyc/id?id_number=1234567890192" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const params = new URLSearchParams({
    "id_number": "1234567890192",
  });

  const url = "https://api.dojah.io/api/v1/za/kyc/id?" + params;
  const res = await fetch(url, {
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
    },
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      "https://api.dojah.io/api/v1/za/kyc/id",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      params={ "id_number": "1234567890192" },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/za/kyc/id theme={null}
  {
    "entity": {
      "id_number": "1234567890192",
      "first_name": "JOHN",
      "last_name": "MUSA",
      "middle_name": "DOE",
      "date_of_birth": "1900-12-18",
      "phone_number": "",
      "address": "",
      "marital_status": "SINGLE",
      "gender": "Male",
      "issued_date": "2020-01-20",
      "full_name": "JOHN DOE MUSA",
      "smart_card_issued": "YES",
      "card_date": "2020-01-20",
      "book_date": "2020-01-20",
      "living_status": "ALIVE"
    }
  }
  ```
</ResponseExample>
