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

> Vérifiez l'identité d'un client à l'aide de son numéro d'identité sud-africain (SAID).

L'endpoint National ID d'Afrique du Sud valide un numéro d'identité sud-africain (SAID) et renvoie les détails personnels associés depuis le registre national.

## Endpoint

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

## Requête

### En-têtes

| En-tête          | Valeur                | Requis |
| ---------------- | --------------------- | ------ |
| `x-access-token` | Votre clé secrète API | Oui    |
| `Content-Type`   | `application/json`    | Oui    |

### Paramètres de corps

| Paramètre     | Type   | Requis | Description                                        |
| ------------- | ------ | ------ | -------------------------------------------------- |
| `national_id` | string | Oui    | Le numéro d'identité sud-africain (SAID) du client |

### Exemple

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

## Réponse

### 200 OK

| Champ              | Type   | Description             |
| ------------------ | ------ | ----------------------- |
| `data.FirstName`   | string | Prénom                  |
| `data.LastName`    | string | Nom de famille          |
| `data.DateOfBirth` | string | Date de naissance       |
| `data.Gender`      | string | Genre                   |
| `data.Citizenship` | string | Statut de citoyenneté   |
| `data.Photo`       | string | Photo encodée en base64 |

```json theme={null}
{
  "status": "success",
  "data": {
    "FirstName": "JOHN",
    "LastName": "DOE",
    "DateOfBirth": "1990-01-15",
    "Gender": "MALE",
    "Citizenship": "SA Citizen",
    "Photo": "<base64-encoded-jpeg>"
  },
  "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."
}
```
