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

# Passport

> Verify a Nigerian international passport by number and surname.

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

Verify a Nigerian international passport and return the holder’s passport details and photo.

## 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                           |
| ----------------- | ------ | -------- | ------------------------------------- |
| `passport_number` | string | Yes      | The passport number.                  |
| `surname`         | string | Yes      | Surname associated with the passport. |

## Response

Returns an `entity` with passport number, issue/expiry dates, document type, place of issue, the holder’s names, date of birth, gender, and a base64 `photo`.

## 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 `passport_number=A00123456` 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/passport?passport_number=A00123456&surname=Musa" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const params = new URLSearchParams({
    "passport_number": "A00123456",
    "surname": "Musa",
  });

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

<ResponseExample>
  ```json GET /api/v1/kyc/passport theme={null}
  {
    "entity": {
      "passport_number": "A00123456",
      "date_of_issue": "01/02/2000",
      "expiry_date": "01/02/2000",
      "document_type": "Standard Passport",
      "issue_place": "LAGOS",
      "surname": "MUSA",
      "first_name": "JOHN",
      "other_names": "DOE",
      "date_of_birth": "10/06/1993",
      "gender": "Undecided",
      "photo": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBD…"
    }
  }
  ```
</ResponseExample>
