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

# NIN Slip Download API: Generate Official NIN PDF Slips

> Generate official Nigerian NIN slips as downloadable PDFs in Regular, Improved, or Premium types after verifying a NIN with the LumiID API.

Use the LumiID NIN Slip Download API to generate official Nigerian National Identification Number (NIN) slips as downloadable PDF documents. The API requires a prior NIN verification and supports three slip types — **Regular**, **Improved**, and **Premium** — each containing progressively more detailed identity information. Use this API for customer onboarding, employee verification, HR and recruitment systems, government services, banking, fintech applications, and customer self-service portals.

## Overview

| Property | Details |
| - | - |
| **Country** | 🇳🇬 Nigeria |
| **Document** | Official NIN Slip (PDF) |
| **Slip Types** | Regular • Improved • Premium |
| **Response Format** | PDF (`application/pdf`) |
| **Authentication** | API Key Required |
| **Sandbox** | Supported |

***

## How NIN Slip Downloads Work

Downloading a NIN slip is a two-step process:

**1. Verify the NIN**

Before requesting a slip, verify the customer's NIN using either the Basic or Premium endpoint:

```text theme={null}
POST /v1/ng/nin-basic/
```

or

```text theme={null}
POST /v1/ng/nin-premium/
```

LumiID securely stores the verification record required to generate the official slip.

**2. Download the NIN Slip**

Call the NIN Slip Download endpoint with the verified NIN and your preferred slip type. LumiID generates the official PDF and returns it as a downloadable file.

> [!WARNING]
>
> A NIN must be verified before you request a slip. If no verification record exists for the supplied NIN, the API returns **404 Not Found** with the code `NIN_NOT_VERIFIED`.

***

## Endpoint

```text theme={null}
POST https://api.lumiid.com/v1/ng/nin/slip/download
```

### Request Headers

| Header | Description |
| - | - |
| `Authorization` | `Bearer YOUR_SECRET_KEY` |
| `Content-Type` | `application/json` |
| `Accept` | `application/pdf` *(Recommended)* |
| `X-App-ID` | Your Application ID (required if using app-scoped credentials). |

***

## Request Body

**nin** `string` *required*

The verified 11-digit National Identification Number. This NIN must have been previously verified via `POST /v1/ng/nin-basic/` or `POST /v1/ng/nin-premium/`.

**slip\_type** `string` *required*

The type of NIN slip to generate. Must be one of: `regular`, `improved`, or `premium`.

#### Example Request

```json theme={null}
{
  "nin": "89184072280",
  "slip_type": "improved"
}
```

***

## Response

When successful, LumiID returns a binary PDF stream.

```text theme={null}
HTTP/1.1 200 OK

Content-Type: application/pdf
Content-Disposition: attachment; filename="improved_89184072280_slip.pdf"
```

The response body contains the PDF document ready to save or serve to the customer.

***

## Supported Slip Types

| Slip Type | Description |
| - | - |
| `regular` | Standard NIN slip. |
| `improved` | Improved NIN slip with enhanced identity information. |
| `premium` | Premium NIN slip containing the complete official record. |

***

## Error Codes

| HTTP | Code | Description |
| - | - | - |
| **400** | `INVALID_REQUEST` | Missing NIN or invalid `slip_type`. |
| **401** | `INVALID_API_KEY` | Authentication failed. Verify your API credentials. |
| **404** | `NIN_NOT_VERIFIED` | No verification record exists for the supplied NIN. Verify the NIN before requesting a slip. |
| **415** | `UNSUPPORTED_MEDIA_TYPE` | Requests must use `Content-Type: application/json`. |
| **500** | `SERVER_ERROR` | An unexpected error occurred while generating the PDF. Retry or contact LumiID Support. |

***

## Code Example

```python theme={null}
import requests

url = "https://api.lumiid.com/v1/ng/nin/slip/download"

headers = {
    "Authorization": "Bearer YOUR_SECRET_KEY",
    "X-App-ID": "YOUR_APPLICATION_ID",
    "Content-Type": "application/json",
    "Accept": "application/pdf"
}

payload = {
    "nin": "89184072280",
    "slip_type": "improved"
}

response = requests.post(
    url,
    json=payload,
    headers=headers
)

if response.status_code == 200:
    with open("nin_slip.pdf", "wb") as file:
        file.write(response.content)

    print("NIN slip downloaded successfully.")
else:
    print(response.status_code, response.text)
```

***

## Best Practices

* Verify the customer's NIN before requesting a slip.
* Use **HTTPS** for all API requests.
* Keep your Secret API Key secure and never expose it in client-side applications.
* Set the `Accept` header to `application/pdf` to receive the document as a binary PDF.
* Save the generated PDF securely if your workflow requires future access.
* Store the `request_id` from your NIN verification response for auditing and support purposes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.