# API

Qvalia follows a standard API REST interface for our endpoints and adhere to the standard/common return codes and behaviors of a standard API.

Qvalia is using the UBL standard messaging formats for our integrations through the API, but you should note that only a subset of UBL as specified by Peppol (peppol.eu)!

{% hint style="success" %}
As many of Qvalia's services are compatible with Peppol the data validation is also done using the Peppol standards. For example the Invoice endpoint strictly follows BIS Billing 3.0, <https://docs.peppol.eu/poacc/billing/3.0/>

This means that, although the JSON format is based upon UBL JSON, Qvalia only allow the subset stated from <https://docs.peppol.eu/poacc/billing/3.0/> for the Invoice and CreditNote message types, see the “Syntax” section!

For Order and OrderResponse you'll find the documentation at: <https://docs.peppol.eu/poacc/upgrade-3/>
{% endhint %}

### Authentication <a href="#authentication" id="authentication"></a>

Qvalia use API keys for the Authentication of requests. You can get your API key from our Support team and you’ll get a separate key and URL for Production and Test environments. All requests are using HTTPS with a minimum of TLS 1.2

Each request made to the API will contain your `registration number` which is your account identifier for your Qvalia account. Your account identifier will be provided to you from the Support team during the onboarding process.

Your requests must use the registration number as e.g. `POST /{registration_number}/invoices/outgoing`

### Peppol Country-Specific and International Profiles <a href="#ubl-json-representation-standard" id="ubl-json-representation-standard"></a>

Qvalia support various country specific or International profiles through the Transaction API for [Invoice](/api-documentation/apis/transaction-api/invoice-apis.md) and [CreditNote](/api-documentation/apis/transaction-api/creditnote-apis.md).

Just follow the standard /invoices/... or /creditnotes/... endpoints as our API is utilized per "root" element of the document, e.g. "`<Invoice>`".

Currently supported document types:

<table><thead><tr><th width="456">Customization ID</th><th>Short description</th></tr></thead><tbody><tr><td><code>urn:peppol:pint:billing-1</code></td><td>PINT BIS Billing</td></tr><tr><td><code>urn:peppol:pint:billing-1@jp-1</code></td><td>PINT Japan</td></tr><tr><td><code>urn:peppol:pint:billing-1@sg-1</code></td><td>PINT Singapore</td></tr><tr><td><code>urn:peppol:pint:billing-1@aunz-1</code></td><td>PINT Australia/New Zeeland</td></tr><tr><td><code>urn:peppol:pint:billing-1@my-1</code></td><td>PINT Malaysia</td></tr><tr><td><code>urn:peppol:pint:billing-1@en16931-2017@eu-3</code></td><td>PINT EU</td></tr><tr><td><code>urn:peppol:pint:billing-1@ae-1</code></td><td>PINT UAE</td></tr></tbody></table>

### UBL JSON Representation standard <a href="#ubl-json-representation-standard" id="ubl-json-representation-standard"></a>

For the JSON representation of the format please refer to <http://docs.oasis-open.org/ubl/UBL-2.1-JSON/v2.0/UBL-2.1-JSON-v2.0.html>

UBL JSON samples and schemas can be found here: <http://docs.oasis-open.org/ubl/UBL-2.1-JSON/v2.0/cnd01/>

### UBL XML Representation standard <a href="#ubl-xml-representation-standard" id="ubl-xml-representation-standard"></a>

For the XML representation, <https://docs.oasis-open.org/ubl/UBL-2.1.html>

The UBL version 2.1 has been selected due to the many compliant standars with UBL 2.1, mainly the Peppol standard (peppol.eu).

XML samples and XML schemas can be found here: <http://docs.oasis-open.org/ubl/os-UBL-2.1/>

### Required <a href="#required" id="required"></a>

As the UBL JSON schema is fairly big, Qvalia only lists the `required` attributes in the sample request and response data. You can browse the complete `JSON schema` viewing the `UBL-Invoice-2.1`.

Note the difference in objects below, only IssueDate is required, and thus IssueTime won't be listed in the sample request/responses:

### Attachments <a href="#attachments" id="attachments"></a>

Often our customers wants to add, or request, attached documents to their messages, e.g. their invoices.

Qvalia supports all the same attachments as Peppol does: Peppol media types

See more under [Attachments to messages](/qvalia-developer-tools/attachments-to-messages.md)

### SFTP Integration <a href="#sftp-integration" id="sftp-integration"></a>

Qvalia is also offering integration through SFTP. If you have opted for the SFTP integration please read more here: [SFTP Integration](#sftp-integration)

<br>


---

# 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://api.qvalia.io/qvalia-developer-tools/api.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.
