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

# Errors and the response envelope

> One response shape across the Partner API, and what each status code means

## The envelope

Every response — success or error — shares one shape.

```json theme={null}
{
  "code": 200,
  "message": "Success",
  "status": "SUCCESS",
  "data": { },
  "errors": [ ]
}
```

<ResponseField name="code" type="integer">The HTTP status code, repeated in the body.</ResponseField>
<ResponseField name="message" type="string">A human-readable summary of the outcome.</ResponseField>
<ResponseField name="status" type="enum">Either `SUCCESS` or `ERROR`.</ResponseField>
<ResponseField name="data" type="object | null">The payload. `null` on error.</ResponseField>

<ResponseField name="errors" type="array">
  A list of `{code, message, field}` objects. Empty on success. Body-validation failures return one entry per offending field.
</ResponseField>

<Warning>
  Check `status`, not just the HTTP code. A response is only successful when `status` is `SUCCESS` and `errors` is empty.
</Warning>

## Status codes

| HTTP  | Meaning                                                                                                |
| ----- | ------------------------------------------------------------------------------------------------------ |
| `400` | Validation failed, or the key lacks the required permission. Read `errors[]` for the offending fields. |
| `401` | Missing or invalid API credentials. See [Authentication](/api-reference/authentication).               |
| `404` | No such resource, or it belongs to another partner.                                                    |
| `405` | Wrong verb on a valid path.                                                                            |
| `409` | The request conflicts with the current state of the resource.                                          |
| `422` | The requested mode or option is not available yet.                                                     |
| `500` | Unexpected server error.                                                                               |
| `503` | Credentials could not be verified right now. Retry with backoff.                                       |

<Note>
  **There is no `429`.** Rate limits surface as `400`, so do not build retry logic around a `429` response.
</Note>

## Retrying safely

| Code                                     | Retry?                                        |
| ---------------------------------------- | --------------------------------------------- |
| `400`, `401`, `404`, `405`, `409`, `422` | No. Fix the request or the credential.        |
| `500`                                    | Yes, with backoff.                            |
| `503`                                    | Yes, with backoff. This is the transient one. |

<Warning>
  Never blindly retry a write that may have succeeded — [Submit transaction](/api-reference/transactions/submit-transaction) in particular. Read the transaction back before resubmitting it.
</Warning>
