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

# APIs

Qvalia API server, base rules

{% stepper %}
{% step %}

#### Production base URL:

<https://api.qvalia.com>
{% endstep %}

{% step %}

#### Staging / Sandbox server base URL:

<https://api-test.qvalia.com>
{% endstep %}
{% endstepper %}

***

{% hint style="success" %}
All Qvalia endpoints follows the same HTTP code pattern, full set as follows:
{% endhint %}

* **Error Codes**
  * <mark style="color:green;">`200`</mark> - <mark style="color:green;">OK</mark>

    Everything worked as expected
  * <mark style="color:green;">`204`</mark> - <mark style="color:green;">No content</mark>

    Everything worked as expected, but we didn't find any data to return
  * <mark style="color:orange;">`400`</mark> - <mark style="color:orange;">Invalid request</mark>

    Invalid parameters from client
  * <mark style="color:orange;">`401`</mark> - <mark style="color:orange;">Unauthorized</mark>

    Unauthorized. Check your API key or Bearer token
  * <mark style="color:orange;">`403`</mark> - <mark style="color:orange;">Forbidden</mark>

    The API key doesn't have permissions to perform the request.
  * <mark style="color:orange;">`404`</mark> - <mark style="color:orange;">Not Found</mark>

    The requested resource does not exist. This can be either the URI, or query parameters.
  * <mark style="color:orange;">`409`</mark> - <mark style="color:orange;">Conflict</mark>

    The request causes some conflict, normally a duplicate
  * <mark style="color:orange;">`422`</mark> - <mark style="color:orange;">Unprocessable Entity</mark>

    The posted data is invalid, in the wrong format or missing
  * <mark style="color:orange;">`429`</mark> - <mark style="color:orange;">Too many requests</mark>\
    You have exceeded your request budget, counted per account across all endpoints. Read `Retry-After` and wait at least that long before retrying; `RateLimit-Remaining` on every response tells you how much is left.
  * <mark style="color:red;">`500`</mark> - <mark style="color:red;">Internal error</mark>

    Internal Server Error (It's not you, it's us)

***

{% hint style="info" %}
The `/transaction` (Peppol messages) all support both `XML` and `JSON`, both as request and response data!
{% endhint %}

To `POST` (create) any message in `XML` format you'll provide a header as:

<pre><code><strong>POST
</strong><strong>content-type: application/xml
</strong></code></pre>

Or for `POST`'ing JSON, you'd either omit the header, as JSON is the default, or provide:

```
POST
content-type: application/json
```

{% hint style="danger" %}
All Query String Parameters are case-sensitive and shall be added as stated in each individual API reference, e.g. `documentId` must be sent with a capital `I` in `Id`
{% endhint %}

For `GET`'ing data you'll use the `accept` header instead:

```
GET (XML)
accept: application/xml

GET (JSON)
accept: application/json
```


---

# 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://api.qvalia.io/api-documentation/apis.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.
