> For the complete documentation index, see [llms.txt](https://docs.matrixian.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.matrixian.com/readme/api-response-structuur.md).

# API Response structuur

## API Response structuur

Alle API’s volgen dezelfde **JSON-envelope** voor succesvolle responses. Dit maakt parsing voorspelbaar voor elke client.

```json
{
  "id": "<uuid-v4>",
  "params": { /* echo van de invoer */ },
  "data": { /* resultaat of lijst met resultaten */ },
  "error": {},
  "meta": {},
  "status": "success"
}
```

### Top-level velden

| Veld     | Type   | Verplicht | Uitleg                                                                                                              |
| -------- | ------ | --------- | ------------------------------------------------------------------------------------------------------------------- |
| `id`     | string | ja        | Unieke request-/response-ID (UUID v4) voor correlatie en debugging.                                                 |
| `params` | object | nee       | Echo van relevante invoerparameters (query/body/path). Kan genormaliseerde waarden bevatten (bijv. uppercase/trim). |
| `data`   | object | ja        | Het domeinspecifieke resultaat. Structuur verschilt per endpoint.                                                   |
| `error`  | object | ja        | Leeg object (`{}`) bij succesvolle responses. (Fouten worden beschreven onder **Foutafhandeling** hieronder.)       |
| `meta`   | object | nee       | Metadata over de response (pagineringsinfo, cachehint, bron, etc.). Leeg als niet van toepassing.                   |
| `status` | string | ja        | <p><code>"success"</code> bij succesvolle responses. Anders <code>"failure"</code>.<br></p>                         |

#### Conventies

* **Casing:** camelCase voor alle veldnamen.
* **Nullability:** velden die (tijdelijk) onbekend zijn kunnen `null` zijn.
* **Datums & tijden:** ISO-8601 (`YYYY-MM-DD` of RFC3339 met tijdzone).
* **Getallen:** numeriek waar mogelijk (geen quotes rond numerieke waarden).
* **Lists:** volgorde is betekenisvol waar van toepassing; anders ongespecificeerd.

### Foutafhandeling

Voor **HTTP-fouten (4xx/5xx)** gebruiken we *dezelfde* de envelope hierboven, maar enkele velden zoals `meta` , `data` , en `params`  zullen leeg zijn. Zie de aparte pagina [API Foutmeldingen](/readme/api-foutmeldingen.md). In het kort:

```json
{
  "id": "<request-id>",
  "status": "failure",
  "error": {
    "code": 404,
    "message": "Not Found",
    "errors": [
      { "reason": "Not Found", "message": "The requested route or method was not found." }
    ]
  }
}
```

* 401 Unauthorized, 403 Forbidden, 404 Not Found, 503 Service Unavailable, etc.
* Deze responses bevatten CORS-headers.

### Backwards-compatibiliteit

* De top-level velden van de envelope zijn stabiel. We kunnen velden **toevoegen** aan `data` en `meta` zonder dat dit een breaking change is.
* Onbekende 'error sleutels' dienen door clients genegeerd te worden.

### OpenAPI specificatie

Je kunt de `openapi.yaml` specificatie downloaden via deze link: [Download OpenAPI Specificatie](https://matrixian-api.s3.eu-west-3.amazonaws.com/openapi.yaml).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.matrixian.com/readme/api-response-structuur.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
