> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/rest-api/identity-api/identity-api-reference/onboarding/civil-registry/dha/validar-cliente.md).

# Validate client

Allows obtaining the data associated with an identification number by querying the registry **DHA** of South Africa 🇿🇦.

{% hint style="info" %}
The verification will be carried out on the identification number provided in the POST Create client Endpoint.
{% endhint %}

### Endpoint

```
GET /civil-registry/dha/validation/{ID_NUMBER}
```

### Authentication

| Type    | Location | Name          |
| ------- | -------- | ------------- |
| API Key | Header   | **x-api-key** |

### Path parameters

| Parameter   | Type   | Required | Description                             |
| ----------- | ------ | -------- | --------------------------------------- |
| `ID_NUMBER` | string | **Yes**  | Identification number of **13 digits**. |

### Request example

```bash
curl --location '{IDENTITY_API_BASE_URL}/civil-registry/dha/validation/{ID_NUMBER}' \
--header 'x-api-key: {API_KEY}'
```

### Responses

#### `200` Success

#### Response example

```json
{
    "id": "d56c6eb9-0caf-4c36-ae3d-6be8841a10d4",
    "idNumber": "{{idNumber}}",
    "firstNames": "{{firstName}}",
    "surname": "{{lastName}}",
    "gender": "Female",
    "dateOfBirth": "1992-08-01T00:00:00",
    "status": "Active",
    "datePerformed": "2024-03-01T14:46:06.4871561+02:00",
    "birthPlaceCountryCode": "",
    "deadIndicator": false,
    "dateOfDeath": "",
    "maritalStatus": "",
    "dateOfMarriage": "",
    "idIssueDate": "20160831",
    "idSequenceNumber": "1",
    "onHANIS": true,
    "onNPR": true,
    "smartCardIssued": true,
    "idNumberBlocked": false,
    "photo": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABA.....",
    "dataSource": "DHA SAFPS",
    "hasPhoto": true
}
```

#### `400` Bad Request

```json
{
  "status": 400,
  "title": "Bad Request",
  "detail": "Invalid request.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400",
  "errors": []
}
```

#### `401` Unauthorized

```json
{
  "message": "Unauthorized"
}
```

#### `403` Forbidden

```json
{
  "Message": "User is not authorized to access this resource with an explicit deny"
}
```

#### `502` Bad Gateway

```json
{
  "status": 502,
  "title": "Bad Gateway",
  "detail": "Server got an invalid response.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502"
}
```

#### `504` Gateway Timeout

```json
{
  "message": "Endpoint request timed out"
}
```
