# API error handling

Source: https://developer.avalara.com/tax-docs-en/errors/api_error_handling/

# API error handling

When a TaxDocs API call produces an error, it responds using the standard [HTTP error response codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes "https://en.wikipedia.org/wiki/List_of_HTTP_status_codes"). Response codes between 400 and 499 are called **Client Errors**, and indicate a mistake in an API call. Response codes between 500 and 599 refer to internal errors within TaxDocs Monitor itself. 

**HTTP Code**

**Description**

**Observation**

400 Bad Request

subscriptionId is empty

Subscription ID was not informed in the token or in the subscriptionId parameter

400 Bad Request

startIssueDate is empty

StartIssueDate parameter was not informed

400 Bad Request

endIssueDate is empty

Parameter endIssueDate was not informed

400 Bad Request

startIssueDate greater than endIssueDate

A date was entered in the startIssueDate parameter after the informed date in the parameter endIssueDate

400 Bad Request

Select an interval less than or equal to issueDateMaxRange days

startIssueDate and endIssueDate specify a time range greater than issueDateMaxRange days

400 Bad Request

$top parameter must be between 0 and 1000

Invalid $top parameter (missing or out of the allowed range)

400 Bad Request

$top and $count can not be equal 0 and false simultaneously

Invalid $top and $count parameters (cannot be equal to 0 and false simultaneously)

400 Bad Request

$skip parameter must be equal to or greater than 0

Parameter $skip is invalid (absent)

400 Bad Request

Invalid OData Parameters. MessageId: 00000000-0000-0000-0000-000000000000

A syntax error occurred when using any of the following parameters: $top, $skip, $filter, $orderby, $count, $select

400

Bad Request - The server could not understand the request due to invalid syntax

401 Unauthorized

A valid token was not provided for authentication

403 Forbidden

A non-app token was informed for the authentication

403

The request was denied because you do not have permission to make this alteration

404

The URL requested is invalid or the resource requested does not exist

429

The user has sent too many requests in a given amount of time (“rate limiting”)

500 Internal Server Error

Unexpected error while listing invoices. MessageId: 00000000-0000-0000-0000-000000000000

An unexpected error occurred in the operation

500

The server has encountered a situation it doesn't know how to handle

503

The server is not ready to handle the request

[Previous](/tax-docs-en/authentication/certification_requirements)

[Next](/tax-docs-en/concepts/fiscal_document)