---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/en/codes.md
  - https://yandex.com/dev/direct/doc/ru/codes.md
  - href: en/codes.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/reports/codes.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/en/llms.txt

# Response codes and error codes

The table lists HTTP response codes.

#|
|| **Value** | **Description** ||
|| 200 | The report was created successfully in online mode ||
|| 201 | The report was successfully added to the offline queue ||
|| 202 | The report is being generated in offline mode ||
|| 400 | Error in the request, or exceeded the limit on requests in the queue ||
|| 500 | Server error when generating the report ||
|| 502 | Request processing timed out on the server ||
|#

If an error occurs, the following structure is returned:

{% list tabs %}

- JSON

  ```
  {
    "error": {
        "request_id": (string),
        "error_code": (int),
        "error_string": (string),
        "error_detail": (string)
    }
  }
  ```

- XML

  ```
  <?xml version="1.0" encoding="UTF-8"?>
    <reports:reportDownloadError xmlns:reports="http://api.direct.yandex.com/v5/reports">
    <reports:ApiError>
        <reports:requestId>(string)</reports:requestId>
        <reports:errorCode>(int)</reports:errorCode>
        <reports:errorMessage>(string)</reports:errorMessage>
        <reports:errorDetail>(string)</reports:errorDetail>
    </reports:ApiError>
    </reports:reportDownloadError>
  ```

{% endlist %}

**reports:ApiError object**

#|
|| **Parameter**	| **Type** |	**Description** ||
|| `reports:requestId` |	string | Unique request ID assigned by the Yandex.Direct API server. It is also passed in the `RequestId` HTTP header. ||
|| `reports:errorCode` |	int	| Numeric error code. ||
|| `reports:errorMessage`	| string | Textual message about the error. ||
|| `reports:errorDetail` | string | Detailed description of the error. ||
|#

Errors are described in the section [Errors and warnings](https://yandex.com/dev/direct/doc/en/concepts/errors-list).
