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

# National ID

> Verify a customer's identity using their South African ID number (SAID).

The South Africa National ID endpoint validates a South African ID number (SAID) and returns the associated personal details from the national registry.

## Endpoint

```
POST /api/onboarding/south_africa_kyc/national_id/
```

## Request

### Headers

| Header           | Value               | Required |
| ---------------- | ------------------- | -------- |
| `x-access-token` | Your API secret key | Yes      |
| `Content-Type`   | `application/json`  | Yes      |

### Body Parameters

| Parameter     | Type   | Required | Description                                   |
| ------------- | ------ | -------- | --------------------------------------------- |
| `national_id` | string | Yes      | The customer's South African ID number (SAID) |

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://adhere-api.smartcomply.com/api/onboarding/south_africa_kyc/national_id/" \
    -H "x-access-token: YOUR_SECRET_KEY" \
    -H "Content-Type: application/json" \
    -d '{"national_id": "0508225709080"}'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://adhere-api.smartcomply.com/api/onboarding/south_africa_kyc/national_id/",
    {
      method: "POST",
      headers: {
        "x-access-token": "YOUR_SECRET_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ national_id: "0508225709080" }),
    }
  );
  const data = await response.json();
  ```

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

  response = requests.post(
      "https://adhere-api.smartcomply.com/api/onboarding/south_africa_kyc/national_id/",
      headers={
          "x-access-token": "YOUR_SECRET_KEY",
          "Content-Type": "application/json",
      },
      json={"national_id": "0508225709080"},
  )
  data = response.json()
  ```
</CodeGroup>

## Response

### 200 OK

| Field                | Type    | Description             |
| -------------------- | ------- | ----------------------- |
| `data.valid`         | boolean | Whether the ID is valid |
| `data.first_name`    | string  | Customer's first name   |
| `data.last_name`     | string  | Customer's last name    |
| `data.middle_name`   | string  | Middle name, if any     |
| `data.date_of_birth` | string  | Date of birth           |
| `data.gender`        | string  | Gender                  |
| `data.nationality`   | string  | Nationality             |
| `data.id_number`     | string  | South African ID number |

```json theme={null}
{
  "status": "success",
  "data": {
    "valid": true,
    "first_name": "IRVEN",
    "middle_name": "LONDILE",
    "last_name": "RAMOLETA",
    "nationality": "ZA",
    "id_number": "0508225709080"
  },
  "message": "National ID details retrieved successfully"
}
```

### 400 Bad Request

```json theme={null}
{
  "status": "failed",
  "data": [],
  "message": "Sorry, your check cannot be processed at the moment. Please try again in a few minutes"
}
```

### 401 Unauthorized

```json theme={null}
{
  "status": "failed",
  "message": "Authentication credentials were not provided."
}
```
