> 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/morphology/document-validation/document-validation-status.md).

# Document validation Status

Check the status of the morphological validation operation. This endpoint must be called **repeatedly** until the analysis operation has completed. See [Process Status](#process-status) as a reference for the different status values.

### Endpoint

```
POST /verify/documentValidation/status
```

### Headers

| Name          | Type   | Required | Description                                                |
| ------------- | ------ | -------- | ---------------------------------------------------------- |
| **x-api-key** | string | **Yes**  | Access authorization API Key.                              |
| **family**    | string | No       | Value: **Onboarding**. Required with the Tracking service. |

{% hint style="info" %}
All calls to the Endpoints for Tracking with **Identity Platform** must contain the header `family`.
{% endhint %}

### Request body

**Content-Type:** `application/json`

#### Parameters

| Parameter              | Type   | Required | Description                                                                                          |
| ---------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------- |
| `scanReference`        | string | **Yes**  | **Reference number** of the scan.                                                                    |
| `type`                 | string | No       | ⚠️ Value **deprecated**. Will be removed in future versions.                                         |
| `tracking`             | object | No       | Object representing the required tracking information.                                               |
| `tracking.extraData`   | string | No       | Token generated by the SDK Mobile/Web. It contains tokenized tracking information with the Platform. |
| `tracking.operationId` | string | No       | Operation identifier generated by the SDK Mobile/Web.                                                |

#### Request example

```json
{
  "scanReference": "fe294c25-17e1-4d98-a958-710edbf00064",
  "type": "1",
  "tracking": {
    "extraData": "BQABAQG2gBNjuHN4kLmPqYf7R...",
    "operationId": "123e4567-e89b-12d3-a456-426614174000"
  }
}
```

### Responses

#### `200` Success

#### Response parameters

| Parameter       | Type   | Description                                                                                            |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| `timestamp`     | string | UTC timestamp of the response in format **ISO 8601**.                                                  |
| `scanReference` | string | **Reference number** of the scan.                                                                      |
| `status`        | string | Operation status. Possible values: `PENDING`, `DONE`, `FAILED`. See [Process Status](#process-status). |

#### Process Status

The status endpoint returns one of the following values to indicate the current status of the validation process:

| Status      | Description                                                                                                 |
| ----------- | ----------------------------------------------------------------------------------------------------------- |
| **PENDING** | Analysis in progress. It **is recommended** to check every 5 seconds until it completes.                    |
| **DONE**    | Validation completed successfully. Run the Document Validation Data service to obtain the analysis results. |
| **FAILED**  | The validation process encountered an error and could not be completed.                                     |

#### Response example

```json
{
  "timestamp": "1970-01-01T00:00:00.000Z",
  "scanReference": "fe294c25-17e1-4d98-a958-710edbf00064",
  "status": "DONE"
}
```

#### `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"
}
```
