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

# Callback Response Example

> Sample responses for ID Liveness API callback interactions

The Callback Response Example section showcases sample responses that users can anticipate from API interactions, providing clarity on response structure and format. By utilizing these examples, users can effectively develop and test their integrations, ensuring smooth communication between their application and the API. This section serves as a valuable resource for enhancing the integration process and streamlining development efforts.

## Response Examples

<CodeGroup>
  ```json Success Response (200) theme={null}
  {
    "statusCode": 200,
    "apiType": "id_live_doc",
    "transactionId": "{{transactionId}}",
    "engineVersion": "{{engineVersion}}",
    "result": {
      "screenReplay": {
        "liveness_score": 99
      },
      "paperPrinted": {
        "liveness_score": 82
      },
      "replacePortraits": {
        "liveness_score": 100
      }
    }
  }
  ```

  ```json Error Response (400) theme={null}
  {
    "statusCode": 400,
    "apiType": "id_live_doc",
    "transactionId": "{{transactionId}}",
    "errorCode": 1003,
    "message": "Fail to process data"
  }
  ```
</CodeGroup>

## Response Field Descriptions

### Success Response Fields

| Field                                    | Type   | Description                                                    |
| ---------------------------------------- | ------ | -------------------------------------------------------------- |
| `statusCode`                             | number | Status Code for the API request result                         |
| `apiType`                                | string | API type identifier                                            |
| `transactionId`                          | string | Unique identifier for each request                             |
| `engineVersion`                          | string | Liveness Engine's version for each request                     |
| `result`                                 | object | Object containing the processing result                        |
| `result.screenReplay`                    | object | Object containing the result of the Screen Replay pipeline     |
| `result.screenReplay.liveness_score`     | number | Liveness Score result of the Screen Replay check               |
| `result.paperPrinted`                    | object | Object containing the result of the Paper Printed pipeline     |
| `result.paperPrinted.liveness_score`     | number | Liveness Score result of the Paper Printed check               |
| `result.replacePortraits`                | object | Object containing the result of the Replace Portraits pipeline |
| `result.replacePortraits.liveness_score` | number | Liveness Score result of the Replace Portraits check           |

### Error Response Fields

| Field           | Type   | Description                                       |
| --------------- | ------ | ------------------------------------------------- |
| `statusCode`    | number | Status Code for the API request result            |
| `apiType`       | string | API Type identifier                               |
| `transactionId` | string | Unique identifier for each request                |
| `engineVersion` | string | Liveness Engine's version for each request        |
| `errorCode`     | number | Identifies the specific error for troubleshooting |
| `message`       | string | Briefly describes the error                       |

## Error Codes

| Error Code | Description              |
| ---------- | ------------------------ |
| 1003       | Fail to process data     |
| 1009       | Fail to analyze document |

## Understanding Liveness Scores

### Score Ranges

* **0-30**: High risk of forgery
* **31-60**: Medium risk of forgery
* **61-80**: Low risk of forgery
* **81-100**: Very low risk of forgery

### Pipeline Explanations

#### Screen Replay Detection

Detects if the submitted image is a screen capture or digital reproduction rather than a physical document.

#### Paper Printed Detection

Identifies if the document is a printed or photocopied version rather than an original.

#### Replace Portraits Detection

Checks if the face image on the document has been digitally altered or replaced.

## Integration Guidelines

### Handling Responses

1. **Check Status Code**: Always verify the response status code first
2. **Parse Transaction ID**: Store the transaction ID for reference
3. **Evaluate Scores**: Review liveness scores for each pipeline
4. **Error Handling**: Implement proper error handling for failed requests

### Best Practices

* **Logging**: Log all responses for debugging purposes
* **Retry Logic**: Implement retry logic for transient failures
* **Validation**: Validate response structure before processing
* **Security**: Ensure secure handling of sensitive document data
