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

# Errors

Nash uses HTTP response status codes to indicate the success or failure of your API requests. If your request fails, Nash returns an error using the appropriate status code.

In general, there are three status code ranges you can expect:

* 2xx success status codes confirm that your request worked as expected
* 4xx error status codes indicate an error because of the information provided (for example, a required parameter was missing)
* 5xx error status codes are rare and indicate an error with Nash's end

Example of a failed request:

```json theme={null}
{
	"error": {
		"code": "MISSING_RESOURCE",
		"message": "job 'job_123' does not exist"
	},
	"response_status": "404 NOT_FOUND",
	"RequestID": "d97e3f4d-114d-4b77-ae47-9e10c5151424"
}
```

Please Include`RequestID` in when communicating [support@usenash.com](mailto:support@usenash.com) so we can help you faster

## Possible error codes

## BAD\_REQUEST

The request failed, often due to missing a required parameter or malformed input field
Example:

```json theme={null}
{
	"error": {
		"code": "BAD_REQUEST",
		"message": "'pickupAddress' is a required property"
	},
	"response_status": "400 BAD_REQUEST",
	"RequestID": "1-62057334-011d10e02c0f2ad839cf0a26"
}
```

Solution: include `pickupAddress` field.

Another example:

```json theme={null}
{
	"error": {
		"code": "BAD_REQUEST",
		"message": "quote_id qot_abc has expired"
	},
	"response_status": "400 BAD_REQUEST",
	"RequestID": "1-62057334-41a43ef8a6d4f58a71e09ad2"
}
```

Solution: refresh quotes and try again [refresh-quotes](/api-reference/order/refresh-order-quotes)

## UNAUTHORIZED

Invalid or missing API key.
Example:

```json theme={null}
{
	"error": {
		"code": "UNAUTHORIZED",
		"message": "Authorization token is missing"
	},
	"response_status": "401 UNAUTHORIZED",
	"RequestID": "1-62057941-67a549bb5faa77236a03ef8d"
}
```

## FORBIDDEN

Provided API key does not have access to requested resource/action
Example:

```json theme={null}
{
	"error": {
		"code": "FORBIDDEN",
		"message": "job_id 'job_Y8B5CWhvN9G8odcfAiqd29' is not owned by ''"
	},
	"response_status": "403 FORBIDDEN",
	"RequestID": "1-620579a6-7ef612c414f3b59c1e74ffbb"
}
```

## INVALID\_ADDRESS

Provided address in either `pickupsAddress` or `dropoffAddress` is missing, invalid or couldn't be parsed.
Example:

```json theme={null}
{
	"error": {
		"code": "INVALID_ADDRESS",
		"message": "Failed to parse provided address 'bad_address'"
	},
	"response_status": "400 BAD_REQUEST",
	"RequestID": "1-620572c5-1c8927c37edbd37173140be3"
}
```

## INVALID\_PHONE\_NUMBER

Provided phone-number in either `pickupPhoneNumber` or `dropoffPhoneNumber` is missing, invalid or couldn't be parsed.

Provided phone-number are expected to be in [E.164 format.](https://en.wikipedia.org/wiki/E.164)

Example:

```json theme={null}
{
	"error": {
		"code": "INVALID_PHONE_NUMBER",
		"message": "Provided US phone-number '+1111111' is invalid"
	},
	"response_status": "400 BAD_REQUEST",
	"RequestID": "1-62057a15-2d3444806b950c514da305be"
}
```

## RESOURCE\_ALREADY\_EXISTS

provided `externalIdentifier` has been already used for another job
Example:

```json theme={null}
{
	"error": {
		"code": "RESOURCE_ALREADY_EXISTS",
		"message": "Provided external identifier: '123' was used in a previous job"
	},
	"response_status": "400 BAD_REQUEST",
	"RequestID": "1-62057a2b-17e8db5600cd5da143e75a95"
}
```

## MISSING\_RESOURCE

job/task/options\_group cannot be found
Example:

```json theme={null}
{
	"error": {
		"code": "MISSING_RESOURCE",
		"message": "job 'job_123' does not exist"
	},
	"response_status": "404 NOT_FOUND",
	"RequestID": "1-62057a4a-1833f34338a256b23d8fe9de"
}
```

## INVALID\_TIME\_CONSTRAINT

Provided `packagePickupStartTime`, `packagePickupEndTime`, `packageDropoffStartTime` , `packageDropoffEndTime` are invalid (e.g. dropoff time window is before pickup time window)

Example:

```json theme={null}
{
  "error": {
    "code": "INVALID_TIME_CONSTRAINT",
    "message": "Pickup time cannot be in the past"
  },
  "response_status": "400 BAD_REQUEST",
  "RequestID": "1-62057a5f-206feee76c4da88d0d599fb5"
}
```

## DISALLOWED\_OPERATION

An API operation was attempted but was disallowed, e.g., updating a job after completion.

```json JSON theme={null}
{
  "error": {
    "code": "DISALLOWED_OPERATION",
    "message": "Job updates are not allowed when at least 1 task is completed. Task statuses are ['completed']"
  },
  "response_status":"400 BAD_REQUEST",
  "RequestID": "1-62057a5f-206feee76c4da88d0d593455"
}
```

## AUTODISPATCH\_FAILURE

Auto-dispatch failed due to no valid quotes.

```json theme={null}
{
  "error": {
    "code": "AUTODISPATCH_FAILURE",
    "message": "job_123: Failed auto-dispatch (preferred_order): No provider satisfied requirements: No valid quotes found, error_code=NO_VALID_QUOTES, error_code=AUTODISPATCH_FAILURE"
  },
  "response_status": "400 BAD_REQUEST",
  "RequestID": "e5dc2885-606c-4de2-84cb-6da6b495eda1"
}
```

## INTERNAL\_SERVER\_ERROR

Something went wrong on Nash's end. (These are rare.)
Example:

```json theme={null}
{
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "The server encountered an error and was unable to complete the request"
  },
  "response_status": "500 INTERNAL_SERVER_ERROR",
  "RequestID": "e5dc2885-606c-4de2-84cb-6da6b495eda1"
}
```

## List of possible HTTP response statuses

| response\_status            | Description                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| 200 OK                      | Everything worked as expected.                                                                                |
| 400 BAD\_REQUEST            | The request was unacceptable, often due to missing a required parameter.<br />See error.code for more details |
| 401 UNAUTHORIZED            | Invalid or missing API key.                                                                                   |
| 403 FORBIDDEN               | The API key doesn't have permissions to perform the request.                                                  |
| 404 NOT\_FOUND              | The requested resource doesn't exist.                                                                         |
| 429 TOO\_MANY\_REQUESTS     | Too many requests hit the API too quickly.                                                                    |
| 500 INTERNAL\_SERVER\_ERROR | Something went wrong on Nash's end.                                                                           |
