> ## 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.

# Advanced NIN Lookup

> A richer NIN lookup — the standard identity data plus extra fields such as tax ID, for compliance and risk.

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

A richer NIN lookup — the standard identity data plus extra fields such as tax ID, for compliance and risk.

## 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                                |
| --------- | ------ | -------- | ------------------------------------------ |
| `nin`     | string | Yes      | A valid 11-digit National Identity Number. |

## Response

Returns an `entity` with the holder’s names, gender, date of birth, phone number, and a base64-encoded `photo` — plus the fields the [basic lookup](/api-reference/individual-verification/nigeria/lookup-nin) doesn’t carry: residence address, state of origin, and tax details. The `nin` is echoed back masked.

| Field                             | Type   | Description                                              |
| --------------------------------- | ------ | -------------------------------------------------------- |
| `entity.nin`                      | string | The NIN used for the lookup, masked                      |
| `entity.first_name`               | string | First name of the holder                                 |
| `entity.middle_name`              | string | Middle name of the holder                                |
| `entity.last_name`                | string | Surname of the holder                                    |
| `entity.date_of_birth`            | string | Date of birth, `YYYY-MM-DD`                              |
| `entity.phone_number`             | string | Phone number linked to the NIN                           |
| `entity.gender`                   | string | Gender of the holder                                     |
| `entity.photo`                    | string | Base64-encoded photograph                                |
| `entity.residence_address_line_1` | string | First line of the registered residential address         |
| `entity.origin_state`             | string | State of origin                                          |
| `entity.tax_id`                   | string | Taxpayer Identification Number (TIN) tied to the holder. |
| `entity.tax_residency`            | string | State tax authority the holder is registered with.       |

<Warning>
  `tax_id`, `photo`, and the address fields are sensitive personal data. Store only what you need, keep it encrypted at rest, and never write these values to logs — mask them the way the API masks `nin`.
</Warning>

## 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.                                                       |

## Sandbox

Test with `nin=70123456789` against `https://sandbox.dojah.io`. See [Sandbox & test data](/api-reference/get-started/sandbox-test-data) for every test value.

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

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

  const url = "https://api.dojah.io/api/v1/kyc/nin/advance?" + 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/kyc/nin/advance",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      params={ "nin": "70123456789" },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/kyc/nin/advance theme={null}
  {
    "entity": {
      "nin": "1*****78910",
      "first_name": "John",
      "last_name": "Musa",
      "middle_name": "Doe",
      "date_of_birth": "1909-01-11",
      "phone_number": "081123456798",
      "gender": "Male",
      "photo": "/9j/4AAQSz…",
      "residence_address_line_1": "Ikeja",
      "origin_state": "Lagos",
      "tax_id": "211111111111111111",
      "tax_residency": "Lagos State"
    }
  }
  ```
</ResponseExample>
