# Errors

Our API uses normal HTTP response codes to provide feedback with errors, however in most cases the body of the response will include an error code that can be used, and a message with additional context.&#x20;

#### Example 400 error response

```json
{
    "result": {
        "type": "error",
        "reason": "invalid_json_syntax",
        "messages": [
            "Invalid JSON syntax in request body."
        ]
    }
}
```

#### Common error codes

This is a list of error codes that are shared across all endpoints, however each individual endpoint may have its own contextual error response as well.

|                           |
| ------------------------- |
| missing\_required\_field  |
| missing\_required\_params |
| invalid\_params           |
| invalid\_json\_syntax     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.giftpro.co.uk/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
