# Qvalia Developer Tools

<figure><img src="/files/ZIepBBx5At1G18L0RMOa" alt="" width="375"><figcaption></figcaption></figure>

Our APIs and onboarding team ensures a swift integration into your systems and processes. Qvalia integrates with major ERPs and accounting software.

All Qvalia API’s are [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) based and we use both JSON and XML request and response payloads. All message formats are based upon [UBL](https://en.wikipedia.org/wiki/Universal_Business_Language) and our JSON format is a representation of the XML called UBL JSON by OASIS Open group. We strive to use the REST standards for response codes and “verbs” (e.g. GET and POST).

The Qvalia API has two separate endpoints for our Production and a Test (Quality Assurance) environment.

> `https://api.qvalia.com/       [Production]`
>
> `https://api-qa.qvalia.com/    [Staging / Sandbox]`

{% hint style="warning" %}
You must obtain a Qvalia account prior to using (or testing) the API!
{% endhint %}

***

Want to jump right in?

{% content-ref url="/pages/aqVKtBOtEKGcwRhxygtW" %}
[Quick Start](/quick-start)
{% endcontent-ref %}

{% content-ref url="/pages/PHqCxQlGl0DgM5ZRIwr9" %}
[APIs](/api-documentation/apis)
{% endcontent-ref %}

***

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

We 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

### Parameters

Some of our API's has the possibility to provide parameters for e.g. filtering. These parameters are sent as a query string and the options are listed per endpoint under the technical API documentation.

### Error handling <a href="#error-handling" id="error-handling"></a>

We offer various error codes based upon the type of error, along with a descriptive error message (in JSON or XML). Like any other API codes in the range of 2xx is a successful request while a status of 4xx indicates an error that occurred because of the data sent or a parameter missing/in error. In the 5xx range indicate an error with our server/service and you should contact the Qvalia Support if you ever would end up getting any 5xx code as response.

### **Support**

You can always contact Qvalia Support through your Qvalia Sales representative or by using our Support e-mail (see your Qvalia Account for details).

### **Coding**

We use Node.js inhouse, and JSON is our format of choice, however, as many ERP and Financial systems are using XML we have opted to add support for both formats in our API. You can freely swap between XML and JSON, just by using different headers:

Omitting `accept` or `content-type` headers, we'll default to JSON!

| **XML**                                                                                                     | **JSON (Default)**                                                                                            |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| <p>GET requests:</p><p>accept: application/xml</p><p>POST requests:</p><p>content-type: application/xml</p> | <p>GET requests:</p><p>accept: application/json</p><p>POST requests:</p><p>content-type: application/json</p> |

*Node.js sample code for calling the API for sending a JSON request could look like:*

```javascript
async function httpsPost(registrationNumber, data) {
  return new Promise(async (resolve, reject) => {
    const options = {
      hostname: 'api.qvalia.com',
      path: `/transaction/${registrationNumber}/invoices/outgoing`,
      port: 443,
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: '412ee738......d3e469a7'
      }
    };
    const body = [];
    const req = https.request(options, res => {
      res.on('data', d=> {
        body.push(d);
      });
      res.on('end', () => {
        resolve(body);
      });
    });
    req.on('error', e => {
      reject(e);
    });
    req.write(JSON.stringify(data));
    req.end();
  });
}
```


# 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) and [CreditNote](/api-documentation/apis/transaction-api/credit-note-apis).

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)

### 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>


# JSON/XML or JSON to XML

As we support both the Peppol UBL and XML standards you can freely choose between then, and even mix them, with creating a message as XML but fetching it using JSON, or the other way round.

The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).

{% hint style="success" %}
With JSON data we add the `integrationId` attribute (the unique identifier in our DB) into the JSON object, as, with JSON, you can get an array of objects and then each object has it's own unique `integrationId`.

With XML we only return one message at a time in the original XML format and because of this the `integrationId` will be returned as a HTTP response header (and please note that HTTP headers are case-insensitive, meaning the returned ID will be `integrationid`in all lowercase letters!)
{% endhint %}

### Transformation between JSON and XML <a href="#transformation-between-json-and-xml" id="transformation-between-json-and-xml"></a>

Our API is developed closely to the UBL and Peppol specifications why we've opted to include both the `XML` and `JSON` representations of the formats.

The two representations are "interchangeble" through a transform but if you are a "Node.js" shop you should opt for the `JSON` format. Other programming languages might have an easier time to work with XML instead.

There is a limitation in XML as there is no `batch` function for XML, meaning the `XML` format only supports one invoice per request!

Using the `npm` module xml2js you can transform between `JSON` and `XML` as the format is bi-directional.

```javascript
const xml2js = require('xml2js');
// Convert from JSON ->> XML
const convertUblJsonToUblXml = async (json) => {
  const builder = new xml2js.Builder();
  return builder.buildObject(json);
};
// Convert from XML (string) ->> JSON
const convertUblXmlToUblJson = async (xmlString) => {
  const parser = new xml2js.Parser({ explicitArray: true, explicitCharkey: true });
  return parser.parseStringPromise(xmlString);
};
```

### Limit <a href="#limit" id="limit"></a>

The XML has no “envelope” so we only ever return one message, meaning the `limit` parameter is set to `1`. Using JSON you can set any limit you like, but the response size is limited to 6 MB.

For JSON, we return the `integrationId` as part of the message, while with XML you'll find it as a returned HTTP header named `integrationId`. When you do a `POST` (creating something) we return the message about the message created along with the `integrationId`.

The `integrationId` is the unique identifier for the message in our database and you can store that as an external permanent link to the message with us.


# Attachments to messages

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

We support all the same attachments as Peppol does: [Peppol media types](https://docs.peppol.eu/poacc/billing/3.0/bis/#media-type)

| SUPPORTED FILE TYPES |                                                                                                                             |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Do**cuments        | application/pdf                                                                                                             |
| Images               | image/png image/jpeg                                                                                                        |
| Text                 | text/csv                                                                                                                    |
| Spreadsheet          | <p>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/vnd.oasis.opendocument.spreadsheet<br></p> |

### Technical details <a href="#technical-details" id="technical-details"></a>

Any attachment has to be `base64` encoded and added under the `AdditionalDocumentReference` element; <https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-AdditionalDocumentReference/cac-Attachment/>

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">JSON</td><td valign="top">XML</td></tr><tr><td valign="top"><pre class="language-json" data-overflow="wrap"><code class="lang-json">{
  "AdditionalDocumentReference": [
    {
      "ID": [
        {
          "_": "InvocieSpecification01"
        }
      ],
      "DocumentType": [
        {
          "_": "Specification"
        }
      ],
      "Attachment": [
        {
          "EmbeddedDocumentBinaryObject": [
            {
              "_": "UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi",
              "mimeCode": "application/pdf",
              "filename": "InvocieSpecification01.pdf"
            }
          ]
        }
      ]
    }
  ]
}
</code></pre></td><td valign="top"><pre class="language-xml" data-overflow="wrap"><code class="lang-xml">&#x3C;cac:AdditionalDocumentReference>
  &#x3C;cbc:ID>InvocieSpecification01&#x3C;/cbc:ID>
  &#x3C;cac:Attachment>
    &#x3C;cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="InvocieSpecification01.pdf">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi&#x3C;/cbc:EmbeddedDocumentBinaryObject>
  &#x3C;/cac:Attachment>
&#x3C;/cac:AdditionalDocumentReference>
</code></pre><p><br></p></td></tr></tbody></table>


# Quick Start

{% hint style="warning" %}
**You must first sign up for a Qvalia account, and contact Sales or Support to get access and API setup!**
{% endhint %}

### Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an `401` error.

**You will get your API key from Qvalia support, or the onboarding team!**

### Review the API Documentation

{% content-ref url="/pages/PHqCxQlGl0DgM5ZRIwr9" %}
[APIs](/api-documentation/apis)
{% endcontent-ref %}

### Make your first request

To make your first request, send an authenticated request to the `/invoices` endpoint. This will create an `invoice`.

### Create outgoing invoice

<mark style="color:green;">`POST`</mark> [`https://api.qvalia.com/transaction/{accountRegNo}/invoices/outgoing`](https://api.qvalia.com/transaction/{accountRegNo}/invoices/outgoing)

Creates a new outgoing invoice that will be sent over the Peppol network

#### Request Body

See: [https://app.gitbook.com/o/-McAY8WYeIvMOpDL\_Y9w/s/S4MbRBCDJsKGrYU4ahuP/\~/changes/2/sample-data/api-sample-data/invoice#json](/sample-data/api-sample-data/invoice#json)

{% tabs %}
{% tab title="200 Invoice successfully created" %}

```javascript
{
  "status": "success",
  "data": {
    "message": "invoice 12335675 sent",
    "order_id": ""
  }
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```
curl --location --globoff 'https://api.qvalia.com/transaction/{accountRegNo}/invoices/outgoing' \
--data '{
  "Invoice": {}
}'
```

{% endtab %}

{% tab title="Node" %}

```javascript
const body = {
  Invoice: {...}
};

var requestOptions = {
  method: 'POST',
  body
};

await fetch('https://api.qvalia.com/transaction/{accountRegNo}/invoices/outgoing', requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.qvalia.com/transaction/{accountRegNo}/invoices/outgoing"

body = "{
  \"Invoice\": {}
}"
headers = {}

response = requests.request("POST", url, headers=headers, data=body)

print(response.text)

```

{% endtab %}
{% endtabs %}


# APIs

Qvalia API server, base rules

{% stepper %}
{% step %}

#### Production base URL:

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

{% step %}

#### Staging / Sandbox server base URL:

<https://api-qa.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
  * <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 cause 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're too fast, we will block you for a while and you'll need to cool down
  * <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
```


# Ways to authenticate

Every Qvalia Public API endpoint accepts either:

* an **API key**, sent as the `Authorization` header, or
* a short-lived **JWT access token**, sent as `Authorization: Bearer <token>`.

#### API key access

Every Qvalia account has an API key, which is a long-lived secret that can be used to authenticate as that account.

The API key is sent in the `Authorization` header as: `Authorization: ApiKey <api_key>`

The API key is issued by Qvalia and can be rotated or revoked using Qvalia's portal, or through Qvalia Helpdesk. You'll find your API key in the Qvalia portal under API & SFTP settings.

If you are a Partner, your API key is issued to your Partner account, and you will use your own `partnerRegNo` as the `accountRegNo` when authenticating.

***It is the responsibility of the account holder to keep the API key secret!***

API Keys can not be fetch again after they have been issued, so make sure to store it securely. If you lose your API key, you can generate a new one in the Qvalia portal.

#### JWT access token through the `/token` endpoint

Use `/token` to exchange your credentials for a JWT. There are three ways to do this, depending on your role and who you want to authenticate as:

1. **Authenticate as yourself (`accountRegNo` in the URI)**. Call `GET` or `POST /token/{accountRegNo}` with your own `accountRegNo` in the URI and your API key in the `Authorization` header. This also applies if you are a Partner: a Partner always authenticates using its **own** `partnerRegNo` as the `accountRegNo` — never a child account's regNo. Access to a specific child account (e.g. via `/partner/{partnerRegNo}/...` endpoints) is granted on the Partner's child account.
2. **Partner acting on behalf of a child account (`actingAs: parent`)** — a Partner can request a token scoped to one of its child accounts by `POST`'ing to `/token/{partnerRegNo}` (or `/token`, see below) with `actingAs: parent` and `forChildRegNo: <childAccountRegNo>` in the body. The Partner must be authorized to act on behalf of that child. The resulting token's `sub` claim is the child account, so it can be used to call endpoints that operate directly on the child account (e.g. SCIM user provisioning) on the child's behalf, meaning that `/partner/{partnerRegNo}` can be omitted from the URI when calling a child's account, e.g. `/transaction/{accountRegNo}`.
3. **Client credentials (no `accountRegNo` in the URI)** — instead of putting `accountRegNo` in the URI and the API key in the `Authorization` header, you may `POST` to `/token` with `client_id` (your `accountRegNo`) and `client_secret` (your API key) either in the body, or as HTTP Basic auth (`Authorization: Basic base64(client_id:client_secret)` — the convention most OAuth2 client libraries default to). This is functionally equivalent to option 1 (or option 2, if combined with `actingAs: parent`), and is useful for clients that model authentication as an OAuth2-style client-credentials exchange.

Tokens expire after one hour.


# Authentication

Obtain a JWT for use as a Bearer token on any Qvalia API

## Create access token (JWT) for accountRegNo

> Exchange an API key for a short-lived JWT access token, authenticating\
> as \`accountRegNo\` (a Partner uses its own \`partnerRegNo\` here). The\
> returned token can be used as a Bearer token\
> (\`Authorization: Bearer \<token>\`) on any Qvalia API endpoint as an\
> alternative to the API key.\
> \
> \`GET\` always authenticates as self; use \`POST\` if you need to act on\
> behalf of a child account (\`actingAs: parent\`).\
> \
> Tokens expire after one hour.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Authentication API","version":"1.0.0"},"tags":[{"name":"Authentication","description":"Obtain a JWT for use as a Bearer token on any Qvalia API"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} or POST /token (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia. A Partner uses its own partnerRegNo here."}},"responses":{"tokenCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"}}}}}}}},"paths":{"/token/{accountRegNo}":{"get":{"tags":["Authentication"],"summary":"Create access token (JWT) for accountRegNo","description":"Exchange an API key for a short-lived JWT access token, authenticating\nas `accountRegNo` (a Partner uses its own `partnerRegNo` here). The\nreturned token can be used as a Bearer token\n(`Authorization: Bearer <token>`) on any Qvalia API endpoint as an\nalternative to the API key.\n\n`GET` always authenticates as self; use `POST` if you need to act on\nbehalf of a child account (`actingAs: parent`).\n\nTokens expire after one hour.","operationId":"authentication/get-token","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"name":"Authorization","in":"header","description":"API key for the account, sent as `Authorization: ApiKey <api_key>`","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/tokenCreated"},"401":{"description":"Unauthorized"},"422":{"description":"Unprocessable Entity"},"500":{"description":"Internal Server Error"}}}}}}
```

## Create access token (JWT) for accountRegNo, or on behalf of a child account

> Exchange an API key for a short-lived JWT access token, authenticating\
> as \`accountRegNo\` (a Partner uses its own \`partnerRegNo\` here).\
> \
> \- \`actingAs: self\` (default) — issue a token for \`accountRegNo\` itself.\
> \- \`actingAs: parent\` — a Partner issues a token to act on behalf of a\
> &#x20; child account; \`forChildRegNo\` is required and the Partner must be\
> &#x20; authorized for that child. The token's \`sub\` claim will be the child\
> &#x20; account.\
> \
> The request body may be omitted entirely, which is equivalent to\
> \`{"actingAs": "self"}\`.\
> \
> Tokens expire after one hour.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Authentication API","version":"1.0.0"},"tags":[{"name":"Authentication","description":"Obtain a JWT for use as a Bearer token on any Qvalia API"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} or POST /token (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia. A Partner uses its own partnerRegNo here."}},"schemas":{"CreateTokenBody":{"type":"object","properties":{"actingAs":{"type":"string","enum":["self","parent"],"default":"self","description":"Optional, defaults to \"self\". If \"parent\", `forChildRegNo` is required and the caller must be authorized to act on behalf of that child."},"forChildRegNo":{"type":"string","description":"Required when actingAs is \"parent\"; the child account to act for."}}}},"responses":{"tokenCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"}}}}}}}},"paths":{"/token/{accountRegNo}":{"post":{"tags":["Authentication"],"summary":"Create access token (JWT) for accountRegNo, or on behalf of a child account","description":"Exchange an API key for a short-lived JWT access token, authenticating\nas `accountRegNo` (a Partner uses its own `partnerRegNo` here).\n\n- `actingAs: self` (default) — issue a token for `accountRegNo` itself.\n- `actingAs: parent` — a Partner issues a token to act on behalf of a\n  child account; `forChildRegNo` is required and the Partner must be\n  authorized for that child. The token's `sub` claim will be the child\n  account.\n\nThe request body may be omitted entirely, which is equivalent to\n`{\"actingAs\": \"self\"}`.\n\nTokens expire after one hour.","operationId":"authentication/create-token","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"requestBody":{"description":"Request body. May be omitted (defaults to `actingAs: self`).","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenBody"}}}},"responses":{"200":{"$ref":"#/components/responses/tokenCreated"},"401":{"description":"Unauthorized"},"422":{"description":"Unprocessable Entity"},"500":{"description":"Internal Server Error"}}}}}}
```

## Create access token (JWT) using client\_id/client\_secret

> Exchange \`client\_id\` (your \`accountRegNo\`) and \`client\_secret\` (your API\
> key) for a short-lived JWT access token. Use this as an alternative to\
> \`POST /token/{accountRegNo}\` when you'd rather not put \`accountRegNo\` in\
> the URI and the API key in the \`Authorization\` header - for example, if\
> your client is built around an OAuth2-style client-credentials exchange.\
> \
> Supply the credentials either way:\
> \- \*\*In the body\*\* — \`client\_id\` and \`client\_secret\` as JSON fields (see below).\
> \- \*\*As HTTP Basic auth\*\* — \`Authorization: Basic base64(client\_id:client\_secret)\`,\
> &#x20; per \[RFC 6749 §2.3.1]\(<https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1),\\>
> &#x20; the convention most off-the-shelf OAuth2 client libraries default to for a\
> &#x20; client\_credentials exchange. When Basic auth is present, the body may be\
> &#x20; omitted entirely (or contain only \`actingAs\`/\`forChildRegNo\`); a\
> &#x20; \`client\_id\`/\`client\_secret\` pair in the body always takes precedence over\
> &#x20; Basic auth if both are supplied.\
> \
> \- \`actingAs: self\` (default) — issue a token for \`client\_id\` itself.\
> \- \`actingAs: parent\` — a Partner issues a token to act on behalf of a\
> &#x20; child account; \`forChildRegNo\` is required and the Partner\
> &#x20; (\`client\_id\`) must be authorized for that child. The token's \`sub\`\
> &#x20; claim will be the child account.\
> \
> There is no bodyless \`GET /token\` equivalent - \`GET\` always requires\
> \`accountRegNo\` in the URI, see \`GET /token/{accountRegNo}\`.\
> \
> Tokens expire after one hour.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Authentication API","version":"1.0.0"},"tags":[{"name":"Authentication","description":"Obtain a JWT for use as a Bearer token on any Qvalia API"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"basic":[]},{}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic","description":"HTTP Basic auth as an alternative way to supply client_id/client_secret to\nPOST /token (username = client_id, password = client_secret). Only accepted\non POST /token, not on other Qvalia API endpoints.\n"}},"schemas":{"CreateTokenBody":{"type":"object","properties":{"actingAs":{"type":"string","enum":["self","parent"],"default":"self","description":"Optional, defaults to \"self\". If \"parent\", `forChildRegNo` is required and the caller must be authorized to act on behalf of that child."},"forChildRegNo":{"type":"string","description":"Required when actingAs is \"parent\"; the child account to act for."}}}},"responses":{"tokenCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"}}}}}}}},"paths":{"/token":{"post":{"tags":["Authentication"],"summary":"Create access token (JWT) using client_id/client_secret","description":"Exchange `client_id` (your `accountRegNo`) and `client_secret` (your API\nkey) for a short-lived JWT access token. Use this as an alternative to\n`POST /token/{accountRegNo}` when you'd rather not put `accountRegNo` in\nthe URI and the API key in the `Authorization` header - for example, if\nyour client is built around an OAuth2-style client-credentials exchange.\n\nSupply the credentials either way:\n- **In the body** — `client_id` and `client_secret` as JSON fields (see below).\n- **As HTTP Basic auth** — `Authorization: Basic base64(client_id:client_secret)`,\n  per [RFC 6749 §2.3.1](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1),\n  the convention most off-the-shelf OAuth2 client libraries default to for a\n  client_credentials exchange. When Basic auth is present, the body may be\n  omitted entirely (or contain only `actingAs`/`forChildRegNo`); a\n  `client_id`/`client_secret` pair in the body always takes precedence over\n  Basic auth if both are supplied.\n\n- `actingAs: self` (default) — issue a token for `client_id` itself.\n- `actingAs: parent` — a Partner issues a token to act on behalf of a\n  child account; `forChildRegNo` is required and the Partner\n  (`client_id`) must be authorized for that child. The token's `sub`\n  claim will be the child account.\n\nThere is no bodyless `GET /token` equivalent - `GET` always requires\n`accountRegNo` in the URI, see `GET /token/{accountRegNo}`.\n\nTokens expire after one hour.","operationId":"authentication/create-token-client-credentials","requestBody":{"description":"Request body. May be omitted (or contain only `actingAs`/`forChildRegNo`)\nwhen `client_id`/`client_secret` are instead supplied via HTTP Basic auth.","required":false,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateTokenBody"},{"type":"object","properties":{"client_id":{"type":"string","description":"Your accountRegNo (a Partner uses its own partnerRegNo here). Required unless supplied via HTTP Basic auth instead."},"client_secret":{"type":"string","description":"Your API key. Required unless supplied via HTTP Basic auth instead."}}}]}}}},"responses":{"200":{"$ref":"#/components/responses/tokenCreated"},"401":{"description":"Unauthorized"},"422":{"description":"Unprocessable Entity"},"500":{"description":"Internal Server Error"}}}}}}
```


# Transaction API

Qvalia Transaction API

The Qvalia Transaction API has endpoints for all Peppol messages.

[Download OpenAPI definitions](https://openapi.gitbook.com/o/-McAY8WYeIvMOpDL_Y9w/spec/transaction-api.yaml)

{% hint style="success" %}
All transaction endpoints supports both JSON and XML!
{% endhint %}

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

We use API keys or JWT 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.

{% hint style="success" %} <mark style="color:$success;">See</mark> [Ways to authenticate](/api-documentation/apis/ways-to-authenticate)<mark style="color:$success;">for detailed information!</mark>
{% endhint %}

Each request made to the API will contain your `account 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 /{account registration number}/invoices/outgoing`

### 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/>

### Country specific or International document types <a href="#required" id="required"></a>

In the i

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

As the UBL JSON schema is fairly big, we only list 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.

We support all the same attachments as Peppol does: Peppol media types

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


# Invoice APIs

Operations related to Invoices

## Get incoming invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoices/incoming":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-invoices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming invoices \[transaction-type: Invoice]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"InvoiceJSON":{"type":"object","properties":{"Invoice":{"type":"object","description":"","properties":{},"required":[""]}}},"Invoice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostInvoice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Invoice"}}}}}},"paths":{"/transaction/{accountRegNo}/invoices/incoming":{"post":{"tags":["Invoice APIs"],"summary":"Create incoming invoices [transaction-type: Invoice]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-invoices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostInvoice"}}}}}
```

## Read incoming invoices \[transaction-type: Invoice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoices/incoming/readinvoices":{"get":{"tags":["Invoice APIs"],"summary":"Read incoming invoices [transaction-type: Invoice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-invoices-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoices/outgoing":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-invoices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"InvoiceJSON":{"type":"object","properties":{"Invoice":{"type":"object","description":"","properties":{},"required":[""]}}},"Invoice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostInvoice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Invoice"}}}}}},"paths":{"/transaction/{accountRegNo}/invoices/outgoing":{"post":{"tags":["Invoice APIs"],"summary":"Create outgoing invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-invoices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostInvoice"}}}}}
```

## Read outgoing invoices \[transaction-type: Invoice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoices/outgoing/readinvoices":{"get":{"tags":["Invoice APIs"],"summary":"Read outgoing invoices [transaction-type: Invoice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-invoices-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming invoice responses \[transaction-type: InvoiceResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/incoming":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming invoice responses [transaction-type: InvoiceResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoiceresponses-apis/get-invoiceresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming invoice responses \[transaction-type: InvoiceResponse]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/incoming":{"post":{"tags":["Invoice APIs"],"summary":"Create incoming invoice responses [transaction-type: InvoiceResponse]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoiceresponses-apis/post-invoiceresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read incoming invoice responses \[transaction-type: InvoiceResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/incoming/readinvoice responses":{"get":{"tags":["Invoice APIs"],"summary":"Read incoming invoice responses [transaction-type: InvoiceResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoiceresponses-apis/get-invoiceresponses-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing invoice responses \[transaction-type: InvoiceResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/outgoing":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing invoice responses [transaction-type: InvoiceResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoiceresponses-apis/get-invoiceresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing invoice responses \[transaction-type: InvoiceResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/outgoing":{"post":{"tags":["Invoice APIs"],"summary":"Create outgoing invoice responses [transaction-type: InvoiceResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoiceresponses-apis/post-invoiceresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read outgoing invoice responses \[transaction-type: InvoiceResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/outgoing/readinvoice responses":{"get":{"tags":["Invoice APIs"],"summary":"Read outgoing invoice responses [transaction-type: InvoiceResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoiceresponses-apis/get-invoiceresponses-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming self billing invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/incoming":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming self billing invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillinginvoice-apis/get-invoices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming self billing invoices \[transaction-type: Invoice]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"InvoiceJSON":{"type":"object","properties":{"Invoice":{"type":"object","description":"","properties":{},"required":[""]}}},"Invoice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostInvoice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Invoice"}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/incoming":{"post":{"tags":["Invoice APIs"],"summary":"Create incoming self billing invoices [transaction-type: Invoice]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"selfbillinginvoice-apis/post-invoices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostInvoice"}}}}}
```

## Read incoming self billing invoices \[transaction-type: Invoice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/incoming/readselfbillinginvoices":{"get":{"tags":["Invoice APIs"],"summary":"Read incoming self billing invoices [transaction-type: Invoice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"selfbillinginvoice-apis/get-invoices-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing self billing invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/outgoing":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing self billing invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillinginvoice-apis/get-invoices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing self billing invoices \[transaction-type: Invoice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"InvoiceJSON":{"type":"object","properties":{"Invoice":{"type":"object","description":"","properties":{},"required":[""]}}},"Invoice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostInvoice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Invoice"}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/outgoing":{"post":{"tags":["Invoice APIs"],"summary":"Create outgoing self billing invoices [transaction-type: Invoice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillinginvoice-apis/post-invoices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostInvoice"}}}}}
```

## Read outgoing self billing invoices \[transaction-type: Invoice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/outgoing/readselfbillinginvoices":{"get":{"tags":["Invoice APIs"],"summary":"Read outgoing self billing invoices [transaction-type: Invoice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"selfbillinginvoice-apis/get-invoices-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming invoice statuses \[transaction-type: Invoice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/invoices/incoming/status":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming invoice statuses [transaction-type: Invoice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"invoice-apis/get-invoices-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing invoice statuses \[transaction-type: Invoice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/invoices/outgoing/status":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing invoice statuses [transaction-type: Invoice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"invoice-apis/get-invoices-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming invoice response statuses \[transaction-type: InvoiceResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/incoming/status":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming invoice response statuses [transaction-type: InvoiceResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"invoiceresponses-apis/get-invoiceresponses-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing invoice response statuses \[transaction-type: InvoiceResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/invoiceresponses/outgoing/status":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing invoice response statuses [transaction-type: InvoiceResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"invoiceresponses-apis/get-invoiceresponses-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming self billing invoice statuses \[transaction-type: Invoice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/incoming/status":{"get":{"tags":["Invoice APIs"],"summary":"Get incoming self billing invoice statuses [transaction-type: Invoice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"selfbillinginvoice-apis/get-invoices-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing self billing invoice statuses \[transaction-type: Invoice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Invoice APIs","description":"Operations related to Invoices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillinginvoices/outgoing/status":{"get":{"tags":["Invoice APIs"],"summary":"Get outgoing self billing invoice statuses [transaction-type: Invoice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"selfbillinginvoice-apis/get-invoices-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Credit Note APIs

Operations related to CreditNotes

## Get incoming credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/incoming":{"get":{"tags":["CreditNote APIs"],"summary":"Get incoming credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"creditnote-apis/get-creditnotes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming credit notes \[transaction-type: CreditNote]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CreditNoteJSON":{"type":"object","properties":{"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}}},"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCreditNote":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CreditNote"}}}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/incoming":{"post":{"tags":["CreditNote APIs"],"summary":"Create incoming credit notes [transaction-type: CreditNote]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"creditnote-apis/post-creditnotes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCreditNote"}}}}}
```

## Read incoming credit notes \[transaction-type: CreditNote]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/incoming/readcreditnotes":{"get":{"tags":["CreditNote APIs"],"summary":"Read incoming credit notes [transaction-type: CreditNote]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"creditnote-apis/get-creditnotes-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/outgoing":{"get":{"tags":["CreditNote APIs"],"summary":"Get outgoing credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"creditnote-apis/get-creditnotes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CreditNoteJSON":{"type":"object","properties":{"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}}},"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCreditNote":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CreditNote"}}}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/outgoing":{"post":{"tags":["CreditNote APIs"],"summary":"Create outgoing credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"creditnote-apis/post-creditnotes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCreditNote"}}}}}
```

## Read outgoing credit notes \[transaction-type: CreditNote]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/outgoing/readcreditnotes":{"get":{"tags":["CreditNote APIs"],"summary":"Read outgoing credit notes [transaction-type: CreditNote]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"creditnote-apis/get-creditnotes-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming self billing credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/incoming":{"get":{"tags":["CreditNote APIs"],"summary":"Get incoming self billing credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillingcreditnote-apis/get-creditnotes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming self billing credit notes \[transaction-type: CreditNote]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CreditNoteJSON":{"type":"object","properties":{"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}}},"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCreditNote":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CreditNote"}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/incoming":{"post":{"tags":["CreditNote APIs"],"summary":"Create incoming self billing credit notes [transaction-type: CreditNote]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"selfbillingcreditnote-apis/post-creditnotes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCreditNote"}}}}}
```

## Read incoming self billing credit notes \[transaction-type: CreditNote]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/incoming/readselfbillingcreditnotes":{"get":{"tags":["CreditNote APIs"],"summary":"Read incoming self billing credit notes [transaction-type: CreditNote]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"selfbillingcreditnote-apis/get-creditnotes-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing self billing credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/outgoing":{"get":{"tags":["CreditNote APIs"],"summary":"Get outgoing self billing credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillingcreditnote-apis/get-creditnotes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing self billing credit notes \[transaction-type: CreditNote]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CreditNoteJSON":{"type":"object","properties":{"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}}},"CreditNote":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCreditNote":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CreditNote"}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/outgoing":{"post":{"tags":["CreditNote APIs"],"summary":"Create outgoing self billing credit notes [transaction-type: CreditNote]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"selfbillingcreditnote-apis/post-creditnotes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCreditNote"}}}}}
```

## Read outgoing self billing credit notes \[transaction-type: CreditNote]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/outgoing/readselfbillingcreditnotes":{"get":{"tags":["CreditNote APIs"],"summary":"Read outgoing self billing credit notes [transaction-type: CreditNote]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"selfbillingcreditnote-apis/get-creditnotes-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming credit note statuses \[transaction-type: CreditNote]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/incoming/status":{"get":{"tags":["CreditNote APIs"],"summary":"Get incoming credit note statuses [transaction-type: CreditNote]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"creditnote-apis/get-creditnotes-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing credit note statuses \[transaction-type: CreditNote]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/creditnotes/outgoing/status":{"get":{"tags":["CreditNote APIs"],"summary":"Get outgoing credit note statuses [transaction-type: CreditNote]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"creditnote-apis/get-creditnotes-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming self billing credit note statuses \[transaction-type: CreditNote]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/incoming/status":{"get":{"tags":["CreditNote APIs"],"summary":"Get incoming self billing credit note statuses [transaction-type: CreditNote]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"selfbillingcreditnote-apis/get-creditnotes-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing self billing credit note statuses \[transaction-type: CreditNote]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"CreditNote APIs","description":"Operations related to CreditNotes"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/selfbillingcreditnotes/outgoing/status":{"get":{"tags":["CreditNote APIs"],"summary":"Get outgoing self billing credit note statuses [transaction-type: CreditNote]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"selfbillingcreditnote-apis/get-creditnotes-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Order APIs

Operations related to Orders

## Get incoming orders \[transaction-type: Order]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orders/incoming":{"get":{"tags":["Order APIs"],"summary":"Get incoming orders [transaction-type: Order]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-orders-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming orders \[transaction-type: Order]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderJSON":{"type":"object","properties":{"Order":{"type":"object","description":"","properties":{},"required":[""]}}},"Order":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrder":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Order"}}}}}},"paths":{"/transaction/{accountRegNo}/orders/incoming":{"post":{"tags":["Order APIs"],"summary":"Create incoming orders [transaction-type: Order]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-orders-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrder"}}}}}
```

## Read incoming orders \[transaction-type: Order]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orders/incoming/readorders":{"get":{"tags":["Order APIs"],"summary":"Read incoming orders [transaction-type: Order]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-orders-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing orders \[transaction-type: Order]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orders/outgoing":{"get":{"tags":["Order APIs"],"summary":"Get outgoing orders [transaction-type: Order]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-orders-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing orders \[transaction-type: Order]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderJSON":{"type":"object","properties":{"Order":{"type":"object","description":"","properties":{},"required":[""]}}},"Order":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrder":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Order"}}}}}},"paths":{"/transaction/{accountRegNo}/orders/outgoing":{"post":{"tags":["Order APIs"],"summary":"Create outgoing orders [transaction-type: Order]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-orders-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrder"}}}}}
```

## Read outgoing orders \[transaction-type: Order]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orders/outgoing/readorders":{"get":{"tags":["Order APIs"],"summary":"Read outgoing orders [transaction-type: Order]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-orders-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming order statuses \[transaction-type: Order]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orders/incoming/status":{"get":{"tags":["Order APIs"],"summary":"Get incoming order statuses [transaction-type: Order]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"order-apis/get-orders-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order statuses \[transaction-type: Order]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Order APIs","description":"Operations related to Orders"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orders/outgoing/status":{"get":{"tags":["Order APIs"],"summary":"Get outgoing order statuses [transaction-type: Order]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"order-apis/get-orders-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Order Response APIs

Operations related to OrderResponses

## Get incoming OrderResponses \[transaction-type: OrderResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/incoming":{"get":{"tags":["OrderResponse APIs"],"summary":"Get incoming OrderResponses [transaction-type: OrderResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-orderresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming OrderResponse \[transaction-type: OrderResponse]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderResponseJSON":{"type":"object","properties":{"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/incoming":{"post":{"tags":["OrderResponse APIs"],"summary":"Create incoming OrderResponse [transaction-type: OrderResponse]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-orderresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderResponse"}}}}}
```

## Read incoming OrderResponses \[transaction-type: OrderResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/incoming/readorderresponses":{"get":{"tags":["OrderResponse APIs"],"summary":"Read incoming OrderResponses [transaction-type: OrderResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-orderresponses-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing OrderResponses \[transaction-type: OrderResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/outgoing":{"get":{"tags":["OrderResponse APIs"],"summary":"Get outgoing OrderResponses [transaction-type: OrderResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-orderresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing OrderResponse \[transaction-type: OrderResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderResponseJSON":{"type":"object","properties":{"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/outgoing":{"post":{"tags":["OrderResponse APIs"],"summary":"Create outgoing OrderResponse [transaction-type: OrderResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-orderresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderResponse"}}}}}
```

## Read outgoing OrderResponses \[transaction-type: OrderResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/outgoing/readorderresponses":{"get":{"tags":["OrderResponse APIs"],"summary":"Read outgoing OrderResponses [transaction-type: OrderResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-orderresponses-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming order response statuses \[transaction-type: OrderResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/incoming/status":{"get":{"tags":["OrderResponse APIs"],"summary":"Get incoming order response statuses [transaction-type: OrderResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderresponse-apis/get-orderresponses-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order response statuses \[transaction-type: OrderResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderResponse APIs","description":"Operations related to OrderResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orderresponses/outgoing/status":{"get":{"tags":["OrderResponse APIs"],"summary":"Get outgoing order response statuses [transaction-type: OrderResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderresponse-apis/get-orderresponses-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Order Agreement APIs

Operations related to OrderAgreements

## Get incoming order agreements \[transaction-type: OrderAgreement]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/incoming":{"get":{"tags":["OrderAgreement APIs"],"summary":"Get incoming order agreements [transaction-type: OrderAgreement]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"orderagreement-apis/get-orderagreement-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming order agreements \[transaction-type: OrderAgreement]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderResponseJSON":{"type":"object","properties":{"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/incoming":{"post":{"tags":["OrderAgreement APIs"],"summary":"Create incoming order agreements [transaction-type: OrderAgreement]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"orderagreement-apis/post-orderagreement-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderResponse"}}}}}
```

## Read incoming order agreements \[transaction-type: OrderAgreement]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/incoming/readorderagreement":{"get":{"tags":["OrderAgreement APIs"],"summary":"Read incoming order agreements [transaction-type: OrderAgreement]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"orderagreement-apis/get-orderagreement-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order agreements \[transaction-type: OrderAgreement]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/outgoing":{"get":{"tags":["OrderAgreement APIs"],"summary":"Get outgoing order agreements [transaction-type: OrderAgreement]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"orderagreement-apis/get-orderagreement-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create order agreements \[transaction-type: OrderAgreement]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderResponseJSON":{"type":"object","properties":{"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/outgoing":{"post":{"tags":["OrderAgreement APIs"],"summary":"Create order agreements [transaction-type: OrderAgreement]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"orderagreement-apis/post-orderagreement-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderResponse"}}}}}
```

## Read order agreements \[transaction-type: OrderAgreement]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/outgoing/readorderagreement":{"get":{"tags":["OrderAgreement APIs"],"summary":"Read order agreements [transaction-type: OrderAgreement]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"orderagreement-apis/get-orderagreement-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming order agreement statuses \[transaction-type: OrderAgreement]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/incoming/status":{"get":{"tags":["OrderAgreement APIs"],"summary":"Get incoming order agreement statuses [transaction-type: OrderAgreement]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderagreement-apis/get-orderagreement-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order agreement statuses \[transaction-type: OrderAgreement]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderAgreement APIs","description":"Operations related to OrderAgreements"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/orderagreements/outgoing/status":{"get":{"tags":["OrderAgreement APIs"],"summary":"Get outgoing order agreement statuses [transaction-type: OrderAgreement]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderagreement-apis/get-orderagreement-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Order Change APIs

Operations related to OrderChanges

## Get incoming OrderChanges \[transaction-type: OrderChange]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-changes/incoming":{"get":{"tags":["OrderChange APIs"],"summary":"Get incoming OrderChanges [transaction-type: OrderChange]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-order-changes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming OrderChanges \[transaction-type: OrderChange]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderChangeJSON":{"type":"object","properties":{"OrderChange":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderChange":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderChange":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderChangeJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderChange"}}}}}},"paths":{"/transaction/{accountRegNo}/order-changes/incoming":{"post":{"tags":["OrderChange APIs"],"summary":"Create incoming OrderChanges [transaction-type: OrderChange]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-order-changes-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderChange"}}}}}
```

## Read incoming OrderChanges \[transaction-type: OrderChange]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-changes/incoming/readorderchanges":{"get":{"tags":["OrderChange APIs"],"summary":"Read incoming OrderChanges [transaction-type: OrderChange]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-order-changes-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing OrderChanges \[transaction-type: OrderChange]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-changes/outgoing":{"get":{"tags":["OrderChange APIs"],"summary":"Get outgoing OrderChanges [transaction-type: OrderChange]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-order-changes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing OrderChanges \[transaction-type: OrderChange]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderChangeJSON":{"type":"object","properties":{"OrderChange":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderChange":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderChange":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderChangeJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderChange"}}}}}},"paths":{"/transaction/{accountRegNo}/order-changes/outgoing":{"post":{"tags":["OrderChange APIs"],"summary":"Create outgoing OrderChanges [transaction-type: OrderChange]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-order-changes-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderChange"}}}}}
```

## Read outgoing OrderChanges \[transaction-type: OrderChange]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-changes/outgoing/readorderchanges":{"get":{"tags":["OrderChange APIs"],"summary":"Read outgoing OrderChanges [transaction-type: OrderChange]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-order-changes-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming order change statuses \[transaction-type: OrderChange]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/order-changes/incoming/status":{"get":{"tags":["OrderChange APIs"],"summary":"Get incoming order change statuses [transaction-type: OrderChange]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderchange-apis/get-order-changes-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order change statuses \[transaction-type: OrderChange]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderChange APIs","description":"Operations related to OrderChanges"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/order-changes/outgoing/status":{"get":{"tags":["OrderChange APIs"],"summary":"Get outgoing order change statuses [transaction-type: OrderChange]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"orderchange-apis/get-order-changes-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Order Cancellation APIs

Operations related to OrderCancellations

## Get incoming OrderCancellations \[transaction-type: OrderCancellation]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/incoming":{"get":{"tags":["OrderCancellation APIs"],"summary":"Get incoming OrderCancellations [transaction-type: OrderCancellation]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-order-cancellations-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming OrderCancellations \[transaction-type: OrderCancellation]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderCancellationJSON":{"type":"object","properties":{"OrderCancellation":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderCancellation":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderCancellation":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancellationJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderCancellation"}}}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/incoming":{"post":{"tags":["OrderCancellation APIs"],"summary":"Create incoming OrderCancellations [transaction-type: OrderCancellation]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-order-cancellations-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderCancellation"}}}}}
```

## Read incoming OrderCancellations \[transaction-type: OrderCancellation]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/incoming/readordercancellations":{"get":{"tags":["OrderCancellation APIs"],"summary":"Read incoming OrderCancellations [transaction-type: OrderCancellation]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-order-cancellations-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing OrderCancellations \[transaction-type: OrderCancellation]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/outgoing":{"get":{"tags":["OrderCancellation APIs"],"summary":"Get outgoing OrderCancellations [transaction-type: OrderCancellation]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-order-cancellations-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing OrderCancellations \[transaction-type: OrderCancellation]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"OrderCancellationJSON":{"type":"object","properties":{"OrderCancellation":{"type":"object","description":"","properties":{},"required":[""]}}},"OrderCancellation":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostOrderCancellation":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancellationJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OrderCancellation"}}}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/outgoing":{"post":{"tags":["OrderCancellation APIs"],"summary":"Create outgoing OrderCancellations [transaction-type: OrderCancellation]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-order-cancellations-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostOrderCancellation"}}}}}
```

## Read outgoing OrderCancellations \[transaction-type: OrderCancellation]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/outgoing/readordercancellations":{"get":{"tags":["OrderCancellation APIs"],"summary":"Read outgoing OrderCancellations [transaction-type: OrderCancellation]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-order-cancellations-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming order cancellation statuses \[transaction-type: OrderCancellation]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/incoming/status":{"get":{"tags":["OrderCancellation APIs"],"summary":"Get incoming order cancellation statuses [transaction-type: OrderCancellation]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"ordercancellation-apis/get-order-cancellations-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing order cancellation statuses \[transaction-type: OrderCancellation]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"OrderCancellation APIs","description":"Operations related to OrderCancellations"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/order-cancellations/outgoing/status":{"get":{"tags":["OrderCancellation APIs"],"summary":"Get outgoing order cancellation statuses [transaction-type: OrderCancellation]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"ordercancellation-apis/get-order-cancellations-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Catalogue APIs

Operations related to Catalogues

## Get incoming Catalogues \[transaction-type: Catalogue]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogues/incoming":{"get":{"tags":["Catalogue APIs"],"summary":"Get incoming Catalogues [transaction-type: Catalogue]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-catalogues-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming Catalogues \[transaction-type: Catalogue]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CatalogueJSON":{"type":"object","properties":{"Catalogue":{"type":"object","description":"","properties":{},"required":[""]}}},"Catalogue":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCatalogue":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Catalogue"}}}}}},"paths":{"/transaction/{accountRegNo}/catalogues/incoming":{"post":{"tags":["Catalogue APIs"],"summary":"Create incoming Catalogues [transaction-type: Catalogue]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-catalogues-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCatalogue"}}}}}
```

## Read incoming Catalogues \[transaction-type: Catalogue]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogues/incoming/readcatalogues":{"get":{"tags":["Catalogue APIs"],"summary":"Read incoming Catalogues [transaction-type: Catalogue]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-catalogues-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing Catalogues \[transaction-type: Catalogue]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogues/outgoing":{"get":{"tags":["Catalogue APIs"],"summary":"Get outgoing Catalogues [transaction-type: Catalogue]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-catalogues-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing Catalogues \[transaction-type: Catalogue]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"CatalogueJSON":{"type":"object","properties":{"Catalogue":{"type":"object","description":"","properties":{},"required":[""]}}},"Catalogue":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostCatalogue":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Catalogue"}}}}}},"paths":{"/transaction/{accountRegNo}/catalogues/outgoing":{"post":{"tags":["Catalogue APIs"],"summary":"Create outgoing Catalogues [transaction-type: Catalogue]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-catalogues-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostCatalogue"}}}}}
```

## Read outgoing Catalogues \[transaction-type: Catalogue]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogues/outgoing/readcatalogues":{"get":{"tags":["Catalogue APIs"],"summary":"Read outgoing Catalogues [transaction-type: Catalogue]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-catalogues-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming catalogue responses \[transaction-type: CatalogueResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/incoming":{"get":{"tags":["Catalogue APIs"],"summary":"Get incoming catalogue responses [transaction-type: CatalogueResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"catalogueresponses-apis/get-catalogueresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming catalogue responses \[transaction-type: CatalogueResponse]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/incoming":{"post":{"tags":["Catalogue APIs"],"summary":"Create incoming catalogue responses [transaction-type: CatalogueResponse]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"catalogueresponses-apis/post-catalogueresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read incoming catalogue responses \[transaction-type: CatalogueResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/incoming/readcatalogueresponses":{"get":{"tags":["Catalogue APIs"],"summary":"Read incoming catalogue responses [transaction-type: CatalogueResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"catalogueresponses-apis/get-catalogueresponses-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing catalogue responses \[transaction-type: CatalogueResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/outgoing":{"get":{"tags":["Catalogue APIs"],"summary":"Get outgoing catalogue responses [transaction-type: CatalogueResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"catalogueresponses-apis/get-catalogueresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing catalogue responses \[transaction-type: CatalogueResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/outgoing":{"post":{"tags":["Catalogue APIs"],"summary":"Create outgoing catalogue responses [transaction-type: CatalogueResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"catalogueresponses-apis/post-catalogueresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read outgoing catalogue responses \[transaction-type: CatalogueResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/outgoing/readcatalogueresponses":{"get":{"tags":["Catalogue APIs"],"summary":"Read outgoing catalogue responses [transaction-type: CatalogueResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"catalogueresponses-apis/get-catalogueresponses-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming catalogue statuses \[transaction-type: Catalogue]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/catalogues/incoming/status":{"get":{"tags":["Catalogue APIs"],"summary":"Get incoming catalogue statuses [transaction-type: Catalogue]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"catalogue-apis/get-catalogues-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing catalogue statuses \[transaction-type: Catalogue]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/catalogues/outgoing/status":{"get":{"tags":["Catalogue APIs"],"summary":"Get outgoing catalogue statuses [transaction-type: Catalogue]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"catalogue-apis/get-catalogues-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming catalogue response statuses \[transaction-type: CatalogueResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/incoming/status":{"get":{"tags":["Catalogue APIs"],"summary":"Get incoming catalogue response statuses [transaction-type: CatalogueResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"catalogueresponses-apis/get-catalogueresponses-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing catalogue response statuses \[transaction-type: CatalogueResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"Catalogue APIs","description":"Operations related to Catalogues"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/catalogueresponses/outgoing/status":{"get":{"tags":["Catalogue APIs"],"summary":"Get outgoing catalogue response statuses [transaction-type: CatalogueResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"catalogueresponses-apis/get-catalogueresponses-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Despatch Advice APIs

Operations related to DespatchAdvices

## Get incoming DespatchAdvices \[transaction-type: DespatchAdvice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/incoming":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Get incoming DespatchAdvices [transaction-type: DespatchAdvice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-despatch-advices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming DespatchAdvices \[transaction-type: DespatchAdvice]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"DespatchAdviceJSON":{"type":"object","properties":{"DespatchAdvice":{"type":"object","description":"","properties":{},"required":[""]}}},"DespatchAdvice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostDespatchAdvice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DespatchAdviceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/DespatchAdvice"}}}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/incoming":{"post":{"tags":["DespatchAdvice APIs"],"summary":"Create incoming DespatchAdvices [transaction-type: DespatchAdvice]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"invoice-apis/post-despatch-advices-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostDespatchAdvice"}}}}}
```

## Read incoming DespatchAdvices \[transaction-type: DespatchAdvice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/incoming/readdespatchadvices":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Read incoming DespatchAdvices [transaction-type: DespatchAdvice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-despatch-advices-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing DespatchAdvices \[transaction-type: DespatchAdvice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/outgoing":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Get outgoing DespatchAdvices [transaction-type: DespatchAdvice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/get-despatch-advices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create outgoing DespatchAdvices \[transaction-type: DespatchAdvice]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"DespatchAdviceJSON":{"type":"object","properties":{"DespatchAdvice":{"type":"object","description":"","properties":{},"required":[""]}}},"DespatchAdvice":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostDespatchAdvice":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DespatchAdviceJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/DespatchAdvice"}}}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/outgoing":{"post":{"tags":["DespatchAdvice APIs"],"summary":"Create outgoing DespatchAdvices [transaction-type: DespatchAdvice]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"invoice-apis/post-despatch-advices-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostDespatchAdvice"}}}}}
```

## Read outgoing DespatchAdvices \[transaction-type: DespatchAdvice]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/outgoing/readdespatchadvices":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Read outgoing DespatchAdvices [transaction-type: DespatchAdvice]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"invoice-apis/get-despatch-advices-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming despatch advice statuses \[transaction-type: DespatchAdvice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/incoming/status":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Get incoming despatch advice statuses [transaction-type: DespatchAdvice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"despatchadvice-apis/get-despatch-advices-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing despatch advice statuses \[transaction-type: DespatchAdvice]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"DespatchAdvice APIs","description":"Operations related to DespatchAdvices"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/despatch-advices/outgoing/status":{"get":{"tags":["DespatchAdvice APIs"],"summary":"Get outgoing despatch advice statuses [transaction-type: DespatchAdvice]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"despatchadvice-apis/get-despatch-advices-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Message Level Response APIs

Operations related to MessageLevelResponses

## Get incoming message level responses \[transaction-type: MessageLevelResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/incoming":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Get incoming message level responses [transaction-type: MessageLevelResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelresponses-apis/get-messagelevelresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming message level responses \[transaction-type: MessageLevelResponse]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/incoming":{"post":{"tags":["MessageLevelResponse APIs"],"summary":"Create incoming message level responses [transaction-type: MessageLevelResponse]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"messagelevelresponses-apis/post-messagelevelresponses-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read incoming message level responses \[transaction-type: MessageLevelResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/incoming/readmessagelevelresponses":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Read incoming message level responses [transaction-type: MessageLevelResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"messagelevelresponses-apis/get-messagelevelresponses-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing message level responses \[transaction-type: MessageLevelResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/outgoing":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Get outgoing message level responses [transaction-type: MessageLevelResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelresponses-apis/get-messagelevelresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create message level responses \[transaction-type: MessageLevelResponse]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/outgoing":{"post":{"tags":["MessageLevelResponse APIs"],"summary":"Create message level responses [transaction-type: MessageLevelResponse]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelresponses-apis/post-messagelevelresponses-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read message level responses \[transaction-type: MessageLevelResponse]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/outgoing/readmessagelevelresponses":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Read message level responses [transaction-type: MessageLevelResponse]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"messagelevelresponses-apis/get-messagelevelresponses-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming message level response statuses \[transaction-type: MessageLevelResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/incoming/status":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Get incoming message level response statuses [transaction-type: MessageLevelResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"messagelevelresponse-apis/get-messagelevelresponses-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing message level response statuses \[transaction-type: MessageLevelResponse]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelResponse APIs","description":"Operations related to MessageLevelResponses"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelresponses/outgoing/status":{"get":{"tags":["MessageLevelResponse APIs"],"summary":"Get outgoing message level response statuses [transaction-type: MessageLevelResponse]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"messagelevelresponse-apis/get-messagelevelresponses-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Message Level Status APIs

Operations related to MessageLevelStatus

## Get incoming message level status \[transaction-type: MessageLevelStatus]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/incoming":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Get incoming message level status [transaction-type: MessageLevelStatus]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelstatus-apis/get-messagelevelstatus-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create incoming message level status \[transaction-type: MessageLevelStatus]

> The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/incoming":{"post":{"tags":["MessageLevelStatus APIs"],"summary":"Create incoming message level status [transaction-type: MessageLevelStatus]","description":"The request can be either JSON or XML. Each individual message must be POST'ed as an object, JSON Array is not suported!","operationId":"messagelevelstatus-apis/post-messagelevelstatus-incoming","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read incoming message level status \[transaction-type: MessageLevelStatus]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/incoming/readmessagelevelstatus":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Read incoming message level status [transaction-type: MessageLevelStatus]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"messagelevelstatus-apis/get-messagelevelstatus-incoming-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing message level status \[transaction-type: MessageLevelStatus]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/outgoing":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Get outgoing message level status [transaction-type: MessageLevelStatus]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelstatus-apis/get-messagelevelstatus-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create message level status \[transaction-type: MessageLevelStatus]

> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.\
> \
> To get new messages only, use the  \`"Read"\` endpoint instead!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"overwrite":{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"For POST requests, chose to overwrite upon a `409 Conflict` response to reprocess the message with the same document ID and receiver (i.e. send the same message again)"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"contentType":{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"200-post":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionPostResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionPostResponseXML"}}}}},"schemas":{"transactionPostResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}}}},"xml":{"name":"success"}},"transactionPostResponseXML":{"type":"object","properties":{"message":{"type":"string"},"{transaction-type}_id":{"type":"string"},"integrationId":{"type":"string"}},"xml":{"name":"success"}},"ApplicationResponseJSON":{"type":"object","properties":{"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}}},"ApplicationResponse":{"type":"object","description":"","properties":{},"required":[""]}},"requestBodies":{"transactionPostApplicationResponse":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseJSON"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/outgoing":{"post":{"tags":["MessageLevelStatus APIs"],"summary":"Create message level status [transaction-type: MessageLevelStatus]","description":"The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.\n\nTo get new messages only, use the  `\"Read\"` endpoint instead!","operationId":"messagelevelstatus-apis/post-messagelevelstatus-outgoing","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/overwrite"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/contentType"}],"responses":{"200":{"$ref":"#/components/responses/200-post"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}},"requestBody":{"$ref":"#/components/requestBodies/transactionPostApplicationResponse"}}}}}
```

## Read message level statuss \[transaction-type: MessageLevelStatus]

> Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as \`read\`\
> \
> The response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no "array" function for XML).\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available messages.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"},"Accept":{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"},"description":"Either \"application/json\" (default) or \"application/xml\""}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transactionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/transactionResponseXML"}}},"headers":{"integrationid":{"schema":{"type":"string"},"description":"Only included as header in XML!"}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}}},"schemas":{"transactionResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"{transaction-type}":{"type":"object"},"integrationId":{"type":"string"}}}}},"xml":{"name":"{transaction-type}"}},"transactionResponseXML":{"type":"object","properties":{"message-data-elements":{"type":"object"}},"xml":{"name":"{transaction-type}"}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/outgoing/readmessagelevelstatus":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Read message level statuss [transaction-type: MessageLevelStatus]","description":"Through this endpoint you will get any unread (=previously fetched) message(s). After you have fetched through this request the message will be automatically marked as `read`\n\nThe response, in JSON, will always include the three latest messages, per default. Using XML you always only get one (as there's no \"array\" function for XML).\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available messages.","operationId":"messagelevelstatus-apis/get-messagelevelstatus-outgoing-read","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/Accept"}],"responses":{"200":{"$ref":"#/components/responses/200"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get incoming message level status statuses \[transaction-type: MessageLevelStatus]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/incoming/status":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Get incoming message level status statuses [transaction-type: MessageLevelStatus]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"messagelevelstatus-apis/get-messagelevelstatus-incoming-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get outgoing message level status statuses \[transaction-type: MessageLevelStatus]

> Returns lightweight delivery/processing status metadata for the matching messages — the message \`uuid\`, the incoming \`readAt\` timestamp and a \`metadata\` object whose \`status\` reflects the latest message-log status — WITHOUT the heavy document payload.\
> \
> Uses the same query-string filters as the resource's GET on \`/incoming\` and \`/outgoing\`. By default only unread messages are returned; set \`includeRead=true\` to also include previously read messages.\
> \
> The response is always JSON (an array of status objects); there is no XML representation for this endpoint.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Transaction API","version":"1.0.0"},"tags":[{"name":"MessageLevelStatus APIs","description":"Operations related to MessageLevelStatus"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many messages to return in Array (XML is always one!)","default":3},"description":"How many messages to return in Array (XML is always one!)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"},"includeRead":{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean","description":"If you are using the \"read\" enpoints, make it include previously read messages","default":false},"description":"If you are using the \"read\" enpoints, make it include previously read messages"},"integrationId":{"name":"integrationId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"Qvalia unique identifier for the transaction/message"},"documentId":{"name":"documentId","in":"query","required":false,"schema":{"type":"string","description":"","default":""},"description":"The document identifier of teh message, e.g. Invoice number"},"from":{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created from YYYY-MM-DD, e.g. 2024-01-01"},"to":{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date created to YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtFrom":{"name":"updatedAtFrom","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated from YYYY-MM-DD, e.g. 2024-01-01"},"updatedAtTo":{"name":"updatedAtTo","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD, e.g. 2024-01-01","default":""},"description":"Date updated to YYYY-MM-DD, e.g. 2024-01-01"},"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","description":"","default":""},"description":"API key"}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":""},"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"description":{"type":"string","description":""},"details":{"type":"object","description":"","properties":{},"required":[""]}},"required":[""]}}}}}},"statusResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"readAt":{"type":"string","format":"date-time","nullable":true,"description":"When the (incoming) message was marked as read, or `null` if unread/not applicable"},"metadata":{"type":"object","description":"Status metadata for the message. The `status` property reflects the latest message-log status.","properties":{"status":{"type":"string"}}}}}}}}}}},"paths":{"/transaction/{accountRegNo}/messagelevelstatus/outgoing/status":{"get":{"tags":["MessageLevelStatus APIs"],"summary":"Get outgoing message level status statuses [transaction-type: MessageLevelStatus]","description":"Returns lightweight delivery/processing status metadata for the matching messages — the message `uuid`, the incoming `readAt` timestamp and a `metadata` object whose `status` reflects the latest message-log status — WITHOUT the heavy document payload.\n\nUses the same query-string filters as the resource's GET on `/incoming` and `/outgoing`. By default only unread messages are returned; set `includeRead=true` to also include previously read messages.\n\nThe response is always JSON (an array of status objects); there is no XML representation for this endpoint.","operationId":"messagelevelstatus-apis/get-messagelevelstatus-outgoing-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/includeRead"},{"$ref":"#/components/parameters/integrationId"},{"$ref":"#/components/parameters/documentId"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/updatedAtFrom"},{"$ref":"#/components/parameters/updatedAtTo"},{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"$ref":"#/components/responses/statusResponse"},"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


# Enrichment API

Qvalia Enrichment API

Qvalia Enrichment endpoints handles enrichment functions within Qvalia.

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

We use API keys or JWT 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.

{% hint style="success" %} <mark style="color:$success;">See</mark> [Ways to authenticate](/api-documentation/apis/ways-to-authenticate)<mark style="color:$success;">for detailed information!</mark>
{% endhint %}

Each request made to the API will contain your `account 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 /enrichment/{account registration number}/invoice`


# Enrichment API

Operations related to Qvalia Enrichments

## Upload an Invoice PDF

> API accepts a single invoice file (PDF or XML) and processes it\
> asynchronously. Returns a polling ID to check the status of enrichment.\
> Send the pollingId to the enrchment GET endpoint to get the status or\
> completed result.\
> \
> The Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Enrichment API","version":"1.1.0"},"tags":[{"name":"Enrichment API","description":"Operations related to Qvalia Enrichments"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"}}},"paths":{"/enrichment/{accountRegNo}/invoice":{"post":{"tags":["Enrichment API"],"summary":"Upload an Invoice PDF","description":"API accepts a single invoice file (PDF or XML) and processes it\nasynchronously. Returns a polling ID to check the status of enrichment.\nSend the pollingId to the enrchment GET endpoint to get the status or\ncompleted result.\n\nThe Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.","operationId":"enrichment-api/post-invoice","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"202":{"description":"File accepted for processing.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of the request (e.g., success)."},"data":{"type":"object","description":"Confirmation message.","properties":{"pollingId":{"type":"string","description":"Polling ID for polling."}},"required":[""]}}}}},"headers":{"Location":{"schema":{"type":"string","description":"Resource URL to poll the status.","default":""},"description":"URL to poll the status."}}},"400":{"description":"Invalid file or request.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","description":"Optional name of the file being uploaded, including\nextension (e.g., invoice.pdf)."},"fileContent":{"type":"string","description":"The Base64 encoded content of the file.","format":"byte"},"enrichmentTypes":{"type":"string","description":"types of enrichment tasks to perform. Ex; \"capture\""},"parameters":{"type":"object","description":"Optional parameters for enrichment processing","properties":{}}},"required":["fileContent","enrichmentTypes"]}}}}}}}}
```

## Send a products list to categorise

> API accepts a list of products and processes it\
> asynchronously. Returns a polling ID to check the status of enrichment.\
> Send the pollingId to the enrchment GET endpoint to get the status or\
> completed result.\
> \
> The Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Enrichment API","version":"1.1.0"},"tags":[{"name":"Enrichment API","description":"Operations related to Qvalia Enrichments"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"}}},"paths":{"/enrichment/{accountRegNo}/categorisation":{"post":{"tags":["Enrichment API"],"summary":"Send a products list to categorise","description":"API accepts a list of products and processes it\nasynchronously. Returns a polling ID to check the status of enrichment.\nSend the pollingId to the enrchment GET endpoint to get the status or\ncompleted result.\n\nThe Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.","operationId":"enrichment-api/post-products","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"202":{"description":"File accepted for processing.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of the request (e.g., success)."},"data":{"type":"object","description":"Confirmation message.","properties":{"pollingId":{"type":"string","description":"Polling ID for polling."}},"required":[""]}}}}},"headers":{"Location":{"schema":{"type":"string","description":"Resource URL to poll the status.","default":""},"description":"URL to poll the status."}}},"400":{"description":"Invalid file or request.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"object","description":"Products list that needs to be categorised. id and product_name are required fields.","format":"byte"},"enrichmentTypes":{"type":"string","description":"types of enrichment tasks to perform. Ex; \"unspsc\""}},"required":["products","enrichmentTypes"]}}}}}}}}
```

## Poll for and get enrichment

> This endpoint allows clients to check the status of an\
> enrichment process using a polling ID. Since enrichment is an\
> asynchronous operation, this endpoint should be used to monitor progress\
> and retrieve results once processing is complete.\
> \
> \*\*Response Content\*\*: The response data will contain results for the specific\
> enrichment types that were requested in the original POST request. For example:\
> \- If "capture" was requested, the response will include a \`capture\` object\
> \- If "categorisation" was requested, the response will include a \`categorisation\` object\
> \- If both were requested, both objects will be present in the response\
> \
> \*\*Polling Behavior\*\*\
> \
> \*   If the enrichment process is still ongoing, the API will return HTTP\
> 202 (Accepted), indicating that the request was received and is still\
> being processed.\
> \
> \*   Once the enrichment is complete, the API will return HTTP 200 (OK)\
> along with the final result.\
> \
> \*   Clients must limit polling requests to once every 30 seconds.\
> Requests made at a higher frequency may be rate-limited or rejected

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Enrichment API","version":"1.1.0"},"tags":[{"name":"Enrichment API","description":"Operations related to Qvalia Enrichments"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"pollingId":{"name":"pollingId","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"The unique polling ID for the file"}}},"paths":{"/enrichment/{accountRegNo}/{pollingId}":{"get":{"tags":["Enrichment API"],"summary":"Poll for and get enrichment","description":"This endpoint allows clients to check the status of an\nenrichment process using a polling ID. Since enrichment is an\nasynchronous operation, this endpoint should be used to monitor progress\nand retrieve results once processing is complete.\n\n**Response Content**: The response data will contain results for the specific\nenrichment types that were requested in the original POST request. For example:\n- If \"capture\" was requested, the response will include a `capture` object\n- If \"categorisation\" was requested, the response will include a `categorisation` object\n- If both were requested, both objects will be present in the response\n\n**Polling Behavior**\n\n*   If the enrichment process is still ongoing, the API will return HTTP\n202 (Accepted), indicating that the request was received and is still\nbeing processed.\n\n*   Once the enrichment is complete, the API will return HTTP 200 (OK)\nalong with the final result.\n\n*   Clients must limit polling requests to once every 30 seconds.\nRequests made at a higher frequency may be rate-limited or rejected","operationId":"enrichment-api/get-enrichment-pollingid","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/pollingId"}],"responses":{"200":{"description":"Enrichment complete, result available.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of the request (e.g., success)."},"data":{"type":"object","description":"Contains enrichment results based on the requested enrichmentTypes. May include one or more of: capture, categorisation.","properties":{"capture":{"type":"object","description":"Result of PDF capture (present when \"capture\" is requested in enrichmentTypes)","properties":{"result":{"type":"object","description":"Captured invoice data","properties":{"Invoice":{"type":"object","description":"Extracted invoice information","properties":{}}},"required":["Invoice"]},"errors":{"type":"array","description":"Errors will include extraction errors. If the\nprocess failed to correctly extract certain main\nattribute, an array of error messages indicating\nreason for the error is returned. Client is\nencouraged to look at error messages based on\ntheir usecases.","items":{"type":"string"}},"warnings":{"type":"array","description":"Warning will include non critical errors during\nthe extraction.","items":{"type":"string"}}},"required":["result"]},"categorisation":{"type":"object","description":"Result of product categorisation (present when \"categorisation\" is requested in enrichmentTypes)","properties":{"result":{"type":"object","description":"Categorised products data","properties":{},"required":[""]},"errors":{"type":"array","description":"Errors if available that occured during enrichment\nprocess.","items":{"type":"string"}}},"required":["result"]}}}}}}}},"202":{"description":"The enrichment process is still in progress. The client should retry after 30 seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of the processing (e.g., processing, error)."}}}}}},"400":{"description":"Invalid or expired polling ID.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"error","description":"Status of the processing (e.g., processing, error)."}}}}}},"404":{"description":"Invalid or expired polling ID.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"error","description":"Status of the processing (e.g., processing, error)."}}}}}},"429":{"description":"The client has exceeded the polling frequency limit. The request is\nrejected, and the client should wait before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}}}}}}}
```

## Get individual enrichment result

> Get the enrichment result using the polling ID. Returns the result in\
> the format requested.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Enrichment API","version":"1.1.0"},"tags":[{"name":"Enrichment API","description":"Operations related to Qvalia Enrichments"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\nObtain a token via POST /token/{accountRegNo} (see Account API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"Account registration number issued by Qvalia"},"pollingId":{"name":"pollingId","in":"path","required":true,"schema":{"type":"string","description":"","default":""},"description":"The unique polling ID for the file"}}},"paths":{"/enrichment/{accountRegNo}/{pollingId}/{enrichmentType}":{"get":{"tags":["Enrichment API"],"summary":"Get individual enrichment result","description":"Get the enrichment result using the polling ID. Returns the result in\nthe format requested.","operationId":"enrichment-api/get-enrichment-type-pollingid","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/pollingId"},{"name":"enrichmentType","in":"path","required":true,"schema":{"type":"string","description":"The enrichment type sent on posting of the document","default":"capture","enum":["capture","posting","classification","co2"]},"description":"The enrichment type sent on posting of the document"}],"responses":{"200":{"description":"Enrichment complete, result available.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of the request (e.g., success)."},"data":{"type":"object","description":"","properties":{"result":{"type":"object","description":"Container for the enrichment result","properties":{},"required":[""]},"errors":{"type":"array","description":"Errors if available that occured during enrichment\nprocess.","items":{}},"warnings":{"type":"array","description":"Warnings if available that occured during enrichment\nprocess.","items":{}}},"required":[""]}}}}}},"202":{"description":"The enrichment process is still in progress. The client should retry after 30 seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""}}}}}},"400":{"description":"Invalid or expired polling ID.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"error","description":"Status of the processing (e.g., processing, error)."}}}}}},"404":{"description":"Invalid or expired polling ID.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"error","description":"Status of the processing (e.g., processing, error)."}}}}}},"429":{"description":"The client has exceeded the polling frequency limit. The request is\nrejected, and the client should wait before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":""},"message":{"type":"string","description":""}}}}}}}}}}}
```


# Partner API

Qvalia Partner API

Qvalia Partner API handles any partner specific functionality.

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

We use API keys or JWT 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.

{% hint style="success" %} <mark style="color:$success;">See</mark> [Ways to authenticate](/api-documentation/apis/ways-to-authenticate)<mark style="color:$success;">for detailed information!</mark>
{% endhint %}

Each request made to the API will contain your `partner registration number` and/or the `account registration number` of your customer. Your partner 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 /partner/{partner registration number}/transaction/{account registration number}`


# Webhooks

Qvalia delivers platform events to your server through HTTPS POST requests.

Partners can configure webhooks for their own accounts. They can also configure child accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...` which scopes the subscription to a single account.

A partner can thus have a single webhook subscription on their Partner account, or multiple per child accounts.

The first `PUT` creates it and returns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update the same subscription (its `url` and/or `types`). Use the returned `id` with the `/partner/{partnerRegNo}/webhook/{webhookId}/auth` endpoints to attach outbound authentication.

#### Event types

* `new_document` — sent when a new inbound document is received or created for an account.
* `document_delivery` — sent when an outbound document's delivery status changes.
* `document_error` — sent when a document's delivery fails, or an error occurs during processing.

#### Scope

This subscription receives events for every account your partner account can receive. Use `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure` to scope the subscription to a single account.

#### Delivery (webhook usage)

Events are delivered as HTTP `POST` requests with JSON bodies to the configured `url`.

{% hint style="info" %}
[The URL must use `https`](#user-content-fn-1)[^1]`!`

Your endpoint should respond with a `2xx` status code.

Delivery requests time out after 10 seconds.
{% endhint %}

Delivery is **at-least-once**: on an internal retry (or if the same document is published by more than one upstream producer) you may occasionally receive the same event more than once. Design your endpoint to be idempotent. Deliveries for the same underlying event are identical except for `status.updatedAt`, so dedupe on the combination of `eventType` + `globalTransactionId` + `status.status`.

If configured, outbound authentication is applied as request headers or `token` body on every delivery. See `/partner/{partnerRegNo}/webhook/{webhookId}/auth`.

Each delivery is a single flat JSON object — the top-level event fields (`eventType`, `accountRegNo`, `documentType`, `direction`, `integrationId`, `occurredAt`) plus document-specific detail (`documentId`, `globalTransactionId`, `status`, `error`, `peppol_metadata`) on the same level.

`status.event` reflects the internal event that triggered the webhook and is always one of `message-log/create` / `message-log/update` / `message-log/error` — a 1:1 mapping onto the top-level `eventType`. `status.status`, by contrast, is a free-text delivery status reported by the upstream delivery channel (Peppol, email, print, …) and is **not** a fixed enum and may change.

#### Delivered payload

Each delivery is a JSON object. Samples provided below:

`new_document`:

{% code overflow="wrap" %}

```json

{
  "eventType": "new_document",
  "accountRegNo": "SE5560004755",
  "documentType": "Invoice",
  "direction": "outgoing",
  "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "occurredAt": "2026-08-19T09:25:36.512Z",
  "documentId": "123456-INV",
  "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "status": {
    "event": "message-log/create",
    "deliveryMethod": "peppol",
    "updatedAt": "2026-08-19T09:25:37.228Z"
  },
  "peppol_metadata": {
    "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094",
    "accessPoint": "PSE000094",
    "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",
    "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",
    "exchangeDateTime": "2026-08-19T09:25:34.226Z"
  }
}

```

{% endcode %}

`document_delivery` — a status transition on a document already announced via `new_document`; `documentId` is often absent at this stage:

{% code overflow="wrap" %}

```json
{
  "eventType": "document_delivery",
  "accountRegNo": "SE5560004755",
  "documentType": "Invoice",
  "direction": "outgoing",
  "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "occurredAt": "2026-08-19T09:26:10.104Z",
  "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "status": {
    "status": "processed",
    "event": "message-log/update",
    "deliveryMethod": "peppol",
    "updatedAt": "2026-08-19T09:26:09.881Z"
  },
  "peppol_metadata": {
    "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094",
    "accessPoint": "PSE000094",
    "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",
    "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",
    "exchangeDateTime": "2026-08-19T09:25:34.226Z"
  }
}

```

{% endcode %}

***

{% hint style="warning" %}
**ERROR** **events may be recoverable!**

Depending on your account configuration, Peppol or another document retry mechanism may deliver the document after an error event.

An error event is triggered on the first error occurrence. In a delivery retry scheme, the document may be delivered later. You then receive a `document_delivery` event for the same transaction.

**Do not retry a delivery error until the retry period is exhausted (24 hours by default).**
{% endhint %}

`document_error` — delivery failed; `error` carries a human-readable reason:

{% code overflow="wrap" %}

```json
{
  "eventType": "document_error",
  "accountRegNo": "SE5560004755",
  "documentType": "Invoice",
  "direction": "outgoing",
  "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "occurredAt": "2026-08-19T09:26:10.104Z",
  "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",
  "status": {
    "status": "error",
    "event": "message-log/error",
    "deliveryMethod": "peppol",
    "updatedAt": "2026-08-19T09:26:09.881Z"
  },
  "error": "Peppol validation failed: invoice does not conform to UBL 2.1",
  "peppol_metadata": null
}
```

{% endcode %}

[^1]:


# Partner API

Operations related to Qvalia Partners

## Get Accounts

> An API to fetch (GET) Qvalia accounts under your Partner account.\
> \
> With JSON, use the \`limit\` parameter to change the number of returned messages and combine it with \`offset\` to traverse through your available records.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"number","description":"How many records to return in Array (default is 25)","default":25},"description":"How many records to return in Array (default is 25)"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"number","description":"Where to start index for using limit/offset listing","default":0},"description":"Where to start index for using limit/offset listing"}},"schemas":{"appFeatures":{"type":"object","properties":{"whiteLabel":{"type":"object","properties":{"active":{"type":"boolean"},"wl_partners":{"type":"array","items":{"type":"string"}}}},"invoiceManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"orderManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"catalogueManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"analytics":{"type":"object","properties":{"active":{"type":"boolean"}}},"prePosting":{"type":"object","properties":{"active":{"type":"boolean"}}},"capture":{"type":"object","properties":{"active":{"type":"boolean"}}},"unspscClassification":{"type":"object","properties":{"active":{"type":"boolean"}}},"clarityAI":{"type":"object","properties":{"active":{"type":"boolean"}}},"co2Emission":{"type":"object","properties":{"active":{"type":"boolean"}}},"workflow":{"type":"object","properties":{"active":{"type":"boolean"}}},"apiIntegration":{"type":"object","description":"**API integration must be added to all child accounts for you, as a partner, to be able to access the childs account through the API.**","properties":{"active":{"type":"boolean"}}},"sftpIntegration":{"type":"object","properties":{"active":{"type":"boolean"}}},"reconciliation":{"type":"object","properties":{"active":{"type":"boolean"}}}}}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account":{"get":{"tags":["Partner API"],"summary":"Get Accounts","description":"An API to fetch (GET) Qvalia accounts under your Partner account.\n\nWith JSON, use the `limit` parameter to change the number of returned messages and combine it with `offset` to traverse through your available records.","operationId":"partner/get-accounts","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"accountRegNo":{"type":"string"},"vatNumber":{"type":"string","description":"This is normally EU VAT number used for creating supplier invoices"},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"additionalAddress":{"type":"string"},"boxAddress":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"currency":{"type":"string"},"vat":{"type":"number","description":"This is the default VAT rate used for creating supplier invoices"},"website":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoiceEmail":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoicePhone":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"OurReference":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"appFeatures":{"$ref":"#/components/schemas/appFeatures"}}}},"total":{"type":"number"}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Post Account

> An API to add (POST) a Qvalia account under your Partner account.\
> \
> \### Important! You must add \`appFeatures\` and \`apiIntegration\` for the child account to be able to use the API for the child account!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}},"schemas":{"appFeatures":{"type":"object","properties":{"whiteLabel":{"type":"object","properties":{"active":{"type":"boolean"},"wl_partners":{"type":"array","items":{"type":"string"}}}},"invoiceManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"orderManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"catalogueManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"analytics":{"type":"object","properties":{"active":{"type":"boolean"}}},"prePosting":{"type":"object","properties":{"active":{"type":"boolean"}}},"capture":{"type":"object","properties":{"active":{"type":"boolean"}}},"unspscClassification":{"type":"object","properties":{"active":{"type":"boolean"}}},"clarityAI":{"type":"object","properties":{"active":{"type":"boolean"}}},"co2Emission":{"type":"object","properties":{"active":{"type":"boolean"}}},"workflow":{"type":"object","properties":{"active":{"type":"boolean"}}},"apiIntegration":{"type":"object","description":"**API integration must be added to all child accounts for you, as a partner, to be able to access the childs account through the API.**","properties":{"active":{"type":"boolean"}}},"sftpIntegration":{"type":"object","properties":{"active":{"type":"boolean"}}},"reconciliation":{"type":"object","properties":{"active":{"type":"boolean"}}}}}}},"paths":{"/partner/{partnerRegNo}/account":{"post":{"tags":["Partner API"],"summary":"Post Account","description":"An API to add (POST) a Qvalia account under your Partner account.\n\n### Important! You must add `appFeatures` and `apiIntegration` for the child account to be able to use the API for the child account!","operationId":"partner/post-account","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountRegNo":{"type":"string"},"vatNumber":{"type":"string","description":"This is normally EU VAT number used for creating supplier invoices"},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"additionalAddress":{"type":"string"},"boxAddress":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string"},"currency":{"type":"string"},"vat":{"type":"number","description":"This is the default VAT rate used for creating supplier invoices"},"website":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoiceEmail":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoicePhone":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"OurReference":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"appFeatures":{"$ref":"#/components/schemas/appFeatures"}},"required":["accountRegNo","name","address","postalCode","country"]}}}}}}}}
```

## Get Account

> An API to fetch (GET) a Qvalia account under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"schemas":{"appFeatures":{"type":"object","properties":{"whiteLabel":{"type":"object","properties":{"active":{"type":"boolean"},"wl_partners":{"type":"array","items":{"type":"string"}}}},"invoiceManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"orderManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"catalogueManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"analytics":{"type":"object","properties":{"active":{"type":"boolean"}}},"prePosting":{"type":"object","properties":{"active":{"type":"boolean"}}},"capture":{"type":"object","properties":{"active":{"type":"boolean"}}},"unspscClassification":{"type":"object","properties":{"active":{"type":"boolean"}}},"clarityAI":{"type":"object","properties":{"active":{"type":"boolean"}}},"co2Emission":{"type":"object","properties":{"active":{"type":"boolean"}}},"workflow":{"type":"object","properties":{"active":{"type":"boolean"}}},"apiIntegration":{"type":"object","description":"**API integration must be added to all child accounts for you, as a partner, to be able to access the childs account through the API.**","properties":{"active":{"type":"boolean"}}},"sftpIntegration":{"type":"object","properties":{"active":{"type":"boolean"}}},"reconciliation":{"type":"object","properties":{"active":{"type":"boolean"}}}}}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}":{"get":{"tags":["Partner API"],"summary":"Get Account","description":"An API to fetch (GET) a Qvalia account under your Partner account.","operationId":"partner/get-account","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"vatNumber":{"type":"string","description":"This is normally EU VAT number used for creating supplier invoices"},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"additionalAddress":{"type":"string"},"boxAddress":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"currency":{"type":"string"},"vat":{"type":"number","description":"This is the default VAT rate used for creating supplier invoices"},"website":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoiceEmail":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoicePhone":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"OurReference":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"appFeatures":{"$ref":"#/components/schemas/appFeatures"}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Put Account

> An API to change (PUT) a Qvalia account under your Partner account.\
> \
> \### Important! You must add \`appFeatures\` and \`apiIntegration\` for the child account to be able to use the API for the child account!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}},"schemas":{"appFeatures":{"type":"object","properties":{"whiteLabel":{"type":"object","properties":{"active":{"type":"boolean"},"wl_partners":{"type":"array","items":{"type":"string"}}}},"invoiceManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"orderManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"catalogueManagement":{"type":"object","properties":{"active":{"type":"boolean"}}},"analytics":{"type":"object","properties":{"active":{"type":"boolean"}}},"prePosting":{"type":"object","properties":{"active":{"type":"boolean"}}},"capture":{"type":"object","properties":{"active":{"type":"boolean"}}},"unspscClassification":{"type":"object","properties":{"active":{"type":"boolean"}}},"clarityAI":{"type":"object","properties":{"active":{"type":"boolean"}}},"co2Emission":{"type":"object","properties":{"active":{"type":"boolean"}}},"workflow":{"type":"object","properties":{"active":{"type":"boolean"}}},"apiIntegration":{"type":"object","description":"**API integration must be added to all child accounts for you, as a partner, to be able to access the childs account through the API.**","properties":{"active":{"type":"boolean"}}},"sftpIntegration":{"type":"object","properties":{"active":{"type":"boolean"}}},"reconciliation":{"type":"object","properties":{"active":{"type":"boolean"}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}":{"put":{"tags":["Partner API"],"summary":"Put Account","description":"An API to change (PUT) a Qvalia account under your Partner account.\n\n### Important! You must add `appFeatures` and `apiIntegration` for the child account to be able to use the API for the child account!","operationId":"partner/put-account","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vatNumber":{"type":"string","description":"This is normally EU VAT number used for creating supplier invoices"},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"additionalAddress":{"type":"string"},"boxAddress":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string"},"currency":{"type":"string"},"vat":{"type":"number","description":"This is the default VAT rate used for creating supplier invoices"},"website":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoiceEmail":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"invoicePhone":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"OurReference":{"type":"string","description":"This is used in page footer of PDF supplier invoices"},"appFeatures":{"$ref":"#/components/schemas/appFeatures"}}}}}}}}}}
```

## Get Users in Account

> An API to fetch (GET) Qvalia users in an account, under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/user":{"get":{"tags":["Partner API"],"summary":"Get Users in Account","description":"An API to fetch (GET) Qvalia users in an account, under your Partner account.","operationId":"partner/get-account-users","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"privilege":{"type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"phone":{"type":"string"},"language":{"type":"string"},"title":{"type":"string"},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}}}}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Post Account

> An API to add (POST) a User to a Qvalia account under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/user":{"post":{"tags":["Partner API"],"summary":"Post Account","description":"An API to add (POST) a User to a Qvalia account under your Partner account.","operationId":"partner/post-account-user","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"privilege":{"type":"string","pattern":"^(viewer|user|admin)$","enum":["viewer","user","admin"]},"phone":{"type":"string","nullable":true},"language":{"type":"string","pattern":"^[en|sv|fi]$","enum":["en","sv","fi"]},"title":{"type":"string","nullable":true}},"required":["email","name","language"]}}}}}}}}
```

## Get Users in Account

> An API to fetch (GET) a Qvalia user in an account, under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"userEmail":{"name":"userEmail","in":"path","required":true,"schema":{"type":"string"},"description":"User email for the account, e.g. \"user@qvalia.com\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/user/{userEmail}":{"get":{"tags":["Partner API"],"summary":"Get Users in Account","description":"An API to fetch (GET) a Qvalia user in an account, under your Partner account.","operationId":"partner/get-account-user","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/userEmail"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"user":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"privilege":{"type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"phone":{"type":"string"},"language":{"type":"string"},"title":{"type":"string"},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}}}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Put Account

> An API to update (PUT) a User to a Qvalia account under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"userEmail":{"name":"userEmail","in":"path","required":true,"schema":{"type":"string"},"description":"User email for the account, e.g. \"user@qvalia.com\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/user/{userEmail}":{"put":{"tags":["Partner API"],"summary":"Put Account","description":"An API to update (PUT) a User to a Qvalia account under your Partner account.","operationId":"partner/put-account-user","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/userEmail"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"privilege":{"type":"string","pattern":"^(viewer|user|admin)$","enum":["viewer","user","admin"]},"phone":{"type":"string","nullable":true},"language":{"type":"string"},"title":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true,"pattern":"^[A-Z]{2}$"}}}}}}}}}}
```

## Delete User

> An API to DELETE a User from a Qvalia account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"userEmail":{"name":"userEmail","in":"path","required":true,"schema":{"type":"string"},"description":"User email for the account, e.g. \"user@qvalia.com\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/user/{userEmail}":{"delete":{"tags":["Partner API"],"summary":"Delete User","description":"An API to DELETE a User from a Qvalia account\nunder your Partner account.","operationId":"partner/delete-account-user","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/userEmail"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Bankaccounts in Account

> An API to fetch (GET) bankaccounts in an account, under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/bankaccount":{"get":{"tags":["Partner API"],"summary":"Get Bankaccounts in Account","description":"An API to fetch (GET) bankaccounts in an account, under your Partner account.","operationId":"partner/get-account-bankaccounts","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"bankAccounts":{"type":"array","items":{"type":"object","properties":{"account_name":{"type":"string"},"type":{"type":"string"},"account_number":{"type":"string"},"is_default":{"type":"boolean"},"description":{"type":"string"},"bic":{"type":"string"},"bank_name":{"type":"string"},"bank_address":{"type":"string"},"bank_postal_code":{"type":"string"},"bank_city":{"type":"string"},"bank_country":{"type":"string"}}}}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Post Bankaccount

> An API to add (POST) a Bankaccount to a Qvalia account under your Partner account.\
> \
> The bank account for the partner account is used when/if a partner account generates/creates an invoice in Qvalia Apps. If your customer don't have access to Qvalia standard App, e.g. you are using a White Label solution, the bank account marked as \`is\_default\` will be used (and only one \`default\` account may exist!).\
> \
> For Swedish companies (country: \`SE\`) \`Plusgiro\` and \`Bankgiro\` are allowed as \`type\`, for any other country either \`IBAN\` or \`AccountNumber\`\
> should be used!\
> \
> The type \`AccountNumber\` shall be used for any unspecified, and local, bank accounts (i.e. that's not \`IBAN\`, \`Bankgiro\` or \`Plusgiro\`)\
> \
> The \`account\_number\` attribute is used for all account types, and for \`IBAN\` it must start with the country code, e.g. \`SE4550000000058398257466\`.\
> \
> \`bic\` (or S.W\.I.F.T. code) is optional if \`IBAN\` is given.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"type":{"type":"string","description":""},"data":{"type":"string","description":""},"metadata":{"type":"object","description":"","properties":{"debug_error_message":{"type":"string","description":""},"debug_error_code":{"type":"integer","description":""}},"required":[""]}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/bankaccount":{"post":{"tags":["Partner API"],"summary":"Post Bankaccount","description":"An API to add (POST) a Bankaccount to a Qvalia account under your Partner account.\n\nThe bank account for the partner account is used when/if a partner account generates/creates an invoice in Qvalia Apps. If your customer don't have access to Qvalia standard App, e.g. you are using a White Label solution, the bank account marked as `is_default` will be used (and only one `default` account may exist!).\n\nFor Swedish companies (country: `SE`) `Plusgiro` and `Bankgiro` are allowed as `type`, for any other country either `IBAN` or `AccountNumber`\nshould be used!\n\nThe type `AccountNumber` shall be used for any unspecified, and local, bank accounts (i.e. that's not `IBAN`, `Bankgiro` or `Plusgiro`)\n\nThe `account_number` attribute is used for all account types, and for `IBAN` it must start with the country code, e.g. `SE4550000000058398257466`.\n\n`bic` (or S.W.I.F.T. code) is optional if `IBAN` is given.","operationId":"partner/post-account-bankaccount","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","required":["account_name","type","account_number"],"properties":{"account_name":{"type":"string"},"type":{"type":"string","pattern":"[IBAN|Bankgiro|Plusgiro|AccountNumber]","enum":["IBAN","Bankgiro","Plusgiro","AccountNumber"]},"account_number":{"type":"string"},"is_default":{"type":"boolean"},"description":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$"},"bank_name":{"type":"string"},"bank_address":{"type":"string"},"bank_postal_code":{"type":"string"},"bank_city":{"type":"string"},"bank_country":{"type":"string"}}}}}}}}}}
```

## Get Bankaccounts in Account

> An API to fetch (GET) a Bankaccount in an account, under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"bankAccount":{"name":"bankAccount","in":"path","required":true,"schema":{"type":"string"},"description":"A bank account as created, e.g. \"SE4550000000058398257466\" or \"1234-567\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/bankaccount/{bankAccount}":{"get":{"tags":["Partner API"],"summary":"Get Bankaccounts in Account","description":"An API to fetch (GET) a Bankaccount in an account, under your Partner account.","operationId":"partner/get-account-bankaccount","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/bankAccount"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"bankAccount":{"type":"object","properties":{"account_name":{"type":"string"},"type":{"type":"string"},"account_number":{"type":"string"},"is_default":{"type":"boolean"},"description":{"type":"string"},"bic":{"type":"string"},"bank_name":{"type":"string"},"bank_address":{"type":"string"},"bank_postal_code":{"type":"string"},"bank_city":{"type":"string"},"bank_country":{"type":"string"}}}}}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Put Bankaccount

> An API to update (PUT) a Bankaccount to a Qvalia account under your Partner account.\
> \
> The bank account for the partner account is used when/if a partner account generates/creates an invoice in Qvalia Apps. If your customer don't have access to Qvalia standard App, e.g. you are using a White Label solution, the bank account marked as \`is\_default\` will be used (and only one \`default\` account may exist!).\
> \
> For Swedish companies (country: \`SE\`) \`Plusgiro\` and \`Bankgiro\` are allowed as \`type\`, for any other country either \`IBAN\` or \`AccountNumber\`\
> should be used!\
> \
> The type \`AccountNumber\` shall be used for any unspecified, and local, bank accounts (i.e. that's not \`IBAN\`, \`Bankgiro\` or \`Plusgiro\`)\
> \
> The \`account\_number\` attribute is used for all account types, and for \`IBAN\` it must start with the country code, e.g. \`SE4550000000058398257466\`.\
> \
> \`bic\` (or S.W\.I.F.T. code) is optional if \`IBAN\` is given.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"bankAccount":{"name":"bankAccount","in":"path","required":true,"schema":{"type":"string"},"description":"A bank account as created, e.g. \"SE4550000000058398257466\" or \"1234-567\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/bankaccount/{bankAccount}":{"put":{"tags":["Partner API"],"summary":"Put Bankaccount","description":"An API to update (PUT) a Bankaccount to a Qvalia account under your Partner account.\n\nThe bank account for the partner account is used when/if a partner account generates/creates an invoice in Qvalia Apps. If your customer don't have access to Qvalia standard App, e.g. you are using a White Label solution, the bank account marked as `is_default` will be used (and only one `default` account may exist!).\n\nFor Swedish companies (country: `SE`) `Plusgiro` and `Bankgiro` are allowed as `type`, for any other country either `IBAN` or `AccountNumber`\nshould be used!\n\nThe type `AccountNumber` shall be used for any unspecified, and local, bank accounts (i.e. that's not `IBAN`, `Bankgiro` or `Plusgiro`)\n\nThe `account_number` attribute is used for all account types, and for `IBAN` it must start with the country code, e.g. `SE4550000000058398257466`.\n\n`bic` (or S.W.I.F.T. code) is optional if `IBAN` is given.","operationId":"partner/put-account-bankaccount","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/bankAccount"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","required":["account_name","type","account_number"],"properties":{"account_name":{"type":"string"},"type":{"type":"string","pattern":"[IBAN|Bankgiro|Plusgiro|AccountNumber]","enum":["IBAN","Bankgiro","Plusgiro","AccountNumber"]},"is_default":{"type":"boolean"},"description":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$"},"bank_name":{"type":"string"},"bank_address":{"type":"string"},"bank_postal_code":{"type":"string"},"bank_city":{"type":"string"},"bank_country":{"type":"string"}}}}}}}}}}
```

## Delete Bankaccount

> An API to DELETE a Bankaccount from a Qvalia account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"bankAccount":{"name":"bankAccount","in":"path","required":true,"schema":{"type":"string"},"description":"A bank account as created, e.g. \"SE4550000000058398257466\" or \"1234-567\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/bankaccount/{bankAccount}":{"delete":{"tags":["Partner API"],"summary":"Delete Bankaccount","description":"An API to DELETE a Bankaccount from a Qvalia account\nunder your Partner account.","operationId":"partner/delete-account-bankaccount","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/bankAccount"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"success":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Peppol Identifier

> Find information about a Peppol identifier.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"peppolId":{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"},"description":"PeppolId for the endpoint, e.g. \"0007:9999999999\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/peppol/lookup/{peppolId}":{"get":{"tags":["Partner API"],"summary":"Get Peppol Identifier","description":"Find information about a Peppol identifier.","operationId":"partner/get-peppol-identifier","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/peppolId"},{"name":"docTypeRoot","in":"query","schema":{"type":"string"},"description":"Message Type, e.g. Invoice, OrderResponse, MLR"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"participantID":{"type":"object","properties":{"scheme":{"type":"string"},"value":{"type":"string"}}},"docTypes":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"value":{"type":"string"}}}}}}},"exists":{"type":"boolean"},"rootDocTypeExists":{"type":"boolean"},"source":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Account Peppol Identifiers

> An API to GET Peppol identifiers to a Qvalia account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/peppol":{"get":{"tags":["Partner API"],"summary":"Get Account Peppol Identifiers","description":"An API to GET Peppol identifiers to a Qvalia account\nunder your Partner account.","operationId":"partner/get-account-peppol-identifiers","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"peppolId":{"type":"string"},"regNo":{"type":"string"},"description":{"type":"string"},"businessCard":{"type":"object","properties":{"companyName":{"type":"string"},"countryCode":{"type":"string"},"geographicalInformation":{"type":"string"},"VAT":{"type":"string"},"orgNr":{"type":"string"},"suffix":{"type":"string"}}},"msgTypes":{"type":"array","items":{"type":"string"}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Account Peppol Identifier

> An API to GET a Peppol identifier to a Qvalia account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"peppolId":{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"},"description":"PeppolId for the endpoint, e.g. \"0007:9999999999\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/peppol/{peppolId}":{"get":{"tags":["Partner API"],"summary":"Get Account Peppol Identifier","description":"An API to GET a Peppol identifier to a Qvalia account\nunder your Partner account.","operationId":"partner/get-account-peppol-identifier","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/peppolId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"peppolId":{"type":"string"},"regNo":{"type":"string"},"description":{"type":"string"},"businessCard":{"type":"object","properties":{"companyName":{"type":"string"},"countryCode":{"type":"string"},"geographicalInformation":{"type":"string"},"VAT":{"type":"string"},"orgNr":{"type":"string"},"suffix":{"type":"string"}}},"msgTypes":{"type":"array","items":{"type":"string"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Put Account Peppol Identifier

> An API to add or update (PUT) a Peppol identifier to a Qvalia account\
> under your Partner account.\
> \
> If you utilize a Peppol group (receiving) for Peppol identifiers and not\
> having separate Qvalia accounts for each of your customers then\
> \`{accountRegNo}\` is your \`{partnerRegNo}\`\
> \
> \### Peppol Document Types\
> \
> You can find the list of allowed Peppol document types by navigating to\
> \[<https://docs.peppol.eu/edelivery/codelists/]\\(https://docs.peppol.eu/edelivery/codelists/)\\>
> \
> They are updating the lists regularly but under that URL you'll always\
> find the current active version. Under “Artifact” find the \`Document\
> Types vX.X\` and click the “as HTML” to get a view of the list.\
> \
> Under \`Associated Process/Profile Identifier(s)\` (on the far right in\
> the table) you'll find the \`docTypes.profile\` value and under \`Peppol\
> Document Type Identifier Value\` you'll get the value for\
> \`docTypes.document\`.\
> \
> If you register for \*\*Invoice\*\*, you should also register for\
> \*\*CreditNote\*\*!\
> \
> \### Add and update through a PUT\
> \
> We've opted for a PUT operation for the creation (add) and update of\
> Peppol identifiers as it is rather messy trying to update in a JSON\
> structure. This means that you have to send the full object at any\
> change (and obviously at create).\
> \
> We'd recommend to write your code to first do a \`GET\` to find the\
> current settings for the identifier, and then update the values you want\
> to update and send the changed object in a \`PUT\` request.\
> \
> The businessCard information is what is being added to the Peppol\
> Directory and shown there, e.g.:\
> \[<https://directory.peppol.eu/public/locale-en> US/menuitem-search?q=qvalia\&action=view\&participant=iso6523-actorid-upis%3A%3A0007%3A5567321707]\(<https://directory.peppol.eu/public/locale-en\\_US/menuitem-search?q=qvalia\\&action=view\\&participant=iso6523-actorid-upis%3A%3A0007%3A5567321707>)

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"peppolId":{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"},"description":"PeppolId for the endpoint, e.g. \"0007:9999999999\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/peppol/{peppolId}":{"put":{"tags":["Partner API"],"summary":"Put Account Peppol Identifier","description":"An API to add or update (PUT) a Peppol identifier to a Qvalia account\nunder your Partner account.\n\nIf you utilize a Peppol group (receiving) for Peppol identifiers and not\nhaving separate Qvalia accounts for each of your customers then\n`{accountRegNo}` is your `{partnerRegNo}`\n\n### Peppol Document Types\n\nYou can find the list of allowed Peppol document types by navigating to\n[https://docs.peppol.eu/edelivery/codelists/](https://docs.peppol.eu/edelivery/codelists/)\n\nThey are updating the lists regularly but under that URL you'll always\nfind the current active version. Under “Artifact” find the `Document\nTypes vX.X` and click the “as HTML” to get a view of the list.\n\nUnder `Associated Process/Profile Identifier(s)` (on the far right in\nthe table) you'll find the `docTypes.profile` value and under `Peppol\nDocument Type Identifier Value` you'll get the value for\n`docTypes.document`.\n\nIf you register for **Invoice**, you should also register for\n**CreditNote**!\n\n### Add and update through a PUT\n\nWe've opted for a PUT operation for the creation (add) and update of\nPeppol identifiers as it is rather messy trying to update in a JSON\nstructure. This means that you have to send the full object at any\nchange (and obviously at create).\n\nWe'd recommend to write your code to first do a `GET` to find the\ncurrent settings for the identifier, and then update the values you want\nto update and send the changed object in a `PUT` request.\n\nThe businessCard information is what is being added to the Peppol\nDirectory and shown there, e.g.:\n[https://directory.peppol.eu/public/locale-en US/menuitem-search?q=qvalia&action=view&participant=iso6523-actorid-upis%3A%3A0007%3A5567321707](https://directory.peppol.eu/public/locale-en_US/menuitem-search?q=qvalia&action=view&participant=iso6523-actorid-upis%3A%3A0007%3A5567321707)","operationId":"partner/put-account-peppol-identifier","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/peppolId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["updated","registered"]},"peppolId":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string"},"businessCard":{"type":"object","properties":{"companyName":{"type":"string"},"countryCode":{"type":"string"},"geographicalInformation":{"type":"string"},"VAT":{"type":"string"},"orgNr":{"type":"string"},"suffix":{"type":"string"}}},"docTypes":{"type":"array","items":{"type":"object","properties":{"profile":{"type":"string"},"document":{"type":"string"}}}}}}}}}}}}}
```

## Delete Account Peppol Identifier

> An API to DELETE a Peppol identifier to a Qvalia account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"peppolId":{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"},"description":"PeppolId for the endpoint, e.g. \"0007:9999999999\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/peppol/{peppolId}":{"delete":{"tags":["Partner API"],"summary":"Delete Account Peppol Identifier","description":"An API to DELETE a Peppol identifier to a Qvalia account\nunder your Partner account.","operationId":"partner/delete-account-peppol-identifier","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/peppolId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Post Partner accounts transactions

> \*\*NB! This documented endpoint has a pseudo path URI!\*\* (read below)\
> \
> An API to send (POST) your Partner accounts transactions.\
> \
> Using the prefix of \`/partner/{partnerRegNo}\` you, as a partner, can access your accounts transactions through Qvalia Transaction API.\
> \
> \`(message-type)\` and \`(direction)\` attributes in URI refers to Transaction API endpoints, e.g. \`invoices\` and \`incoming\`, which results in \`/partner/{partnerRegNo}/transaction/{accountRegNo}/invoices/incoming\`.\
> \
> \`(message-type)\` and \`(direction)\` are interchangable for all Transaction API endpoints, as well as for the \`read\` endpoints, by adding the \`read\` attribute to the URI.\
> \
> Refer to documentation for handling transactions at \[Qvalia Transaction API]\(<https://api.qvalia.io/api-documentation/apis/transaction-api>)

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Partner API","description":"Operations related to Qvalia Partners"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}}},"paths":{"/partner/{partnerRegNo}/transaction/{accountRegNo}/(message-type)/(direction)":{"post":{"tags":["Partner API"],"summary":"Post Partner accounts transactions","description":"**NB! This documented endpoint has a pseudo path URI!** (read below)\n\nAn API to send (POST) your Partner accounts transactions.\n\nUsing the prefix of `/partner/{partnerRegNo}` you, as a partner, can access your accounts transactions through Qvalia Transaction API.\n\n`(message-type)` and `(direction)` attributes in URI refers to Transaction API endpoints, e.g. `invoices` and `incoming`, which results in `/partner/{partnerRegNo}/transaction/{accountRegNo}/invoices/incoming`.\n\n`(message-type)` and `(direction)` are interchangable for all Transaction API endpoints, as well as for the `read` endpoints, by adding the `read` attribute to the URI.\n\nRefer to documentation for handling transactions at [Qvalia Transaction API](https://api.qvalia.io/api-documentation/apis/transaction-api)","operationId":"partner/post-partner-account-transaction","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"See [https://api.qvalia.io/api-documentation/apis/transaction-api](https://api.qvalia.io/api-documentation/apis/transaction-api)"}}}}}}
```


# Webhook API

Operations related to Web hooks

## Get Webhook Configuration

> An API to fetch (GET) the webhook subscription for your Partner account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"responses":{"WebhookConfigureFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"},"enabled":{"type":"boolean"},"authType":{"type":"string","nullable":true,"enum":["oauth","api_key","basic"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Configuration","description":"An API to fetch (GET) the webhook subscription for your Partner account.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.","operationId":"partner/get-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Configure Webhook

> An API to create or update (PUT) the webhook subscription for your Partner\
> account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> \
> A partner has a single webhook subscription. The first \`PUT\` creates it and\
> returns a generated webhook \`id\` (a UUID v4); subsequent \`PUT\` requests update\
> the same subscription (its \`url\` and/or \`types\`). Use the returned \`id\` with the\
> \`/partner/{partnerRegNo}/webhook/{webhookId}/auth\` endpoints to attach outbound\
> authentication.\
> \
> \### Event types\
> \
> \- \`new\_document\` — sent when a new document is received/created for an account.\
> \- \`document\_delivery\` — sent when a document's delivery status changes.\
> \- \`document\_error\` — sent when a document's delivery fails.\
> \
> \### Scope\
> \
> This subscription receives events for every account your Partner account is\
> allowed to receive. Use \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`\
> instead to scope the subscription to a single account.\
> \
> \### Delivery (webhook usage)\
> \
> Events are delivered as an HTTP \`POST\` with a JSON body to the configured \`url\`\
> (which must be \`https\`). Your endpoint should respond with a \`2xx\` status code;\
> the delivery request times out after 10 seconds. If outbound authentication is\
> configured (see \`/partner/{partnerRegNo}/webhook/{webhookId}/auth\`) it is applied\
> as request headers on every delivery. The delivered payload is described by the\
> \`webhookEvent\` callback below.\
> \
> Delivery is \*\*at-least-once\*\*: on an internal retry (or if the same document is\
> published by more than one upstream producer) you may occasionally receive the\
> same event more than once. Design your endpoint to be idempotent. Deliveries for\
> the same underlying event are identical except for \`status.updatedAt\`, so dedupe\
> on the combination of \`eventType\` + \`globalTransactionId\` + \`status.status\`.\
> \
> \### Delivered payload\
> \
> Each delivery is a single flat JSON object — the top-level event fields\
> (\`eventType\`, \`accountRegNo\`, \`documentType\`, \`direction\`, \`integrationId\`,\
> \`occurredAt\`) plus document-specific detail (\`documentId\`, \`globalTransactionId\`,\
> \`status\`, \`error\`, \`peppol\_metadata\`) on the same level;\
> &#x20; See the \`webhookEvent\` callback below for the full schema.\
> \
> \`status.event\` reflects the internal event that triggered the webhook and is\
> always one of \`message-log/create\` / \`message-log/update\` / \`message-log/error\`\
> — a 1:1 mapping onto the top-level \`eventType\`. \`status.status\`, by contrast, is\
> a free-text delivery status reported by the upstream delivery channel (Peppol,\
> email, print, …) and is \*\*not\*\* a fixed enum and may change.\
> \
> \`new\_document\`:\
> \
> \`\`\`json\
> {\
> &#x20; "eventType": "new\_document",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:25:36.512Z",\
> &#x20; "documentId": "123456-INV",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "event": "message-log/create",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:25:37.228Z"\
> &#x20; },\
> &#x20; "peppol\_metadata": {\
> &#x20;   "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f\@QVALIA-PSE000094",\
> &#x20;   "accessPoint": "PSE000094",\
> &#x20;   "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",\
> &#x20;   "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",\
> &#x20;   "exchangeDateTime": "2026-08-19T09:25:34.226Z"\
> &#x20; }\
> }\
> \`\`\`\
> \
> \`document\_delivery\` — a status transition on a document already announced via\
> \`new\_document\`; \`documentId\` is often absent at this stage:\
> \
> \`\`\`json\
> {\
> &#x20; "eventType": "document\_delivery",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:26:10.104Z",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "status": "processed",\
> &#x20;   "event": "message-log/update",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:26:09.881Z"\
> &#x20; },\
> &#x20; "peppol\_metadata": {\
> &#x20;   "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f\@QVALIA-PSE000094",\
> &#x20;   "accessPoint": "PSE000094",\
> &#x20;   "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",\
> &#x20;   "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",\
> &#x20;   "exchangeDateTime": "2026-08-19T09:25:34.226Z"\
> &#x20; }\
> }\
> \`\`\`\
> \
> \`document\_error\` — delivery failed; \`error\` carries a human-readable reason:\
> \
> \`\`\`json\
> {\
> &#x20; "eventType": "document\_error",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:26:10.104Z",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "status": "error",\
> &#x20;   "event": "message-log/error",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:26:09.881Z"\
> &#x20; },\
> &#x20; "error": "Peppol validation failed: invoice does not conform to UBL 2.1",\
> &#x20; "peppol\_metadata": null\
> }\
> \`\`\`

````json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"requestBodies":{"WebhookConfigure":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","types"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive webhook events"},"types":{"type":"array","minItems":1,"items":{"type":"string","enum":["new_document","document_delivery","document_error"]}}}}}}}},"responses":{"WebhookConfigureCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"}}}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}},"callbacks":{"webhookEvent":{"{$request.body#/url}":{"post":{"summary":"Webhook event delivered to your endpoint","description":"Qvalia POSTs this JSON payload to your configured `url` when a subscribed\nevent occurs. Your endpoint should respond with a `2xx` status code; the\nrequest times out after 10 seconds. Any configured outbound authentication\nis applied as request headers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"type":"string","enum":["new_document","document_delivery","document_error"]},"accountRegNo":{"type":"string"},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (e.g. Peppol,\nemail, print). This is a free-text value from that channel, not a fixed\nenum — common values include `received`, `processed`, `error`, `sent` and\n`failed`, but do not treat this list as exhaustive. May be absent."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.\nMaps 1:1 onto the top-level `eventType`:\n`message-log/create` → `new_document`,\n`message-log/update` → `document_delivery`,\n`message-log/error` → `document_error`.","enum":["message-log/create","message-log/update","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `email`, `postal`, `edi`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `dynamic_routing`. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail. `null` when `status.deliveryMethod` is not `peppol`.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"}}}}}}}},"responses":{"2XX":{"description":"Event acknowledged by your endpoint"},"4XX":{"description":"Event not acknowledged by your endpoint"}},"security":[{}]}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"put":{"tags":["Webhook API"],"summary":"Configure Webhook","description":"An API to create or update (PUT) the webhook subscription for your Partner\naccount.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\n\nA partner has a single webhook subscription. The first `PUT` creates it and\nreturns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update\nthe same subscription (its `url` and/or `types`). Use the returned `id` with the\n`/partner/{partnerRegNo}/webhook/{webhookId}/auth` endpoints to attach outbound\nauthentication.\n\n### Event types\n\n- `new_document` — sent when a new document is received/created for an account.\n- `document_delivery` — sent when a document's delivery status changes.\n- `document_error` — sent when a document's delivery fails.\n\n### Scope\n\nThis subscription receives events for every account your Partner account is\nallowed to receive. Use `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`\ninstead to scope the subscription to a single account.\n\n### Delivery (webhook usage)\n\nEvents are delivered as an HTTP `POST` with a JSON body to the configured `url`\n(which must be `https`). Your endpoint should respond with a `2xx` status code;\nthe delivery request times out after 10 seconds. If outbound authentication is\nconfigured (see `/partner/{partnerRegNo}/webhook/{webhookId}/auth`) it is applied\nas request headers on every delivery. The delivered payload is described by the\n`webhookEvent` callback below.\n\nDelivery is **at-least-once**: on an internal retry (or if the same document is\npublished by more than one upstream producer) you may occasionally receive the\nsame event more than once. Design your endpoint to be idempotent. Deliveries for\nthe same underlying event are identical except for `status.updatedAt`, so dedupe\non the combination of `eventType` + `globalTransactionId` + `status.status`.\n\n### Delivered payload\n\nEach delivery is a single flat JSON object — the top-level event fields\n(`eventType`, `accountRegNo`, `documentType`, `direction`, `integrationId`,\n`occurredAt`) plus document-specific detail (`documentId`, `globalTransactionId`,\n`status`, `error`, `peppol_metadata`) on the same level;\n  See the `webhookEvent` callback below for the full schema.\n\n`status.event` reflects the internal event that triggered the webhook and is\nalways one of `message-log/create` / `message-log/update` / `message-log/error`\n— a 1:1 mapping onto the top-level `eventType`. `status.status`, by contrast, is\na free-text delivery status reported by the upstream delivery channel (Peppol,\nemail, print, …) and is **not** a fixed enum and may change.\n\n`new_document`:\n\n```json\n{\n  \"eventType\": \"new_document\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:25:36.512Z\",\n  \"documentId\": \"123456-INV\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"event\": \"message-log/create\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:25:37.228Z\"\n  },\n  \"peppol_metadata\": {\n    \"messageId\": \"9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094\",\n    \"accessPoint\": \"PSE000094\",\n    \"docTypeId\": \"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1\",\n    \"processId\": \"urn:fdc:peppol.eu:2017:poacc:billing:01:1.0\",\n    \"exchangeDateTime\": \"2026-08-19T09:25:34.226Z\"\n  }\n}\n```\n\n`document_delivery` — a status transition on a document already announced via\n`new_document`; `documentId` is often absent at this stage:\n\n```json\n{\n  \"eventType\": \"document_delivery\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:26:10.104Z\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"status\": \"processed\",\n    \"event\": \"message-log/update\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:26:09.881Z\"\n  },\n  \"peppol_metadata\": {\n    \"messageId\": \"9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094\",\n    \"accessPoint\": \"PSE000094\",\n    \"docTypeId\": \"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1\",\n    \"processId\": \"urn:fdc:peppol.eu:2017:poacc:billing:01:1.0\",\n    \"exchangeDateTime\": \"2026-08-19T09:25:34.226Z\"\n  }\n}\n```\n\n`document_error` — delivery failed; `error` carries a human-readable reason:\n\n```json\n{\n  \"eventType\": \"document_error\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:26:10.104Z\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"status\": \"error\",\n    \"event\": \"message-log/error\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:26:09.881Z\"\n  },\n  \"error\": \"Peppol validation failed: invoice does not conform to UBL 2.1\",\n  \"peppol_metadata\": null\n}\n```","operationId":"partner/put-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookConfigure"},"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureCreated"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"webhookEvent":{"$ref":"#/components/callbacks/webhookEvent"}}}}}}
````

## Delete Webhook Configuration

> An API to DELETE the webhook subscription for your Partner account.\
> \
> This removes the subscription and any attached outbound authentication.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Configuration","description":"An API to DELETE the webhook subscription for your Partner account.\n\nThis removes the subscription and any attached outbound authentication.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.","operationId":"partner/delete-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Configuration for child account

> An API to fetch (GET) the webhook subscription scoped to a single child account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"WebhookConfigureFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"},"enabled":{"type":"boolean"},"authType":{"type":"string","nullable":true,"enum":["oauth","api_key","basic"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Configuration for child account","description":"An API to fetch (GET) the webhook subscription scoped to a single child account\nunder your Partner account.","operationId":"partner/get-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Configure Webhook for child account

> An API to create or update (PUT) the webhook subscription scoped to a single\
> child account under your Partner account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through \`/partner/{partnerRegNo}/webhook/...\`,\
> or their child accounts using this endpoint (scoped to a single account).\
> \
> A partner has a single webhook subscription per account. The first \`PUT\` creates it\
> and returns a generated webhook \`id\` (a UUID v4); subsequent \`PUT\` requests update\
> the same subscription (its \`url\` and/or \`types\`). Use the returned \`id\` with the\
> \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth\` endpoints\
> to attach outbound authentication.\
> \
> \### Event types\
> \
> \- \`new\_document\` — sent when a new document is received/created for an account.\
> \- \`document\_delivery\` — sent when a document's delivery status changes.\
> \- \`document\_error\` — sent when a document's delivery fails.\
> \
> \### Delivery (webhook usage)\
> \
> Events are delivered as an HTTP \`POST\` with a JSON body to the configured \`url\`\
> (which must be \`https\`). Your endpoint should respond with a \`2xx\` status code;\
> the delivery request times out after 10 seconds. If outbound authentication is\
> configured (see \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth\`)\
> it is applied as request headers on every delivery. The delivered payload is a\
> single flat JSON object — see the \`webhookEvent\` callback below for the full\
> schema, and \`/partner/{partnerRegNo}/webhook/configure\` above for worked\
> examples of all three event types.\
> \
> \`status.event\` reflects the internal event that triggered the webhook and is\
> always one of \`message-log/create\` / \`message-log/update\` / \`message-log/error\`\
> — a 1:1 mapping onto the top-level \`eventType\`. \`status.status\`, by contrast, is\
> a free-text delivery status reported by the upstream delivery channel and is\
> \*\*not\*\* a fixed enum. \`error\` is only present when \`eventType\` is \`document\_error\`.\
> \
> Delivery is \*\*at-least-once\*\* — design your endpoint to be idempotent, deduping\
> on \`eventType\` + \`globalTransactionId\` + \`status.status\` (see\
> \`/partner/{partnerRegNo}/webhook/configure\` above for details).

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"requestBodies":{"WebhookConfigure":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","types"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive webhook events"},"types":{"type":"array","minItems":1,"items":{"type":"string","enum":["new_document","document_delivery","document_error"]}}}}}}}},"responses":{"WebhookConfigureCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"}}}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}},"callbacks":{"webhookEvent":{"{$request.body#/url}":{"post":{"summary":"Webhook event delivered to your endpoint","description":"Qvalia POSTs this JSON payload to your configured `url` when a subscribed\nevent occurs. Your endpoint should respond with a `2xx` status code; the\nrequest times out after 10 seconds. Any configured outbound authentication\nis applied as request headers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"type":"string","enum":["new_document","document_delivery","document_error"]},"accountRegNo":{"type":"string"},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (e.g. Peppol,\nemail, print). This is a free-text value from that channel, not a fixed\nenum — common values include `received`, `processed`, `error`, `sent` and\n`failed`, but do not treat this list as exhaustive. May be absent."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.\nMaps 1:1 onto the top-level `eventType`:\n`message-log/create` → `new_document`,\n`message-log/update` → `document_delivery`,\n`message-log/error` → `document_error`.","enum":["message-log/create","message-log/update","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `email`, `postal`, `edi`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `dynamic_routing`. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail. `null` when `status.deliveryMethod` is not `peppol`.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"}}}}}}}},"responses":{"2XX":{"description":"Event acknowledged by your endpoint"},"4XX":{"description":"Event not acknowledged by your endpoint"}},"security":[{}]}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"put":{"tags":["Webhook API"],"summary":"Configure Webhook for child account","description":"An API to create or update (PUT) the webhook subscription scoped to a single\nchild account under your Partner account.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through `/partner/{partnerRegNo}/webhook/...`,\nor their child accounts using this endpoint (scoped to a single account).\n\nA partner has a single webhook subscription per account. The first `PUT` creates it\nand returns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update\nthe same subscription (its `url` and/or `types`). Use the returned `id` with the\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth` endpoints\nto attach outbound authentication.\n\n### Event types\n\n- `new_document` — sent when a new document is received/created for an account.\n- `document_delivery` — sent when a document's delivery status changes.\n- `document_error` — sent when a document's delivery fails.\n\n### Delivery (webhook usage)\n\nEvents are delivered as an HTTP `POST` with a JSON body to the configured `url`\n(which must be `https`). Your endpoint should respond with a `2xx` status code;\nthe delivery request times out after 10 seconds. If outbound authentication is\nconfigured (see `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth`)\nit is applied as request headers on every delivery. The delivered payload is a\nsingle flat JSON object — see the `webhookEvent` callback below for the full\nschema, and `/partner/{partnerRegNo}/webhook/configure` above for worked\nexamples of all three event types.\n\n`status.event` reflects the internal event that triggered the webhook and is\nalways one of `message-log/create` / `message-log/update` / `message-log/error`\n— a 1:1 mapping onto the top-level `eventType`. `status.status`, by contrast, is\na free-text delivery status reported by the upstream delivery channel and is\n**not** a fixed enum. `error` is only present when `eventType` is `document_error`.\n\nDelivery is **at-least-once** — design your endpoint to be idempotent, deduping\non `eventType` + `globalTransactionId` + `status.status` (see\n`/partner/{partnerRegNo}/webhook/configure` above for details).","operationId":"partner/put-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookConfigure"},"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureCreated"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"webhookEvent":{"$ref":"#/components/callbacks/webhookEvent"}}}}}}
```

## Delete Webhook Configuration for child account

> An API to DELETE the webhook subscription scoped to a single child account\
> under your Partner account.\
> \
> This removes the subscription and any attached outbound authentication.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Configuration for child account","description":"An API to DELETE the webhook subscription scoped to a single child account\nunder your Partner account.\n\nThis removes the subscription and any attached outbound authentication.","operationId":"partner/delete-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Authentication

> An API to fetch (GET) the outbound authentication type configured for your\
> Partner account's webhook subscription. Secrets are never returned.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Authentication","description":"An API to fetch (GET) the outbound authentication type configured for your\nPartner account's webhook subscription. Secrets are never returned.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/get-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Set Webhook Authentication

> An API to set (POST) the outbound authentication applied to webhook deliveries\
> for your Partner account's subscription.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> \
> \`{webhookId}\` must match the \`id\` returned by \`PUT /partner/{partnerRegNo}/webhook/configure\`.\
> \
> Provide exactly one of the supported auth \`type\`s:\
> \
> \- \`oauth\` — client-credentials. Qvalia fetches a Bearer token from \`tokenUrl\`\
> &#x20; using \`clientId\`/\`clientSecret\` (and optional \`scope\`) at delivery time.\
> \- \`api\_key\` — sent as a request header (\`header\`, default \`X-API-Key\`) with \`value\`.\
> \- \`basic\` — HTTP Basic auth using \`username\`/\`password\`. The \`password\` must be at\
> &#x20; least 16 characters and contain an uppercase letter, a lowercase letter, a digit\
> &#x20; and a special character.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookAuth":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","clientId","clientSecret","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth"]},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tokenUrl":{"type":"string","format":"uri"},"scope":{"type":"string","description":"Optional OAuth scope(s) sent with the client-credentials token request."}}},{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["api_key"]},"header":{"type":"string","default":"X-API-Key"},"value":{"type":"string"}}},{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["basic"]},"username":{"type":"string"},"password":{"type":"string","description":"Minimum 16 characters; must contain uppercase, lowercase, digit and special character."}}}]}}}}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"post":{"tags":["Webhook API"],"summary":"Set Webhook Authentication","description":"An API to set (POST) the outbound authentication applied to webhook deliveries\nfor your Partner account's subscription.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\n\n`{webhookId}` must match the `id` returned by `PUT /partner/{partnerRegNo}/webhook/configure`.\n\nProvide exactly one of the supported auth `type`s:\n\n- `oauth` — client-credentials. Qvalia fetches a Bearer token from `tokenUrl`\n  using `clientId`/`clientSecret` (and optional `scope`) at delivery time.\n- `api_key` — sent as a request header (`header`, default `X-API-Key`) with `value`.\n- `basic` — HTTP Basic auth using `username`/`password`. The `password` must be at\n  least 16 characters and contain an uppercase letter, a lowercase letter, a digit\n  and a special character.","operationId":"partner/post-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookAuth"},"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Authentication

> An API to DELETE the outbound authentication from your Partner account's webhook\
> subscription. The subscription itself is kept; deliveries are sent without auth\
> headers afterwards.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Authentication","description":"An API to DELETE the outbound authentication from your Partner account's webhook\nsubscription. The subscription itself is kept; deliveries are sent without auth\nheaders afterwards.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/delete-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Authentication for child account

> An API to fetch (GET) the outbound authentication type configured for a child\
> account's webhook subscription under your Partner account. Secrets are never returned.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Authentication for child account","description":"An API to fetch (GET) the outbound authentication type configured for a child\naccount's webhook subscription under your Partner account. Secrets are never returned.","operationId":"partner/get-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Set Webhook Authentication for child account

> An API to set (POST) the outbound authentication applied to webhook deliveries\
> for a child account's subscription under your Partner account.\
> \
> \`{webhookId}\` must match the \`id\` returned by\
> \`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`.\
> \
> Provide exactly one of the supported auth \`type\`s:\
> \
> \- \`oauth\` — client-credentials. Qvalia fetches a Bearer token from \`tokenUrl\`\
> &#x20; using \`clientId\`/\`clientSecret\` (and optional \`scope\`) at delivery time.\
> \- \`api\_key\` — sent as a request header (\`header\`, default \`X-API-Key\`) with \`value\`.\
> \- \`basic\` — HTTP Basic auth using \`username\`/\`password\`. The \`password\` must be at\
> &#x20; least 16 characters and contain an uppercase letter, a lowercase letter, a digit\
> &#x20; and a special character.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookAuth":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","clientId","clientSecret","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth"]},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tokenUrl":{"type":"string","format":"uri"},"scope":{"type":"string","description":"Optional OAuth scope(s) sent with the client-credentials token request."}}},{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["api_key"]},"header":{"type":"string","default":"X-API-Key"},"value":{"type":"string"}}},{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["basic"]},"username":{"type":"string"},"password":{"type":"string","description":"Minimum 16 characters; must contain uppercase, lowercase, digit and special character."}}}]}}}}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"post":{"tags":["Webhook API"],"summary":"Set Webhook Authentication for child account","description":"An API to set (POST) the outbound authentication applied to webhook deliveries\nfor a child account's subscription under your Partner account.\n\n`{webhookId}` must match the `id` returned by\n`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\n\nProvide exactly one of the supported auth `type`s:\n\n- `oauth` — client-credentials. Qvalia fetches a Bearer token from `tokenUrl`\n  using `clientId`/`clientSecret` (and optional `scope`) at delivery time.\n- `api_key` — sent as a request header (`header`, default `X-API-Key`) with `value`.\n- `basic` — HTTP Basic auth using `username`/`password`. The `password` must be at\n  least 16 characters and contain an uppercase letter, a lowercase letter, a digit\n  and a special character.","operationId":"partner/post-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookAuth"},"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Authentication for child account

> An API to DELETE the outbound authentication from a child account's webhook\
> subscription under your Partner account. The subscription itself is kept;\
> deliveries are sent without auth headers afterwards.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Authentication for child account","description":"An API to DELETE the outbound authentication from a child account's webhook\nsubscription under your Partner account. The subscription itself is kept;\ndeliveries are sent without auth headers afterwards.","operationId":"partner/delete-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Transaction API

Operations related to Peppol messaging

## Get Partner accounts transactions

> \*\*NB! This documented endpoint has a pseudo path URI!\*\* (read below)\
> \
> An API to fetch (GET) your Partner accounts transactions.\
> \
> Using the prefix of \`/partner/{partnerRegNo}\` you, as a partner, can access your accounts transactions through Qvalia Transaction API.\
> \
> \`(message-type)\` and \`(direction)\` attributes in URI refers to Transaction API endpoints, e.g. \`invoices\` and \`incoming\`, which results in \`/partner/{partnerRegNo}/transaction/{accountRegNo}/invoices/incoming\`.\
> \
> \`(message-type)\` and \`(direction)\` are interchangable for all Transaction API endpoints, as well as for the \`read\` endpoints, by adding the \`read\` attribute to the URI.\
> \
> Refer to documentation for handling transactions at \[Qvalia Transaction API]\(<https://api.qvalia.io/api-documentation/apis/transaction-api>)

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Transaction API","description":"Operations related to Peppol messaging"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}}},"paths":{"/partner/{partnerRegNo}/transaction/{accountRegNo}/(message-type)/(direction)":{"get":{"tags":["Transaction API"],"summary":"Get Partner accounts transactions","description":"**NB! This documented endpoint has a pseudo path URI!** (read below)\n\nAn API to fetch (GET) your Partner accounts transactions.\n\nUsing the prefix of `/partner/{partnerRegNo}` you, as a partner, can access your accounts transactions through Qvalia Transaction API.\n\n`(message-type)` and `(direction)` attributes in URI refers to Transaction API endpoints, e.g. `invoices` and `incoming`, which results in `/partner/{partnerRegNo}/transaction/{accountRegNo}/invoices/incoming`.\n\n`(message-type)` and `(direction)` are interchangable for all Transaction API endpoints, as well as for the `read` endpoints, by adding the `read` attribute to the URI.\n\nRefer to documentation for handling transactions at [Qvalia Transaction API](https://api.qvalia.io/api-documentation/apis/transaction-api)","operationId":"partner/get-partner-account-transaction","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"See [https://api.qvalia.io/api-documentation/apis/transaction-api](https://api.qvalia.io/api-documentation/apis/transaction-api)"}}}}}}
```


# Account API

Qvalia Account API

Qvalia Account API endpoints offers status and automation on messages.

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

We use API keys or JWT 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.

{% hint style="success" %} <mark style="color:$success;">See</mark> [Ways to authenticate](/api-documentation/apis/ways-to-authenticate)<mark style="color:$success;">for detailed information!</mark>
{% endhint %}

Each request made to the API will contain your `account 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.


# Account Functions/Invoice Functions

Operations related to Qvalia accounts functions

## Get status

> Invoice related endpoints.\n\n\*\*NB!\*\* All Invoice data under the \`/account\` endpoints require JSON and only UBL JSON data are supported.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"integrationId":{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The integration id (UUID v4) of the transaction/message to get status for"}}},"paths":{"/account/{accountRegNo}/action/invoice/outgoing/status/{integrationId}":{"post":{"tags":["Account Functions/Invoice Functions"],"summary":"Get status","description":"Invoice related endpoints.\\n\\n**NB!** All Invoice data under the `/account` endpoints require JSON and only UBL JSON data are supported.","operationId":"account-functions/invoice-functions/get-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/integrationId"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"message":{"type":"string","description":""},"status":{"type":"object","description":"","properties":{"document_id":{"type":"string","description":""},"order_number":{"type":"string","description":""},"payment_reference":{"type":"string","description":""},"credit_note":{"type":"string","description":""},"reminder":{"type":"string","description":""},"status":{"type":"string","description":""},"sent_at":{"type":"string","description":""},"paid_at":{"type":"string","description":""},"cancelled_at":{"type":"string","description":""},"send_method":{"type":"string","description":""}},"required":[""]}},"required":[""]}}}}}}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}}}
```

## Create from Order

> \_(Requires “Order to Cash” (O2C) or Order Management addon)\_\n\n\`/account/{accountRegNo}/action/invoice/createandsend/{integrationId}\`\n\nThis Endpoint will use an Incoming Order and generate an Outgoing Invoice from it.\n\nNB! The Addressing (EndpointID) in the Order will be used as Address for the Outgoing Invoice!\n\nYou need to “update” the Order by using the overwrite flag on it to change the Addressing, if needed!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"integrationId":{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The integration id (UUID v4) of the transaction/message to get status for"}}},"paths":{"/account/{accountRegNo}/action/invoice/createandsend/{integrationId}":{"post":{"tags":["Account Functions/Invoice Functions"],"summary":"Create from Order","description":"_(Requires “Order to Cash” (O2C) or Order Management addon)_\\n\\n`/account/{accountRegNo}/action/invoice/createandsend/{integrationId}`\\n\\nThis Endpoint will use an Incoming Order and generate an Outgoing Invoice from it.\\n\\nNB! The Addressing (EndpointID) in the Order will be used as Address for the Outgoing Invoice!\\n\\nYou need to “update” the Order by using the overwrite flag on it to change the Addressing, if needed!","operationId":"account-functions/invoice-functions/create-from-order","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/integrationId"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"message":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"invoice":{"type":"object","description":"","properties":{"Invoice":{"type":"string","description":""}},"required":[""]}},"required":[""]}},"required":[""]}}}}}}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send":{"type":"object","description":"","properties":{"method":{"type":"string","description":""}},"required":[""]}}}}}}}}}}
```


# Webhook API

Operations related to Web hooks

## Get Webhook Configuration

> An API to fetch (GET) the webhook subscription for your Partner account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through \`/partner/{partnerRegNo}/webhook/...\` URI, or their child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> \### parameter \`accountRegNo\` is only required for child accounts, and should be omitted for the Partner account itself.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/configure":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Configuration","description":"An API to fetch (GET) the webhook subscription for your Partner account.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through `/partner/{partnerRegNo}/webhook/...` URI, or their child accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\n### parameter `accountRegNo` is only required for child accounts, and should be omitted for the Partner account itself.","operationId":"account/get-webhook-config","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"},"enabled":{"type":"boolean"},"authType":{"type":"string","nullable":true,"enum":["oauth","api_key","basic"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Configure Webhook

> An API to create or update (PUT) the webhook subscription for your account.\
> \
> An account has a single webhook subscription. The first \`PUT\` creates it and\
> returns a generated webhook \`id\` (a UUID v4); subsequent \`PUT\` requests update\
> the same subscription (its \`url\` and/or \`types\`). Use the returned \`id\` with the\
> \`/account/{accountRegNo}/webhook/{webhookId}/auth\` endpoints to attach outbound\
> authentication.\
> \
> \### Event types\
> \
> \- \`new\_document\` — sent when a new document is received/created for an account.\
> \- \`document\_delivery\` — sent when a document's delivery status changes.\
> \- \`document\_error\` — sent when a document's delivery fails.\
> \
> \### Delivery (webhook usage)\
> \
> Events are delivered as an HTTP \`POST\` with a JSON body to the configured \`url\`\
> (which must be \`https\`). Your endpoint should respond with a \`2xx\` status code;\
> the delivery request times out after 10 seconds. If outbound authentication is\
> configured (see \`/account/{accountRegNo}/webhook/{webhookId}/auth\`) it is applied\
> as request headers on every delivery. The delivered payload is a single flat\
> JSON object — see the \`webhookEvent\` callback below for the full schema, and\
> \`/partner/{partnerRegNo}/webhook/configure\` in the Partner API for worked\
> examples of all three event types.\
> \
> \`status.event\` reflects the internal event that triggered the webhook and is\
> always one of \`message-log/create\` / \`message-log/update\` / \`message-log/error\`\
> — a 1:1 mapping onto the top-level \`eventType\`. \`status.status\`, by contrast, is\
> a free-text delivery status reported by the upstream delivery channel and is\
> \*\*not\*\* a fixed enum. \`error\` is only present when \`eventType\` is \`document\_error\`.\
> \
> Delivery is \*\*at-least-once\*\* — design your endpoint to be idempotent, deduping\
> on \`eventType\` + \`globalTransactionId\` + \`status.status\` (see\
> \`/partner/{partnerRegNo}/webhook/configure\` in the Partner API for details).

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/configure":{"put":{"tags":["Webhook API"],"summary":"Configure Webhook","description":"An API to create or update (PUT) the webhook subscription for your account.\n\nAn account has a single webhook subscription. The first `PUT` creates it and\nreturns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update\nthe same subscription (its `url` and/or `types`). Use the returned `id` with the\n`/account/{accountRegNo}/webhook/{webhookId}/auth` endpoints to attach outbound\nauthentication.\n\n### Event types\n\n- `new_document` — sent when a new document is received/created for an account.\n- `document_delivery` — sent when a document's delivery status changes.\n- `document_error` — sent when a document's delivery fails.\n\n### Delivery (webhook usage)\n\nEvents are delivered as an HTTP `POST` with a JSON body to the configured `url`\n(which must be `https`). Your endpoint should respond with a `2xx` status code;\nthe delivery request times out after 10 seconds. If outbound authentication is\nconfigured (see `/account/{accountRegNo}/webhook/{webhookId}/auth`) it is applied\nas request headers on every delivery. The delivered payload is a single flat\nJSON object — see the `webhookEvent` callback below for the full schema, and\n`/partner/{partnerRegNo}/webhook/configure` in the Partner API for worked\nexamples of all three event types.\n\n`status.event` reflects the internal event that triggered the webhook and is\nalways one of `message-log/create` / `message-log/update` / `message-log/error`\n— a 1:1 mapping onto the top-level `eventType`. `status.status`, by contrast, is\na free-text delivery status reported by the upstream delivery channel and is\n**not** a fixed enum. `error` is only present when `eventType` is `document_error`.\n\nDelivery is **at-least-once** — design your endpoint to be idempotent, deduping\non `eventType` + `globalTransactionId` + `status.status` (see\n`/partner/{partnerRegNo}/webhook/configure` in the Partner API for details).","operationId":"account/put-webhook-config","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","types"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive webhook events"},"types":{"type":"array","minItems":1,"items":{"type":"string","enum":["new_document","document_delivery","document_error"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"webhookEvent":{"{$request.body#/url}":{"post":{"summary":"Webhook event delivered to your endpoint","description":"Qvalia POSTs this JSON payload to your configured `url` when a subscribed\nevent occurs. Your endpoint should respond with a `2xx` status code; the\nrequest times out after 10 seconds. Any configured outbound authentication\n(see `/partner/{partnerRegNo}/webhook/{webhookId}/auth`) is applied as\nrequest headers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"type":"string","enum":["new_document","document_delivery","document_error"]},"accountRegNo":{"type":"string"},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (e.g. Peppol,\nemail, print). This is a free-text value from that channel, not a fixed\nenum — common values include `received`, `processed`, `error`, `sent` and\n`failed`, but do not treat this list as exhaustive. May be absent."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.\nMaps 1:1 onto the top-level `eventType`:\n`message-log/create` → `new_document`,\n`message-log/update` → `document_delivery`,\n`message-log/error` → `document_error`.","enum":["message-log/create","message-log/update","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `email`, `postal`, `edi`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `dynamic_routing`. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail. `null` when `status.deliveryMethod` is not `peppol`.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"}}}}}}}},"responses":{"2XX":{"description":"Event acknowledged by your endpoint"}}}}}}}}}}
```

## Delete Webhook Configuration

> An API to DELETE the webhook subscription for your Partner account.\
> \
> This removes the subscription and any attached outbound authentication.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through \`/partner/{partnerRegNo}/webhook/...\` URI, or their child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> \### parameter \`accountRegNo\` is only required for child accounts, and should be omitted for the Partner account itself.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/configure":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Configuration","description":"An API to DELETE the webhook subscription for your Partner account.\n\nThis removes the subscription and any attached outbound authentication.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through `/partner/{partnerRegNo}/webhook/...` URI, or their child accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\n### parameter `accountRegNo` is only required for child accounts, and should be omitted for the Partner account itself.","operationId":"account/delete-webhook-config","parameters":[{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Authentication

> An API to fetch (GET) the outbound authentication type configured for your\
> account's webhook subscription. Secrets are never returned.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/{webhookId}/auth":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Authentication","description":"An API to fetch (GET) the outbound authentication type configured for your\naccount's webhook subscription. Secrets are never returned.","operationId":"account/get-webhook-auth","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Set Webhook Authentication

> An API to set (POST) the outbound authentication applied to webhook deliveries\
> for your Partner account's subscription.\
> \
> \`{webhookId}\` must match the \`id\` returned by \`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`.\
> \
> Provide exactly one of the supported auth \`type\`s:\
> \
> \- \`oauth\` — client-credentials. Qvalia fetches a Bearer token from \`tokenUrl\`\
> &#x20; using \`clientId\`/\`clientSecret\` (and optional \`scope\`) at delivery time.\
> \- \`api\_key\` — sent as a request header (\`header\`, default \`X-API-Key\`) with \`value\`.\
> \- \`basic\` — HTTP Basic auth using \`username\`/\`password\`. The \`password\` must be at\
> &#x20; least 16 characters and contain an uppercase letter, a lowercase letter, a digit\
> &#x20; and a special character.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/{webhookId}/auth":{"post":{"tags":["Webhook API"],"summary":"Set Webhook Authentication","description":"An API to set (POST) the outbound authentication applied to webhook deliveries\nfor your Partner account's subscription.\n\n`{webhookId}` must match the `id` returned by `PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\n\nProvide exactly one of the supported auth `type`s:\n\n- `oauth` — client-credentials. Qvalia fetches a Bearer token from `tokenUrl`\n  using `clientId`/`clientSecret` (and optional `scope`) at delivery time.\n- `api_key` — sent as a request header (`header`, default `X-API-Key`) with `value`.\n- `basic` — HTTP Basic auth using `username`/`password`. The `password` must be at\n  least 16 characters and contain an uppercase letter, a lowercase letter, a digit\n  and a special character.","operationId":"account/post-webhook-auth","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","clientId","clientSecret","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth"]},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tokenUrl":{"type":"string","format":"uri"},"scope":{"type":"string","description":"Optional OAuth scope(s) sent with the client-credentials token request."}}},{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["api_key"]},"header":{"type":"string","default":"X-API-Key"},"value":{"type":"string"}}},{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["basic"]},"username":{"type":"string"},"password":{"type":"string","description":"Minimum 16 characters; must contain uppercase, lowercase, digit and special character."}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Authentication

> An API to DELETE the outbound authentication from your account's webhook\
> subscription. The subscription itself is kept; deliveries are sent without auth\
> headers afterwards.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content","content":{"text/plain":{"schema":{"type":"string"}}}},"Unauthorized":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"}}}}}}}},"paths":{"/account/{accountRegNo}/webhook/{webhookId}/auth":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Authentication","description":"An API to DELETE the outbound authentication from your account's webhook\nsubscription. The subscription itself is kept; deliveries are sent without auth\nheaders afterwards.","operationId":"account/delete-webhook-auth","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


# SCIM

Qvalia SCIM endpoints

The Qvalia SCIM endpoints offers possibility to use select [SCIM](https://scim.cloud/) operations on account users in Qvalia.

SCIM is offered to Partner- and Enterprise accounts only.


# User

HTTP methods with User resource(s)

## Get Service Provider Configuration

> This endpoint returns the Service Provider Configuration, which contains the service provider's supported features.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/ServiceProviderConfig":{"get":{"tags":["User"],"summary":"Get Service Provider Configuration","description":"This endpoint returns the Service Provider Configuration, which contains the service provider's supported features.","operationId":"getServiceProviderConfig","responses":{"200":{"description":"Success - Service Provider Configuration found","content":{"application/scim+json":{"schema":{"properties":{"authenticationSchemes":{"type":"array","items":{"properties":{"jwt":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"documentationUrl":{"type":"string"}}},"api_key":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"documentationUrl":{"type":"string"}}}}}},"filter":{"type":"object","properties":{"supported":{"type":"boolean","default":false}}},"patch":{"type":"object","properties":{"supported":{"type":"boolean","default":false}}},"sort":{"type":"object","properties":{"supported":{"type":"boolean","default":false}}},"bulk":{"type":"object","properties":{"supported":{"type":"boolean","default":false}}},"etag":{"type":"object","properties":{"supported":{"type":"boolean","default":false}}},"changePassword":{"type":"object","description":"Change password is supported through PUT operation on User resource","properties":{"supported":{"type":"boolean","default":true}}},"schemas":{"type":"array","items":{"type":"string","enum":["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"]}}}}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get filtered or all Users

> This endpoint returns all or filtered Users. Utilize the query parameters to configure filtering, sorting, pagination and in-/excluded attribues.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"UserListResponse":{"allOf":[{"$ref":"#/components/schemas/ListResponse"}],"properties":{"Resource":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"required":["Resource"]},"ListResponse":{"description":"The ListResponse specifies control attribute for big collections returned. The attributes thus cover information about the pagination. The assigned Resource object contains the queried resources.","type":"object","properties":{"totalResults":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the total number of results matching the client query, e.g., 1000."},"startIndex":{"type":"integer","format":"int32","description":"The 1-based index of the first result in the current set of query results, e.g., 1."},"itemsPerPage":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the number of query results returned in a query response page, e.g., 10."}},"required":["totalResults","startIndex","itemsPerPage"]},"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]},"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/Users":{"get":{"tags":["User"],"summary":"Get filtered or all Users","description":"This endpoint returns all or filtered Users. Utilize the query parameters to configure filtering, sorting, pagination and in-/excluded attribues.","operationId":"getUsers","parameters":[{"in":"query","name":"sortOrder","schema":{"type":"string","default":"ascending","enum":["ascending","descending"]},"description":"The order in which the \\\"sortBy\\\" parameter is applied. Allowed values are \\\"ascending\\\" and \\\"descending\\\".  If a value for \\\"sortBy\\\" is provided and no \\\"sortOrder\\\" is specified, \\\"sortOrder\\\" SHALL default to ascending.  String type attributes are case insensitive by default, unless the attribute type is defined as a case-exact string.  \\\"sortOrder\\\" MUST sort according to the attribute type; i.e., for case-insensitive attributes, sort the result using case-insensitive Unicode alphabetic sort order with no specific locale implied, and for case-exact attribute types, sort the result using case-sensitive Unicode alphabetic sort order."},{"in":"query","name":"cursor","schema":{"type":"integer","default":1},"description":"The 1-based index of the first query result. A value less than 1 SHALL be interpreted as 1."},{"in":"query","name":"count","schema":{"type":"integer","default":1000},"description":"Non-negative integer. Specifies the desired maximum number of query results per page, e.g., 10. A negative value SHALL be interpreted as \\\"0\\\". A value of \\\"0\\\" indicates that no resource results are to be returned except for \\\"totalResults\\\"."}],"responses":{"200":{"description":"Success - list of all Users","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}},"400":{"description":"Bad request - See scimType for further information","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Authentication failed try again with a valid authentication","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Authentication was successful but the user is not authorized","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found - No resource with provided Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create new user resource

> Creates a new User. Some attributes might be immutable, thus make sure these are set correctly for creation. Unset required attributes might lead to assertions or insertion of default values. Readonly attributes are ignored. The query parameters attribues and excludedAttributes refer to the response upon success. The id attributes is set by the Service Provider to ensure uniqueness.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]},"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/Users":{"post":{"tags":["User"],"summary":"Create new user resource","description":"Creates a new User. Some attributes might be immutable, thus make sure these are set correctly for creation. Unset required attributes might lead to assertions or insertion of default values. Readonly attributes are ignored. The query parameters attribues and excludedAttributes refer to the response upon success. The id attributes is set by the Service Provider to ensure uniqueness.","operationId":"createUser","requestBody":{"description":"Content to create new user resource","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"201":{"description":"Success - User created","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad request - See scimType for further information","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Authentication failed try again with a valid authentication","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Authentication was successful but the user is not authorized","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found - No resource with provided Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - Outdated version number or refusal of Service Provider to create a duplicate","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get user by Id

> Finds a single User by its id attribute. Returned attributes might be specified or restricted with the query parameter attributes or excludedAttributes. Some attributes might not be readable according their schema definition.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]},"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/Users/{id}":{"get":{"tags":["User"],"summary":"Get user by Id","description":"Finds a single User by its id attribute. Returned attributes might be specified or restricted with the query parameter attributes or excludedAttributes. Some attributes might not be readable according their schema definition.","operationId":"getUserById","parameters":[{"name":"id","in":"path","description":"Reference to the resouce which should be queried","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"query","name":"attributes","schema":{"type":"string"},"description":"A multi-valued list of strings indicating the names of resource attributes to return in the response, overriding the set of attributes that would be returned by default.  Attribute names MUST be in standard attribute notation (see [Section 3.10 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.10)) form. See [Section 3.9 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.9) for additional retrieval query parameters."},{"in":"query","name":"excludedAttributes","schema":{"type":"string"},"description":"A multi-valued list of strings indicating the names of resource attributes to be removed from the default set of attributes to return.  This parameter SHALL have no effect on attributes whose schema \\\"returned\\\" setting is \\\"always\\\" (see Sections [2.2](https://www.rfc-editor.org/rfc/rfc7644#section-2.2) and [7](https://www.rfc-editor.org/rfc/rfc7644#section-7) of RFC7644).  Attribute names MUST be in standard attribute notation ([Section 3.10 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.10)) form.  See [Section 3.9 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.9) for additional retrieval query parameters."}],"responses":{"200":{"description":"Success - User found","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad request - See scimType for further information","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Authentication failed try again with a valid authentication","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Authentication was successful but the user is not authorized","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found - No resource with provided Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update user by Id

> Updates a present User. Unset required attributes might lead to assertions or insertion of default values. Readonly attributes are ignored. The query parameters attribues and excludedAttributes refer to the response upon success.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]},"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/Users/{id}":{"put":{"tags":["User"],"summary":"Update user by Id","description":"Updates a present User. Unset required attributes might lead to assertions or insertion of default values. Readonly attributes are ignored. The query parameters attribues and excludedAttributes refer to the response upon success.","operationId":"updateUserById","parameters":[{"name":"id","in":"path","description":"Reference to the resouce which requires an update","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"query","name":"attributes","schema":{"type":"string"},"description":"A multi-valued list of strings indicating the names of resource attributes to return in the response, overriding the set of attributes that would be returned by default.  Attribute names MUST be in standard attribute notation (see [Section 3.10 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.10)) form. See [Section 3.9 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.9) for additional retrieval query parameters."},{"in":"query","name":"excludedAttributes","schema":{"type":"string"},"description":"A multi-valued list of strings indicating the names of resource attributes to be removed from the default set of attributes to return.  This parameter SHALL have no effect on attributes whose schema \\\"returned\\\" setting is \\\"always\\\" (see Sections [2.2](https://www.rfc-editor.org/rfc/rfc7644#section-2.2) and [7](https://www.rfc-editor.org/rfc/rfc7644#section-7) of RFC7644).  Attribute names MUST be in standard attribute notation ([Section 3.10 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.10)) form.  See [Section 3.9 of RFC7644](https://www.rfc-editor.org/rfc/rfc7644#section-3.9) for additional retrieval query parameters."}],"requestBody":{"description":"Content for updating an existent user by Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"Success - User updated","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad request - See scimType for further information","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Authentication failed try again with a valid authentication","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Authentication was successful but the user is not authorized","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found - No resource with provided Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - Outdated version number or refusal of Service Provider to create a duplicate","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Delete user by Id

> Deletes a present User. For subsequent requests on that resource and after successful deletion, a HTTP status code 404 is returned.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"tags":[{"name":"User","description":"HTTP methods with User resource(s)"}],"servers":[{"url":"https://api-qa.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n"}},"schemas":{"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}},"paths":{"/scim/v2/{accountRegNo}/Users/{id}":{"delete":{"tags":["User"],"summary":"Delete user by Id","description":"Deletes a present User. For subsequent requests on that resource and after successful deletion, a HTTP status code 404 is returned.","operationId":"deleteUserByID","parameters":[{"name":"id","in":"path","description":"Reference to the resouce which should be deleted","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Success - User deleted"},"400":{"description":"Bad request - See scimType for further information","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Authentication failed try again with a valid authentication","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Authentication was successful but the user is not authorized","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found - No resource with provided Id","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - Outdated version number or refusal of Service Provider to create a duplicate","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed - Failed to update. Resource has changed on the server.","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error - Implementers provide a descriptive debugging advice","content":{"application/scim+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# Models

## The Resource object

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"components":{"schemas":{"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]}}}}
```

## The User object

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"components":{"schemas":{"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]}}}}
```

## The ListResponse object

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"components":{"schemas":{"ListResponse":{"description":"The ListResponse specifies control attribute for big collections returned. The attributes thus cover information about the pagination. The assigned Resource object contains the queried resources.","type":"object","properties":{"totalResults":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the total number of results matching the client query, e.g., 1000."},"startIndex":{"type":"integer","format":"int32","description":"The 1-based index of the first result in the current set of query results, e.g., 1."},"itemsPerPage":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the number of query results returned in a query response page, e.g., 10."}},"required":["totalResults","startIndex","itemsPerPage"]}}}}
```

## The UserListResponse object

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"components":{"schemas":{"UserListResponse":{"allOf":[{"$ref":"#/components/schemas/ListResponse"}],"properties":{"Resource":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"required":["Resource"]},"ListResponse":{"description":"The ListResponse specifies control attribute for big collections returned. The attributes thus cover information about the pagination. The assigned Resource object contains the queried resources.","type":"object","properties":{"totalResults":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the total number of results matching the client query, e.g., 1000."},"startIndex":{"type":"integer","format":"int32","description":"The 1-based index of the first result in the current set of query results, e.g., 1."},"itemsPerPage":{"type":"integer","format":"int32","description":"Non-negative integer. Specifies the number of query results returned in a query response page, e.g., 10."}},"required":["totalResults","startIndex","itemsPerPage"]},"User":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"SCIM provides a resource type for \\\"User\\\" resources.  The core schema for \\\"User\\\" is identified using the following schema URI \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\".  The following attributes are defined in addition to the core schema attributes","properties":{"userName":{"description":"A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider. Often displayed to the user as their unique identifier within the system (as opposed to \\\"id\\\" or \\\"externalId\\\", which are generally opaque and not user-friendly identifiers).  Each User MUST include a non-empty userName value.  This identifier MUST be unique across the service provider's entire set of Users.  This attribute is REQUIRED and is case insensitive.","type":"string"},"name":{"description":"The components of the user's name.  Qvalia only allows the full formatted name once!","type":"array","items":{"properties":{"formatted":{"description":"The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., \\\"Jane Doe\\\").","type":"string"}}}},"title":{"description":"The user's title, such as \\\"IT Architect\\\".","type":"string"},"userType":{"description":"Used to identify the permission in Qvalia account.","type":"string","pattern":"^[viewer|user|admin]$","enum":["viewer","user","admin"]},"preferredLanguage":{"description":"Indicates the user's preferred written or spoken languages and is generally used for selecting a localized user interface.  The value indicates the set of natural languages that are preferred. The format of the value is the same as the HTTP Accept-Language header field (not including \\\"Accept-Language:\\\") and is specified in Section 5.3.5 of [RFC7231].  The intent of this value is to enable cloud applications to perform matching of language tags [RFC4647] to the user's language preferences, regardless of what may be indicated by a user agent (which might be shared), or in an interaction that does not involve a user (such as in a delegated OAuth 2.0 [RFC6749] style interaction) where normal HTTP Accept-Language header negotiation cannot take place.","type":"string","enum":["en","sv","fi"]},"active":{"description":"A Boolean value indicating the user's administrative status. The definitive meaning of this attribute is determined by the service provider. As a typical example, a value of true implies that the user is able to log in, while a value of false implies that the user's account has been suspended.","type":"boolean"},"password":{"writeOnly":true,"description":"This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password.  The cleartext value or the hashed value of a password SHALL NOT be returnable by a service provider.  If a service provider holds the value locally, the value SHOULD be hashed.  When a password is set or changed by the client, the cleartext password SHOULD be processed by the service provider as follows\n<ul>\n  <li>Prepare the cleartext value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n  <li>Validate the value against server password policy.  Note, The definition and enforcement of password policy are beyond the scope of this document.</li>\n  <li>Ensure that the value is encrypted (e.g., hashed).  See Section 9.2 of [RFC7643] for acceptable hashing and encryption handling when storing or persisting for provisioning workflow reasons.</li>\n</ul>\nA service provider that immediately passes the cleartext value on to another system or programming interface MUST pass the value directly over a secured connection (e.g., Transport Layer Security (TLS)).  If the value needs to be temporarily persisted for a period of time (e.g., because of a workflow) before provisioning, then the value MUST be protected by some method, such as encryption.\nTesting for an equality match MAY be supported if there is an existing stored hashed value.  When testing for equality, the service provider\n<ul>\n    <li>Prepares the filter value for international language comparison.  See Section 7.8 of [RFC7644].</li>\n    <li>Generates the salted hash of the filter value and tests for a match with the locally held value.</li>\n</ul>\nThe mutability of the password attribute is \\\"writeOnly\\\", indicating that the value MUST NOT be returned by a service provider in any form (the attribute characteristic \\\"returned\\\" is \\\"never\\\").\n","type":"string","format":"password"},"emails":{"description":"Email addresses for the User.  The value SHOULD be specified according to [RFC5321].  Service providers SHOULD canonicalize the value according to [RFC5321], e.g., \\\"user@company.com\\\" instead of \\\"user@COMPANY.COM\\\".  Qvalia only allows one email!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the email value","type":"string","format":"email"}},"required":["value"]}},"phoneNumbers":{"description":"Phone numbers for the user.  The value SHOULD be specified according to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123'.  Service providers SHOULD canonicalize the value according to [RFC3966] format, when appropriate.  The \\\"display\\\" sub-attribute MAY be used to return the canonicalized representation of the phone number value.  Qvalia only allows one phone number!","type":"array","items":{"properties":{"value":{"description":"should return canonicalized representation of the phone value","type":"string","format":"string"}}}}},"required":["userName"]},"Resource":{"type":"object","description":"The resource is the base class to represent the entities of this RBAC REST API. It holds the attributes necessary for all actual resources (User, Group, Role, etc.).","properties":{"schemas":{"description":"The schema(s) involved in the SCIM resource.","type":"array","items":{"type":"string"}},"id":{"type":"string","format":"email","description":"A unique identifier for a SCIM resource as defined by the service provider.  Each representation of the resource MUST include a non-empty \\\"id\\\" value.  This identifier MUST be unique across the SCIM service provider's entire set of resources.  It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests.  The value of the \\\"id\\\" attribute is always issued by the service provider and MUST NOT be specified by the client.  The string \\\"bulkId\\\" is a reserved keyword and MUST NOT be used within any unique identifier value.  The attribute characteristics are \\\"caseExact\\\" as \\\"true\\\", a mutability of \\\"readOnly\\\", and a \\\"returned\\\" characteristic of \\\"always\\\".  See [Section 9 RFC7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-9) for additional considerations regarding privacy."}},"required":["id","schemas"]}}}}
```

## The Error object

```json
{"openapi":"3.0.2","info":{"title":"Qvalia SCIM API","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}}
```


# API Sample Data

Sample data that can be used to try out the API's

As the request and response sample data are quite big, and scrolling through each sample on every endpoint would get quite tedious, we've opted to add sample data for the various messages here instead of in the actual Endpoint data.

Regardless if you are POST'in or GET'ing data the message structure of the messages will be the same.

As stated in the `API` section of the documentation, and under `JSON/XML or JSON to XML` all our transaction messages are bidirectional and can be transformed to/from JSON/XML.f


# Invoice

Base Invoice example

Sample origin: <https://github.com/OpenPEPPOL/peppol-bis-invoice-3/blob/master/rules/examples/base-example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "Invoice": {
    "$": {
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
      }
    ],
    "cbc:ID": [
      {
        "_": "Snippet1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-11-13"
      }
    ],
    "cbc:DueDate": [
      {
        "_": "2017-12-01"
      }
    ],
    "cbc:InvoiceTypeCode": [
      {
        "_": "380"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:AccountingCost": [
      {
        "_": "4025:123:4343"
      }
    ],
    "cbc:BuyerReference": [
      {
        "_": "0150abc"
      }
    ],
    "cac:AccountingSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "9482348239847239874",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "99887766"
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "SupplierTradingName Ltd."
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Main street 1"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Postbox 123"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "London"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "GB 123 EW"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "GB1232434"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "SupplierOfficialName Ltd"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "GB983294"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "FR23342",
                "$": {
                  "schemeID": "0002"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "FR23342",
                    "$": {
                      "schemeID": "0002"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "BuyerTradingName AS"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Hovedgatan 32"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Po box 878"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "456 34"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "SE4598375937"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Buyer Official Name"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "39937423947",
                    "$": {
                      "schemeID": "0183"
                    }
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Lisa Johnson"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "23434234"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "lj@buyer.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cbc:ActualDeliveryDate": [
          {
            "_": "2017-11-01"
          }
        ],
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "9483759475923478",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Delivery street 2"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Building 56"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "21234"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Delivery party Name"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentMeans": [
      {
        "cbc:PaymentMeansCode": [
          {
            "_": "30",
            "$": {
              "name": "Credit transfer"
            }
          }
        ],
        "cbc:PaymentID": [
          {
            "_": "Snippet1"
          }
        ],
        "cac:PayeeFinancialAccount": [
          {
            "cbc:ID": [
              {
                "_": "IBAN32423940"
              }
            ],
            "cbc:Name": [
              {
                "_": "AccountName"
              }
            ],
            "cac:FinancialInstitutionBranch": [
              {
                "cbc:ID": [
                  {
                    "_": "BIC324098"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentTerms": [
      {
        "cbc:Note": [
          {
            "_": "Payment within 10 days, 2% discount"
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Insurance"
          }
        ],
        "cbc:Amount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25.0"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "331.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxSubtotal": [
          {
            "cbc:TaxableAmount": [
              {
                "_": "1325",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:TaxAmount": [
              {
                "_": "331.25",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:TaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:LegalMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "1300",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "1325",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:InvoiceLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:InvoicedQuantity": [
          {
            "_": "7",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "2800",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:AccountingCost": [
          {
            "_": "Konteringsstreng"
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description of item"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "400",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "2"
          }
        ],
        "cbc:InvoicedQuantity": [
          {
            "_": "-3",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "-1500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description 2"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name 2"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "500",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Invoice
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
	xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
	<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
	<cbc:ID>Snippet1</cbc:ID>
	<cbc:IssueDate>2017-11-13</cbc:IssueDate>
	<cbc:DueDate>2017-12-01</cbc:DueDate>
	<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
	<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
	<cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
	<cbc:BuyerReference>0150abc</cbc:BuyerReference>
	<cac:AccountingSupplierParty>
		<cac:Party>
			<cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
			<cac:PartyIdentification>
				<cbc:ID>99887766</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>SupplierTradingName Ltd.</cbc:Name>
			</cac:PartyName>
			<cac:PostalAddress>
				<cbc:StreetName>Main street 1</cbc:StreetName>
				<cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
				<cbc:CityName>London</cbc:CityName>
				<cbc:PostalZone>GB 123 EW</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>GB</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
				<cbc:CompanyID>GB1232434</cbc:CompanyID>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
				<cbc:CompanyID>GB983294</cbc:CompanyID>
			</cac:PartyLegalEntity>
		</cac:Party>
	</cac:AccountingSupplierParty>
	<cac:AccountingCustomerParty>
		<cac:Party>
			<cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0002">FR23342</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>BuyerTradingName AS</cbc:Name>
			</cac:PartyName>
			<cac:PostalAddress>
				<cbc:StreetName>Hovedgatan 32</cbc:StreetName>
				<cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
				<cbc:CityName>Stockholm</cbc:CityName>
				<cbc:PostalZone>456 34</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>SE</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
				<cbc:CompanyID>SE4598375937</cbc:CompanyID>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
				<cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
			</cac:PartyLegalEntity>
			<cac:Contact>
				<cbc:Name>Lisa Johnson</cbc:Name>
				<cbc:Telephone>23434234</cbc:Telephone>
				<cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
			</cac:Contact>
		</cac:Party>
	</cac:AccountingCustomerParty>
	<cac:Delivery>
		<cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
		<cac:DeliveryLocation>
			<cbc:ID schemeID="0088">9483759475923478</cbc:ID>
			<cac:Address>
				<cbc:StreetName>Delivery street 2</cbc:StreetName>
				<cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
				<cbc:CityName>Stockholm</cbc:CityName>
				<cbc:PostalZone>21234</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>SE</cbc:IdentificationCode>
				</cac:Country>
			</cac:Address>
		</cac:DeliveryLocation>
		<cac:DeliveryParty>
			<cac:PartyName>
				<cbc:Name>Delivery party Name</cbc:Name>
			</cac:PartyName>
		</cac:DeliveryParty>
	</cac:Delivery>
	<cac:PaymentMeans>
		<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
		<cbc:PaymentID>Snippet1</cbc:PaymentID>
		<cac:PayeeFinancialAccount>
			<cbc:ID>IBAN32423940</cbc:ID>
			<cbc:Name>AccountName</cbc:Name>
			<cac:FinancialInstitutionBranch>
				<cbc:ID>BIC324098</cbc:ID>
			</cac:FinancialInstitutionBranch>
		</cac:PayeeFinancialAccount>
	</cac:PaymentMeans>
	<cac:PaymentTerms>
		<cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
	</cac:PaymentTerms>
	<cac:AllowanceCharge>
		<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
		<cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
		<cbc:Amount currencyID="EUR">25</cbc:Amount>
		<cac:TaxCategory>
			<cbc:ID>S</cbc:ID>
			<cbc:Percent>25.0</cbc:Percent>
			<cac:TaxScheme>
				<cbc:ID>VAT</cbc:ID>
			</cac:TaxScheme>
		</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
		<cac:TaxSubtotal>
			<cbc:TaxableAmount currencyID="EUR">1325</cbc:TaxableAmount>
			<cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
			<cac:TaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>25.0</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>
	<cac:LegalMonetaryTotal>
		<cbc:LineExtensionAmount currencyID="EUR">1300</cbc:LineExtensionAmount>
		<cbc:TaxExclusiveAmount currencyID="EUR">1325</cbc:TaxExclusiveAmount>
		<cbc:TaxInclusiveAmount currencyID="EUR">1656.25</cbc:TaxInclusiveAmount>
		<cbc:ChargeTotalAmount currencyID="EUR">25</cbc:ChargeTotalAmount>
		<cbc:PayableAmount currencyID="EUR">1656.25</cbc:PayableAmount>
	</cac:LegalMonetaryTotal>
	<cac:InvoiceLine>
		<cbc:ID>1</cbc:ID>
		<cbc:InvoicedQuantity unitCode="DAY">7</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID= "EUR">2800</cbc:LineExtensionAmount>
		<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
		<cac:OrderLineReference>
			<cbc:LineID>123</cbc:LineID>
		</cac:OrderLineReference>
		<cac:Item>
			<cbc:Description>Description of item</cbc:Description>
			<cbc:Name>item name</cbc:Name>
			<cac:StandardItemIdentification>
				<cbc:ID schemeID="0088">21382183120983</cbc:ID>
			</cac:StandardItemIdentification>
			<cac:OriginCountry>
				<cbc:IdentificationCode>NO</cbc:IdentificationCode>
			</cac:OriginCountry>
			<cac:CommodityClassification>
				<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
			</cac:CommodityClassification>
			<cac:ClassifiedTaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>25.0</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
		</cac:Item>
		<cac:Price>
			<cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
		</cac:Price>
	</cac:InvoiceLine>
	<cac:InvoiceLine>
		<cbc:ID>2</cbc:ID>
		<cbc:InvoicedQuantity unitCode="DAY">-3</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID="EUR">-1500</cbc:LineExtensionAmount>
		<cac:OrderLineReference>
			<cbc:LineID>123</cbc:LineID>
		</cac:OrderLineReference>
		<cac:Item>
			<cbc:Description>Description 2</cbc:Description>
			<cbc:Name>item name 2</cbc:Name>
			<cac:StandardItemIdentification>
				<cbc:ID schemeID="0088">21382183120983</cbc:ID>
			</cac:StandardItemIdentification>
			<cac:OriginCountry>
				<cbc:IdentificationCode>NO</cbc:IdentificationCode>
			</cac:OriginCountry>
			<cac:CommodityClassification>
				<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
			</cac:CommodityClassification>
			<cac:ClassifiedTaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>25.0</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
		</cac:Item>
		<cac:Price>
			<cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
		</cac:Price>
	</cac:InvoiceLine>
</Invoice>
```

{% endtab %}
{% endtabs %}


# InvoiceResponse

Base InvoiceResponse example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/InvoiceResponse_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ApplicationResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:invoice_response:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:invoice_response:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "imrid001"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-12-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00"
      }
    ],
    "cbc:Note": [
      {
        "_": "text"
      }
    ],
    "cac:SenderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "5798000012349",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "DK88776655",
                "$": {
                  "schemeID": "0184"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Buyer organization"
              }
            ]
          }
        ],
        "cac:Contact": [
          {
            "cbc:Name": [
              {
                "_": "Jens Jensen"
              }
            ],
            "cbc:Telephone": [
              {
                "_": "23232323"
              }
            ],
            "cbc:ElectronicMail": [
              {
                "_": "jj@test-company.dk"
              }
            ]
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "7330001000000",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Seller company"
              }
            ]
          }
        ]
      }
    ],
    "cac:DocumentResponse": [
      {
        "cac:Response": [
          {
            "cbc:ResponseCode": [
              {
                "_": "RE"
              }
            ],
            "cbc:EffectiveDate": [
              {
                "_": "2018-09-24"
              }
            ],
            "cac:Status": [
              {
                "cbc:StatusReasonCode": [
                  {
                    "_": "NOA",
                    "$": {
                      "listID": "OPStatusAction"
                    }
                  }
                ],
                "cbc:StatusReason": [
                  {
                    "_": "VAT Reference not found"
                  }
                ],
                "cac:Condition": [
                  {
                    "cbc:AttributeID": [
                      {
                        "_": "BT-48"
                      }
                    ],
                    "cbc:Description": [
                      {
                        "_": "EU123456789"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "inv021"
              }
            ],
            "cbc:IssueDate": [
              {
                "_": "2018-09-22"
              }
            ],
            "cbc:DocumentTypeCode": [
              {
                "_": "380"
              }
            ]
          }
        ],
        "cac:IssuerParty": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "123456785",
                    "$": {
                      "schemeID": "0192"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Test Company AS"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"
					 xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
					 xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:invoice_response:3</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:invoice_response:3</cbc:ProfileID>
	<cbc:ID>imrid001</cbc:ID>
	<cbc:IssueDate>2017-12-01</cbc:IssueDate>
	<cbc:IssueTime>12:00:00</cbc:IssueTime>
	<cbc:Note>text</cbc:Note>
	<cac:SenderParty>
		<cbc:EndpointID schemeID="0088">5798000012349</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0184">DK88776655</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Buyer organization</cbc:RegistrationName>
		</cac:PartyLegalEntity>
		<cac:Contact>
			<cbc:Name>Jens Jensen</cbc:Name>
			<cbc:Telephone>23232323</cbc:Telephone>
			<cbc:ElectronicMail>jj@test-company.dk</cbc:ElectronicMail>
		</cac:Contact>
	</cac:SenderParty>
	<cac:ReceiverParty>
		<cbc:EndpointID schemeID="0088">7330001000000</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0192">987654325</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Seller company</cbc:RegistrationName>
		</cac:PartyLegalEntity>
	</cac:ReceiverParty>
	<cac:DocumentResponse>
		<cac:Response>
			<cbc:ResponseCode>RE</cbc:ResponseCode>
			<cbc:EffectiveDate>2018-09-24</cbc:EffectiveDate>
			<cac:Status>
				<cbc:StatusReasonCode listID="OPStatusAction">NOA</cbc:StatusReasonCode>
				<cbc:StatusReason>VAT Reference not found</cbc:StatusReason>
				<cac:Condition>
					<cbc:AttributeID>BT-48</cbc:AttributeID>
					<cbc:Description>EU123456789</cbc:Description>
				</cac:Condition>
			</cac:Status>
		</cac:Response>
		<cac:DocumentReference>
			<cbc:ID>inv021</cbc:ID>
			<cbc:IssueDate>2018-09-22</cbc:IssueDate>
			<cbc:DocumentTypeCode>380</cbc:DocumentTypeCode>
		</cac:DocumentReference>
		<cac:IssuerParty>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0192">123456785</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>Test Company AS</cbc:Name>
			</cac:PartyName>
		</cac:IssuerParty>
	</cac:DocumentResponse>
</ApplicationResponse>
```

{% endtab %}
{% endtabs %}


# SelfBillingInvoice

Base InvoiceResponse example

Sample origin: <https://docs.peppol.eu/poacc/self-billing/3.0/>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "Invoice": {
    "$": {
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:selfbilling:3.0"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0"
      }
    ],
    "cbc:ID": [
      {
        "_": "Snippet1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-11-13"
      }
    ],
    "cbc:DueDate": [
      {
        "_": "2017-12-01"
      }
    ],
    "cbc:InvoiceTypeCode": [
      {
        "_": "389"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:AccountingCost": [
      {
        "_": "4025:123:4343"
      }
    ],
    "cbc:BuyerReference": [
      {
        "_": "0150abc"
      }
    ],
    "cac:AccountingSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "9482348239847239874",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "99887766"
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "SupplierTradingName Ltd."
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Main street 1"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Postbox 123"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "London"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "GB 123 EW"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "GB1232434"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "SupplierOfficialName Ltd"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "GB983294"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "FR23342",
                "$": {
                  "schemeID": "0002"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "FR23342",
                    "$": {
                      "schemeID": "0002"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "BuyerTradingName AS"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Hovedgatan 32"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Po box 878"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "456 34"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "SE4598375937"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Buyer Official Name"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "39937423947",
                    "$": {
                      "schemeID": "0183"
                    }
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Lisa Johnson"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "23434234"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "lj@buyer.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cbc:ActualDeliveryDate": [
          {
            "_": "2017-11-01"
          }
        ],
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "9483759475923478",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Delivery street 2"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Building 56"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "21234"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Delivery party Name"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentMeans": [
      {
        "cbc:PaymentMeansCode": [
          {
            "_": "30",
            "$": {
              "name": "Credit transfer"
            }
          }
        ],
        "cbc:PaymentID": [
          {
            "_": "Snippet1"
          }
        ],
        "cac:PayeeFinancialAccount": [
          {
            "cbc:ID": [
              {
                "_": "IBAN32423940"
              }
            ],
            "cbc:Name": [
              {
                "_": "AccountName"
              }
            ],
            "cac:FinancialInstitutionBranch": [
              {
                "cbc:ID": [
                  {
                    "_": "BIC324098"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentTerms": [
      {
        "cbc:Note": [
          {
            "_": "Payment within 10 days, 2% discount"
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Insurance"
          }
        ],
        "cbc:Amount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25.0"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "331.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxSubtotal": [
          {
            "cbc:TaxableAmount": [
              {
                "_": "1325",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:TaxAmount": [
              {
                "_": "331.25",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:TaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:LegalMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "1300",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "1325",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:InvoiceLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:InvoicedQuantity": [
          {
            "_": "7",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "2800",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:AccountingCost": [
          {
            "_": "Konteringsstreng"
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description of item"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "400",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "2"
          }
        ],
        "cbc:InvoicedQuantity": [
          {
            "_": "-3",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "-1500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description 2"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name 2"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "500",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
    xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:selfbilling:3.0</cbc:CustomizationID>
    <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0</cbc:ProfileID>
    <cbc:ID>Snippet1</cbc:ID>
    <cbc:IssueDate>2017-11-13</cbc:IssueDate>
    <cbc:DueDate>2017-12-01</cbc:DueDate>
    <cbc:InvoiceTypeCode>389</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
    <cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
    <cbc:BuyerReference>0150abc</cbc:BuyerReference>
    <cac:AccountingSupplierParty>
        <cac:Party>
            <cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
            <cac:PartyIdentification>
                <cbc:ID>99887766</cbc:ID>
            </cac:PartyIdentification>
            <cac:PartyName>
                <cbc:Name>SupplierTradingName Ltd.</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Main street 1</cbc:StreetName>
                <cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
                <cbc:CityName>London</cbc:CityName>
                <cbc:PostalZone>GB 123 EW</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>GB</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cbc:CompanyID>GB1232434</cbc:CompanyID>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
                <cbc:CompanyID>GB983294</cbc:CompanyID>
            </cac:PartyLegalEntity>
        </cac:Party>
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
        <cac:Party>
            <cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
            <cac:PartyIdentification>
                <cbc:ID schemeID="0002">FR23342</cbc:ID>
            </cac:PartyIdentification>
            <cac:PartyName>
                <cbc:Name>BuyerTradingName AS</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Hovedgatan 32</cbc:StreetName>
                <cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
                <cbc:CityName>Stockholm</cbc:CityName>
                <cbc:PostalZone>456 34</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>SE</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cbc:CompanyID>SE4598375937</cbc:CompanyID>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
                <cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
            </cac:PartyLegalEntity>
            <cac:Contact>
                <cbc:Name>Lisa Johnson</cbc:Name>
                <cbc:Telephone>23434234</cbc:Telephone>
                <cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
            </cac:Contact>
        </cac:Party>
    </cac:AccountingCustomerParty>
    <cac:Delivery>
        <cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
        <cac:DeliveryLocation>
            <cbc:ID schemeID="0088">9483759475923478</cbc:ID>
            <cac:Address>
                <cbc:StreetName>Delivery street 2</cbc:StreetName>
                <cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
                <cbc:CityName>Stockholm</cbc:CityName>
                <cbc:PostalZone>21234</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>SE</cbc:IdentificationCode>
                </cac:Country>
            </cac:Address>
        </cac:DeliveryLocation>
        <cac:DeliveryParty>
            <cac:PartyName>
                <cbc:Name>Delivery party Name</cbc:Name>
            </cac:PartyName>
        </cac:DeliveryParty>
    </cac:Delivery>
    <cac:PaymentMeans>
        <cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
        <cbc:PaymentID>Snippet1</cbc:PaymentID>
        <cac:PayeeFinancialAccount>
            <cbc:ID>IBAN32423940</cbc:ID>
            <cbc:Name>AccountName</cbc:Name>
            <cac:FinancialInstitutionBranch>
                <cbc:ID>BIC324098</cbc:ID>
            </cac:FinancialInstitutionBranch>
        </cac:PayeeFinancialAccount>
    </cac:PaymentMeans>
    <cac:PaymentTerms>
        <cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
    </cac:PaymentTerms>
        <cac:AllowanceCharge>
            <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
            <cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
            <cbc:Amount currencyID="EUR">25</cbc:Amount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:AllowanceCharge>
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
        <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="EUR">1325</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
        <cbc:LineExtensionAmount currencyID="EUR">1300</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="EUR">1325</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="EUR">1656.25</cbc:TaxInclusiveAmount>
        <cbc:ChargeTotalAmount currencyID="EUR">25</cbc:ChargeTotalAmount>
        <cbc:PayableAmount currencyID="EUR">1656.25</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    
<cac:InvoiceLine>
        <cbc:ID>1</cbc:ID>
    <cbc:InvoicedQuantity unitCode="DAY">7</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID= "EUR">2800</cbc:LineExtensionAmount>
        <cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
       <cac:OrderLineReference>
            <cbc:LineID>123</cbc:LineID>
        </cac:OrderLineReference>
    <cac:Item>
            <cbc:Description>Description of item</cbc:Description>
            <cbc:Name>item name</cbc:Name>
            <cac:StandardItemIdentification>
                <cbc:ID schemeID="0088">21382183120983</cbc:ID>
            </cac:StandardItemIdentification>
            <cac:OriginCountry>
                <cbc:IdentificationCode>NO</cbc:IdentificationCode>
            </cac:OriginCountry>
            <cac:CommodityClassification>
                <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
            </cac:CommodityClassification>
            <cac:ClassifiedTaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:ClassifiedTaxCategory>
        </cac:Item>
    <cac:Price>
        <cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
    </cac:Price>
    </cac:InvoiceLine>
<cac:InvoiceLine>
    <cbc:ID>2</cbc:ID>
    <cbc:InvoicedQuantity unitCode="DAY">-3</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">-1500</cbc:LineExtensionAmount>
    <cac:OrderLineReference>
        <cbc:LineID>123</cbc:LineID>
    </cac:OrderLineReference>
    <cac:Item>
        <cbc:Description>Description 2</cbc:Description>
        <cbc:Name>item name 2</cbc:Name>
        <cac:StandardItemIdentification>
            <cbc:ID schemeID="0088">21382183120983</cbc:ID>
        </cac:StandardItemIdentification>
        <cac:OriginCountry>
            <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:OriginCountry>
        <cac:CommodityClassification>
            <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
        </cac:CommodityClassification>
        <cac:ClassifiedTaxCategory>
            <cbc:ID>S</cbc:ID>
            <cbc:Percent>25.0</cbc:Percent>
            <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
        <cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
    </cac:Price>
</cac:InvoiceLine>
</Invoice>

```

{% endtab %}
{% endtabs %}


# CreditNote

Base CreditNote example

Sample origin: <https://github.com/OpenPEPPOL/peppol-bis-invoice-3/blob/master/rules/examples/base-creditnote-correction.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "CreditNote": {
    "$": {
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
      }
    ],
    "cbc:ID": [
      {
        "_": "Snippet1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-11-13"
      }
    ],
    "cbc:CreditNoteTypeCode": [
      {
        "_": "381"
      }
    ],
    "cbc:Note": [
      {
        "_": "Please note we have a new phone number: 22 22 22 22"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:AccountingCost": [
      {
        "_": "4025:123:4343"
      }
    ],
    "cbc:BuyerReference": [
      {
        "_": "0150abc"
      }
    ],
    "cac:BillingReference": [
      {
        "cac:InvoiceDocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "Snippet1"
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "9482348239847239874",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "99887766"
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "SupplierTradingName Ltd."
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Main street 1"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Postbox 123"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "London"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "GB 123 EW"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "GB1232434"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "SupplierOfficialName Ltd"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "GB983294"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "FR23342",
                "$": {
                  "schemeID": "0002"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "FR23342",
                    "$": {
                      "schemeID": "0002"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "BuyerTradingName AS"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Hovedgatan 32"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Po box 878"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "456 34"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "SE4598375937"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Buyer Official Name"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "39937423947",
                    "$": {
                      "schemeID": "0183"
                    }
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Lisa Johnson"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "23434234"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "lj@buyer.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cbc:ActualDeliveryDate": [
          {
            "_": "2017-11-01"
          }
        ],
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "9483759475923478",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Delivery street 2"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Building 56"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "21234"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Delivery party Name"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentMeans": [
      {
        "cbc:PaymentMeansCode": [
          {
            "_": "30",
            "$": {
              "name": "Credit transfer"
            }
          }
        ],
        "cbc:PaymentID": [
          {
            "_": "Snippet1"
          }
        ],
        "cac:PayeeFinancialAccount": [
          {
            "cbc:ID": [
              {
                "_": "IBAN32423940"
              }
            ],
            "cbc:Name": [
              {
                "_": "AccountName"
              }
            ],
            "cac:FinancialInstitutionBranch": [
              {
                "cbc:ID": [
                  {
                    "_": "BIC324098"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentTerms": [
      {
        "cbc:Note": [
          {
            "_": "Payment within 10 days, 2% discount"
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Insurance"
          }
        ],
        "cbc:Amount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25.0"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "331.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxSubtotal": [
          {
            "cbc:TaxableAmount": [
              {
                "_": "1325",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:TaxAmount": [
              {
                "_": "331.25",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:TaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:LegalMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "1300",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "1325",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:CreditNoteLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:CreditedQuantity": [
          {
            "_": "7",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "2800",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:AccountingCost": [
          {
            "_": "Konteringsstreng"
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description of item"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "400",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "2"
          }
        ],
        "cbc:CreditedQuantity": [
          {
            "_": "-3",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "-1500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description 2"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name 2"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "500",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<CreditNote xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
  <cbc:ID>Snippet1</cbc:ID>
  <cbc:IssueDate>2017-11-13</cbc:IssueDate>
  <cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
  <cbc:Note>Please note we have a new phone number: 22 22 22 22</cbc:Note>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
  <cbc:BuyerReference>0150abc</cbc:BuyerReference>
  <cac:BillingReference>
    <cac:InvoiceDocumentReference>
      <cbc:ID>Snippet1</cbc:ID>
    </cac:InvoiceDocumentReference>
  </cac:BillingReference>
  <cac:AccountingSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID>99887766</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>SupplierTradingName Ltd.</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Main street 1</cbc:StreetName>
        <cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
        <cbc:CityName>London</cbc:CityName>
        <cbc:PostalZone>GB 123 EW</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>GB1232434</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
        <cbc:CompanyID>GB983294</cbc:CompanyID>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingSupplierParty>
  <cac:AccountingCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0002">FR23342</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>BuyerTradingName AS</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Hovedgatan 32</cbc:StreetName>
        <cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
        <cbc:CityName>Stockholm</cbc:CityName>
        <cbc:PostalZone>456 34</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>SE</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>SE4598375937</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
        <cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
      </cac:PartyLegalEntity>
      <cac:Contact>
        <cbc:Name>Lisa Johnson</cbc:Name>
        <cbc:Telephone>23434234</cbc:Telephone>
        <cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:AccountingCustomerParty>
  <cac:Delivery>
    <cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
    <cac:DeliveryLocation>
      <cbc:ID schemeID="0088">9483759475923478</cbc:ID>
      <cac:Address>
        <cbc:StreetName>Delivery street 2</cbc:StreetName>
        <cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
        <cbc:CityName>Stockholm</cbc:CityName>
        <cbc:PostalZone>21234</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>SE</cbc:IdentificationCode>
        </cac:Country>
      </cac:Address>
    </cac:DeliveryLocation>
    <cac:DeliveryParty>
      <cac:PartyName>
        <cbc:Name>Delivery party Name</cbc:Name>
      </cac:PartyName>
    </cac:DeliveryParty>
  </cac:Delivery>
  <cac:PaymentMeans>
    <cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
    <cbc:PaymentID>Snippet1</cbc:PaymentID>
    <cac:PayeeFinancialAccount>
      <cbc:ID>IBAN32423940</cbc:ID>
      <cbc:Name>AccountName</cbc:Name>
      <cac:FinancialInstitutionBranch>
        <cbc:ID>BIC324098</cbc:ID>
      </cac:FinancialInstitutionBranch>
    </cac:PayeeFinancialAccount>
  </cac:PaymentMeans>
  <cac:PaymentTerms>
    <cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
  </cac:PaymentTerms>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
    <cbc:Amount currencyID="EUR">25</cbc:Amount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>25.0</cbc:Percent>
      <cac:TaxScheme>
        <cbc:ID>VAT</cbc:ID>
      </cac:TaxScheme>
    </cac:TaxCategory>
  </cac:AllowanceCharge>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="EUR">1325</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
      <cac:TaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>25.0</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="EUR">1300</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="EUR">1325</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="EUR">1656.25</cbc:TaxInclusiveAmount>
    <cbc:ChargeTotalAmount currencyID="EUR">25</cbc:ChargeTotalAmount>
    <cbc:PayableAmount currencyID="EUR">1656.25</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>

  <cac:CreditNoteLine>
    <cbc:ID>1</cbc:ID>
    <cbc:CreditedQuantity unitCode="DAY">7</cbc:CreditedQuantity>
    <cbc:LineExtensionAmount currencyID= "EUR">2800</cbc:LineExtensionAmount>
    <cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
    <cac:OrderLineReference>
      <cbc:LineID>123</cbc:LineID>
    </cac:OrderLineReference>
    <cac:Item>
      <cbc:Description>Description of item</cbc:Description>
      <cbc:Name>item name</cbc:Name>
      <cac:StandardItemIdentification>
        <cbc:ID schemeID="0088">21382183120983</cbc:ID>
      </cac:StandardItemIdentification>
      <cac:OriginCountry>
        <cbc:IdentificationCode>NO</cbc:IdentificationCode>
      </cac:OriginCountry>
      <cac:CommodityClassification>
        <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
      </cac:CommodityClassification>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>25.0</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
    </cac:Price>
  </cac:CreditNoteLine>
  <cac:CreditNoteLine>
    <cbc:ID>2</cbc:ID>
    <cbc:CreditedQuantity unitCode="DAY">-3</cbc:CreditedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">-1500</cbc:LineExtensionAmount>
    <cac:OrderLineReference>
      <cbc:LineID>123</cbc:LineID>
    </cac:OrderLineReference>
    <cac:Item>
      <cbc:Description>Description 2</cbc:Description>
      <cbc:Name>item name 2</cbc:Name>
      <cac:StandardItemIdentification>
        <cbc:ID schemeID="0088">21382183120983</cbc:ID>
      </cac:StandardItemIdentification>
      <cac:OriginCountry>
        <cbc:IdentificationCode>NO</cbc:IdentificationCode>
      </cac:OriginCountry>
      <cac:CommodityClassification>
        <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
      </cac:CommodityClassification>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>25.0</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
    </cac:Price>
  </cac:CreditNoteLine>
</CreditNote>
```

{% endtab %}
{% endtabs %}


# SelfBillingCreditNote

Base CreditNote example

Sample origin: <https://docs.peppol.eu/poacc/self-billing/3.0/>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "CreditNote": {
    "$": {
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:selfbilling:3.0"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0"
      }
    ],
    "cbc:ID": [
      {
        "_": "Snippet1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-11-13"
      }
    ],
    "cbc:CreditNoteTypeCode": [
      {
        "_": "261"
      }
    ],
    "cbc:Note": [
      {
        "_": "Please note we have a new phone number: 22 22 22 22"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:AccountingCost": [
      {
        "_": "4025:123:4343"
      }
    ],
    "cbc:BuyerReference": [
      {
        "_": "0150abc"
      }
    ],
    "cac:BillingReference": [
      {
        "cac:InvoiceDocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "Snippet1"
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "9482348239847239874",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "99887766"
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "SupplierTradingName Ltd."
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Main street 1"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Postbox 123"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "London"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "GB 123 EW"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "GB1232434"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "SupplierOfficialName Ltd"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "GB983294"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "FR23342",
                "$": {
                  "schemeID": "0002"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "FR23342",
                    "$": {
                      "schemeID": "0002"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "BuyerTradingName AS"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Hovedgatan 32"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Po box 878"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "456 34"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "SE4598375937"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Buyer Official Name"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "39937423947",
                    "$": {
                      "schemeID": "0183"
                    }
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Lisa Johnson"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "23434234"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "lj@buyer.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cbc:ActualDeliveryDate": [
          {
            "_": "2017-11-01"
          }
        ],
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "9483759475923478",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Delivery street 2"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Building 56"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "21234"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Delivery party Name"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentMeans": [
      {
        "cbc:PaymentMeansCode": [
          {
            "_": "30",
            "$": {
              "name": "Credit transfer"
            }
          }
        ],
        "cbc:PaymentID": [
          {
            "_": "Snippet1"
          }
        ],
        "cac:PayeeFinancialAccount": [
          {
            "cbc:ID": [
              {
                "_": "IBAN32423940"
              }
            ],
            "cbc:Name": [
              {
                "_": "AccountName"
              }
            ],
            "cac:FinancialInstitutionBranch": [
              {
                "cbc:ID": [
                  {
                    "_": "BIC324098"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentTerms": [
      {
        "cbc:Note": [
          {
            "_": "Payment within 10 days, 2% discount"
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Insurance"
          }
        ],
        "cbc:Amount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25.0"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "331.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxSubtotal": [
          {
            "cbc:TaxableAmount": [
              {
                "_": "1325",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:TaxAmount": [
              {
                "_": "331.25",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:TaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:LegalMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "1300",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "1325",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "1656.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:CreditNoteLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:CreditedQuantity": [
          {
            "_": "7",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "2800",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:AccountingCost": [
          {
            "_": "Konteringsstreng"
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description of item"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "400",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "2"
          }
        ],
        "cbc:CreditedQuantity": [
          {
            "_": "-3",
            "$": {
              "unitCode": "DAY"
            }
          }
        ],
        "cbc:LineExtensionAmount": [
          {
            "_": "-1500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "123"
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Description 2"
              }
            ],
            "cbc:Name": [
              {
                "_": "item name 2"
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "21382183120983",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "09348023",
                    "$": {
                      "listID": "SRV"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25.0"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Price": [
          {
            "cbc:PriceAmount": [
              {
                "_": "500",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<CreditNote xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
    xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2">
    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:selfbilling:3.0</cbc:CustomizationID>
    <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0</cbc:ProfileID>
    <cbc:ID>Snippet1</cbc:ID>
    <cbc:IssueDate>2017-11-13</cbc:IssueDate>
    <cbc:CreditNoteTypeCode>261</cbc:CreditNoteTypeCode>
    <cbc:Note>Please note we have a new phone number: 22 22 22 22</cbc:Note>
    <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
    <cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
    <cbc:BuyerReference>0150abc</cbc:BuyerReference>
    <cac:BillingReference>
        <cac:InvoiceDocumentReference>
            <cbc:ID>Snippet1</cbc:ID>
        </cac:InvoiceDocumentReference>
    </cac:BillingReference>
    <cac:AccountingSupplierParty>
        <cac:Party>
            <cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
            <cac:PartyIdentification>
                <cbc:ID>99887766</cbc:ID>
            </cac:PartyIdentification>
            <cac:PartyName>
                <cbc:Name>SupplierTradingName Ltd.</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Main street 1</cbc:StreetName>
                <cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
                <cbc:CityName>London</cbc:CityName>
                <cbc:PostalZone>GB 123 EW</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>GB</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cbc:CompanyID>GB1232434</cbc:CompanyID>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
                <cbc:CompanyID>GB983294</cbc:CompanyID>
            </cac:PartyLegalEntity>
        </cac:Party>
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
        <cac:Party>
            <cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
            <cac:PartyIdentification>
                <cbc:ID schemeID="0002">FR23342</cbc:ID>
            </cac:PartyIdentification>
            <cac:PartyName>
                <cbc:Name>BuyerTradingName AS</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Hovedgatan 32</cbc:StreetName>
                <cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
                <cbc:CityName>Stockholm</cbc:CityName>
                <cbc:PostalZone>456 34</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>SE</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cbc:CompanyID>SE4598375937</cbc:CompanyID>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
                <cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
            </cac:PartyLegalEntity>
            <cac:Contact>
                <cbc:Name>Lisa Johnson</cbc:Name>
                <cbc:Telephone>23434234</cbc:Telephone>
                <cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
            </cac:Contact>
        </cac:Party>
    </cac:AccountingCustomerParty>
    <cac:Delivery>
        <cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
        <cac:DeliveryLocation>
            <cbc:ID schemeID="0088">9483759475923478</cbc:ID>
            <cac:Address>
                <cbc:StreetName>Delivery street 2</cbc:StreetName>
                <cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
                <cbc:CityName>Stockholm</cbc:CityName>
                <cbc:PostalZone>21234</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>SE</cbc:IdentificationCode>
                </cac:Country>
            </cac:Address>
        </cac:DeliveryLocation>
        <cac:DeliveryParty>
            <cac:PartyName>
                <cbc:Name>Delivery party Name</cbc:Name>
            </cac:PartyName>
        </cac:DeliveryParty>
    </cac:Delivery>
    <cac:PaymentMeans>
        <cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
        <cbc:PaymentID>Snippet1</cbc:PaymentID>
        <cac:PayeeFinancialAccount>
            <cbc:ID>IBAN32423940</cbc:ID>
            <cbc:Name>AccountName</cbc:Name>
            <cac:FinancialInstitutionBranch>
                <cbc:ID>BIC324098</cbc:ID>
            </cac:FinancialInstitutionBranch>
        </cac:PayeeFinancialAccount>
    </cac:PaymentMeans>
    <cac:PaymentTerms>
        <cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
    </cac:PaymentTerms>
        <cac:AllowanceCharge>
            <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
            <cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
            <cbc:Amount currencyID="EUR">25</cbc:Amount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:AllowanceCharge>
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
        <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="EUR">1325</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
        <cbc:LineExtensionAmount currencyID="EUR">1300</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="EUR">1325</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="EUR">1656.25</cbc:TaxInclusiveAmount>
        <cbc:ChargeTotalAmount currencyID="EUR">25</cbc:ChargeTotalAmount>
        <cbc:PayableAmount currencyID="EUR">1656.25</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    
<cac:CreditNoteLine>
        <cbc:ID>1</cbc:ID>
    <cbc:CreditedQuantity unitCode="DAY">7</cbc:CreditedQuantity>
    <cbc:LineExtensionAmount currencyID= "EUR">2800</cbc:LineExtensionAmount>
        <cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
       <cac:OrderLineReference>
            <cbc:LineID>123</cbc:LineID>
        </cac:OrderLineReference>
    <cac:Item>
            <cbc:Description>Description of item</cbc:Description>
            <cbc:Name>item name</cbc:Name>
            <cac:StandardItemIdentification>
                <cbc:ID schemeID="0088">21382183120983</cbc:ID>
            </cac:StandardItemIdentification>
            <cac:OriginCountry>
                <cbc:IdentificationCode>NO</cbc:IdentificationCode>
            </cac:OriginCountry>
            <cac:CommodityClassification>
                <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
            </cac:CommodityClassification>
            <cac:ClassifiedTaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>25.0</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:ClassifiedTaxCategory>
        </cac:Item>
    <cac:Price>
        <cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
    </cac:Price>
    </cac:CreditNoteLine>
<cac:CreditNoteLine>
    <cbc:ID>2</cbc:ID>
    <cbc:CreditedQuantity unitCode="DAY">-3</cbc:CreditedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">-1500</cbc:LineExtensionAmount>
    <cac:OrderLineReference>
        <cbc:LineID>123</cbc:LineID>
    </cac:OrderLineReference>
    <cac:Item>
        <cbc:Description>Description 2</cbc:Description>
        <cbc:Name>item name 2</cbc:Name>
        <cac:StandardItemIdentification>
            <cbc:ID schemeID="0088">21382183120983</cbc:ID>
        </cac:StandardItemIdentification>
        <cac:OriginCountry>
            <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:OriginCountry>
        <cac:CommodityClassification>
            <cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
        </cac:CommodityClassification>
        <cac:ClassifiedTaxCategory>
            <cbc:ID>S</cbc:ID>
            <cbc:Percent>25.0</cbc:Percent>
            <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
        <cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
    </cac:Price>
</cac:CreditNoteLine>
</CreditNote>

```

{% endtab %}
{% endtabs %}


# Order

Base Order example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/Order_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "Order": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:Order-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:order:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:order_only:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "34"
      }
    ],
    "cbc:SalesOrderID": [
      {
        "_": "112233"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2018-09-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:30:00"
      }
    ],
    "cbc:OrderTypeCode": [
      {
        "_": "220"
      }
    ],
    "cbc:Note": [
      {
        "_": "Information text for the whole order"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "NOK"
      }
    ],
    "cbc:CustomerReference": [
      {
        "_": "9000012345"
      }
    ],
    "cbc:AccountingCost": [
      {
        "_": "Project123"
      }
    ],
    "cac:ValidityPeriod": [
      {
        "cbc:EndDate": [
          {
            "_": "2013-01-31"
          }
        ]
      }
    ],
    "cac:QuotationDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "QuoteID123"
          }
        ]
      }
    ],
    "cac:OrderDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "RjectedOrderID123"
          }
        ]
      }
    ],
    "cac:OriginatorDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "MAFO"
          }
        ]
      }
    ],
    "cac:CatalogueReference": [
      {
        "cbc:ID": [
          {
            "_": "Cat2023-03-07"
          }
        ]
      }
    ],
    "cac:AdditionalDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "Doc1"
          }
        ],
        "cbc:DocumentType": [
          {
            "_": "Timesheet"
          }
        ],
        "cac:Attachment": [
          {
            "cac:ExternalReference": [
              {
                "cbc:URI": [
                  {
                    "_": "http://www.suppliersite.eu/sheet001.html"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "Doc2"
          }
        ],
        "cbc:DocumentType": [
          {
            "_": "Drawing"
          }
        ],
        "cac:Attachment": [
          {
            "cbc:EmbeddedDocumentBinaryObject": [
              {
                "_": "UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi\n      ",
                "$": {
                  "mimeCode": "application/pdf",
                  "filename": "Hours-spend.csv"
                }
              }
            ]
          }
        ]
      }
    ],
    "cac:Contract": [
      {
        "cbc:ID": [
          {
            "_": "34322"
          }
        ]
      }
    ],
    "cac:ProjectReference": [
      {
        "cbc:ID": [
          {
            "_": "PID33"
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "7300010000001",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Helseforetak"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Sinsenveien 40"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Oppgang B"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0501"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "NO9311867455MVA"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Helseforetak AS"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "931186755",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ],
                "cac:RegistrationAddress": [
                  {
                    "cbc:CityName": [
                      {
                        "_": "Oslo"
                      }
                    ],
                    "cac:Country": [
                      {
                        "cbc:IdentificationCode": [
                          {
                            "_": "NO"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Ole Olsen"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "23055000"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "post@helseforetak.no"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "123456785",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "7300010000001",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Medical"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Storgt. 12"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "4. etasje"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0585"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Medical AS"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "123456789",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ],
                "cac:RegistrationAddress": [
                  {
                    "cbc:CityName": [
                      {
                        "_": "Oslo"
                      }
                    ],
                    "cac:Country": [
                      {
                        "cbc:IdentificationCode": [
                          {
                            "_": "NO"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Nils Nilsen"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "22150510"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "post@medical.no"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:OriginatorCustomerParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "7300010000001",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Helseavdeling"
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Julie Jensen"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "67915012"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "post@helse.no"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "7300010000001",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Accounting"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Sinsenveien 42"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Oppgang A"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0501"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyTaxScheme": [
              {
                "cbc:CompanyID": [
                  {
                    "_": "NO9311867455MVA"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Helseforetak AS"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "931186723",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ],
                "cac:RegistrationAddress": [
                  {
                    "cbc:CityName": [
                      {
                        "_": "Oslo"
                      }
                    ],
                    "cac:Country": [
                      {
                        "cbc:IdentificationCode": [
                          {
                            "_": "NO"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "7300010000001",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Solheimsveien 10"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Add"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Lørenskog"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "1473"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "3rd Address line"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:RequestedDeliveryPeriod": [
          {
            "cbc:StartDate": [
              {
                "_": "2012-10-10"
              }
            ],
            "cbc:StartTime": [
              {
                "_": "12:30:00"
              }
            ],
            "cbc:EndDate": [
              {
                "_": "2012-10-20"
              }
            ],
            "cbc:EndTime": [
              {
                "_": "18:00:00"
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "13691234",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Helseavdeling"
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Ole"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "987098709"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "ole@helseforetak.no"
                  }
                ]
              }
            ]
          }
        ],
        "cac:Shipment": [
          {
            "cbc:ID": [
              {
                "_": "NA"
              }
            ],
            "cbc:ShippingPriorityLevelCode": [
              {
                "_": "1"
              }
            ]
          }
        ]
      }
    ],
    "cac:DeliveryTerms": [
      {
        "cbc:ID": [
          {
            "_": "FOB"
          }
        ],
        "cbc:SpecialTerms": [
          {
            "_": "CAD"
          }
        ],
        "cac:DeliveryLocation": [
          {
            "cbc:ID": [
              {
                "_": "FOB Oslo"
              }
            ]
          }
        ]
      }
    ],
    "cac:PaymentTerms": [
      {
        "cbc:Note": [
          {
            "_": "Payment terms description"
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReasonCode": [
          {
            "_": "ABK"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Miscellaneous services"
          }
        ],
        "cbc:Amount": [
          {
            "_": "400.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "Z"
              }
            ],
            "cbc:Percent": [
              {
                "_": "0"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cbc:ChargeIndicator": [
          {
            "_": "false"
          }
        ],
        "cbc:AllowanceChargeReasonCode": [
          {
            "_": "95"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Discount"
          }
        ],
        "cbc:MultiplierFactorNumeric": [
          {
            "_": "10"
          }
        ],
        "cbc:Amount": [
          {
            "_": "652.50",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:BaseAmount": [
          {
            "_": "6525.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "100.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ]
      }
    ],
    "cac:AnticipatedMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "6525.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "6272.50",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "6372.50",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:AllowanceTotalAmount": [
          {
            "_": "652.50",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "400.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:PrepaidAmount": [
          {
            "_": "10.00",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:PayableRoundingAmount": [
          {
            "_": "0.50",
            "$": {
              "currencyID": "NOK"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "6363",
            "$": {
              "currencyID": "NOK"
            }
          }
        ]
      }
    ],
    "cac:OrderLine": [
      {
        "cbc:Note": [
          {
            "_": "Freetext note on line 1"
          }
        ],
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "120",
                "$": {
                  "unitCode": "EA"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "6300.00",
                "$": {
                  "currencyID": "NOK"
                }
              }
            ],
            "cbc:PartialDeliveryIndicator": [
              {
                "_": "false"
              }
            ],
            "cbc:AccountingCost": [
              {
                "_": "12345678"
              }
            ],
            "cac:Delivery": [
              {
                "cac:RequestedDeliveryPeriod": [
                  {
                    "cbc:StartDate": [
                      {
                        "_": "2010-02-10"
                      }
                    ],
                    "cbc:StartTime": [
                      {
                        "_": "12:30:00"
                      }
                    ],
                    "cbc:EndDate": [
                      {
                        "_": "2010-02-25"
                      }
                    ],
                    "cbc:EndTime": [
                      {
                        "_": "18:00:00"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:OriginatorParty": [
              {
                "cac:PartyIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "1234567890",
                        "$": {
                          "schemeID": "0082"
                        }
                      }
                    ]
                  }
                ],
                "cac:PartyName": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Josef K."
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:AllowanceCharge": [
              {
                "cbc:ChargeIndicator": [
                  {
                    "_": "true"
                  }
                ],
                "cbc:AllowanceChargeReasonCode": [
                  {
                    "_": "ABK"
                  }
                ],
                "cbc:AllowanceChargeReason": [
                  {
                    "_": "Miscellaneous services"
                  }
                ],
                "cbc:Amount": [
                  {
                    "_": "600.00",
                    "$": {
                      "currencyID": "NOK"
                    }
                  }
                ]
              },
              {
                "cbc:ChargeIndicator": [
                  {
                    "_": "false"
                  }
                ],
                "cbc:AllowanceChargeReasonCode": [
                  {
                    "_": "95"
                  }
                ],
                "cbc:AllowanceChargeReason": [
                  {
                    "_": "Discount"
                  }
                ],
                "cbc:MultiplierFactorNumeric": [
                  {
                    "_": "5"
                  }
                ],
                "cbc:Amount": [
                  {
                    "_": "300.00",
                    "$": {
                      "currencyID": "NOK"
                    }
                  }
                ],
                "cbc:BaseAmount": [
                  {
                    "_": "6000.00",
                    "$": {
                      "currencyID": "NOK"
                    }
                  }
                ]
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "50.000",
                    "$": {
                      "currencyID": "NOK"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "EA"
                    }
                  }
                ],
                "cac:AllowanceCharge": [
                  {
                    "cbc:ChargeIndicator": [
                      {
                        "_": "false"
                      }
                    ],
                    "cbc:Amount": [
                      {
                        "_": "10.00",
                        "$": {
                          "currencyID": "NOK"
                        }
                      }
                    ],
                    "cbc:BaseAmount": [
                      {
                        "_": "60.00",
                        "$": {
                          "currencyID": "NOK"
                        }
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Description": [
                  {
                    "_": "Needle 4mm"
                  }
                ],
                "cbc:Name": [
                  {
                    "_": "Needle 4mm"
                  }
                ],
                "cac:BuyersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "123456"
                      }
                    ]
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "121212"
                      }
                    ]
                  }
                ],
                "cac:ManufacturersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "manid659"
                      }
                    ]
                  }
                ],
                "cac:StandardItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "7560000012345",
                        "$": {
                          "schemeID": "0160"
                        }
                      }
                    ]
                  }
                ],
                "cac:ItemSpecificationDocumentReference": [
                  {
                    "cbc:ID": [
                      {
                        "_": "12345678"
                      }
                    ]
                  }
                ],
                "cac:CommodityClassification": [
                  {
                    "cbc:ItemClassificationCode": [
                      {
                        "_": "12345678",
                        "$": {
                          "listID": "MP",
                          "listVersionID": "19.0501"
                        }
                      }
                    ]
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "25"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ],
                "cac:AdditionalItemProperty": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Length"
                      }
                    ],
                    "cbc:Value": [
                      {
                        "_": "30 mm"
                      }
                    ],
                    "cbc:ValueQuantity": [
                      {
                        "_": "30",
                        "$": {
                          "unitCode": "C62"
                        }
                      }
                    ],
                    "cbc:ValueQualifier": [
                      {
                        "_": "descr"
                      }
                    ]
                  }
                ],
                "cac:ItemInstance": [
                  {
                    "cbc:SerialID": [
                      {
                        "_": "SE-123456"
                      }
                    ],
                    "cac:LotIdentification": [
                      {
                        "cbc:LotNumberID": [
                          {
                            "_": "LO-123456"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cbc:Note": [
          {
            "_": "Freetext note on line 2"
          }
        ],
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "2"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "15",
                "$": {
                  "unitCode": "EA"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "225.00",
                "$": {
                  "currencyID": "NOK"
                }
              }
            ],
            "cbc:PartialDeliveryIndicator": [
              {
                "_": "true"
              }
            ],
            "cbc:AccountingCost": [
              {
                "_": "ProjectID123"
              }
            ],
            "cac:Delivery": [
              {
                "cac:RequestedDeliveryPeriod": [
                  {
                    "cbc:StartDate": [
                      {
                        "_": "2012-10-15"
                      }
                    ],
                    "cbc:EndDate": [
                      {
                        "_": "2012-10-31"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:OriginatorParty": [
              {
                "cac:PartyIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "1234567890",
                        "$": {
                          "schemeID": "0082"
                        }
                      }
                    ]
                  }
                ],
                "cac:PartyName": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Josef K."
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "15.000",
                    "$": {
                      "currencyID": "NOK"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "EA"
                    }
                  }
                ],
                "cac:AllowanceCharge": [
                  {
                    "cbc:ChargeIndicator": [
                      {
                        "_": "false"
                      }
                    ],
                    "cbc:Amount": [
                      {
                        "_": "100.0000",
                        "$": {
                          "currencyID": "NOK"
                        }
                      }
                    ],
                    "cbc:BaseAmount": [
                      {
                        "_": "115.0000",
                        "$": {
                          "currencyID": "NOK"
                        }
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Description": [
                  {
                    "_": "Wet tissues for children"
                  }
                ],
                "cbc:Name": [
                  {
                    "_": "Wet tissues"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SItemNo011"
                      }
                    ]
                  }
                ],
                "cac:CommodityClassification": [
                  {
                    "cbc:ItemClassificationCode": [
                      {
                        "_": "56789123",
                        "$": {
                          "listID": "MP",
                          "listVersionID": "19.0501"
                        }
                      }
                    ]
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "25"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ],
                "cac:AdditionalItemProperty": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Weight"
                      }
                    ],
                    "cbc:Value": [
                      {
                        "_": "100 g"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Order xmlns="urn:oasis:names:specification:ubl:schema:xsd:Order-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:order:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:order_only:3</cbc:ProfileID>
  <cbc:ID>34</cbc:ID>
  <cbc:SalesOrderID>112233</cbc:SalesOrderID>
  <cbc:IssueDate>2018-09-01</cbc:IssueDate>
  <cbc:IssueTime>12:30:00</cbc:IssueTime>
  <cbc:OrderTypeCode>220</cbc:OrderTypeCode>
  <cbc:Note>Information text for the whole order</cbc:Note>
  <cbc:DocumentCurrencyCode>NOK</cbc:DocumentCurrencyCode>
  <cbc:CustomerReference>9000012345</cbc:CustomerReference>
  <cbc:AccountingCost>Project123</cbc:AccountingCost>
  <cac:ValidityPeriod>
    <cbc:EndDate>2013-01-31</cbc:EndDate>
  </cac:ValidityPeriod>
  <cac:QuotationDocumentReference>
    <cbc:ID>QuoteID123</cbc:ID>
  </cac:QuotationDocumentReference>
  <cac:OrderDocumentReference>
    <cbc:ID>RjectedOrderID123</cbc:ID>
  </cac:OrderDocumentReference>
  <cac:OriginatorDocumentReference>
    <cbc:ID>MAFO</cbc:ID>
  </cac:OriginatorDocumentReference>
  <cac:CatalogueReference>
    <cbc:ID>Cat2023-03-07</cbc:ID>
  </cac:CatalogueReference>
  <cac:AdditionalDocumentReference>
    <cbc:ID>Doc1</cbc:ID>
    <cbc:DocumentType>Timesheet</cbc:DocumentType>
    <cac:Attachment>
      <cac:ExternalReference>
        <cbc:URI>http://www.suppliersite.eu/sheet001.html</cbc:URI>
      </cac:ExternalReference>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  <cac:AdditionalDocumentReference>
    <cbc:ID>Doc2</cbc:ID>
    <cbc:DocumentType>Drawing</cbc:DocumentType>
    <cac:Attachment>
      <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="Hours-spend.csv">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi
      </cbc:EmbeddedDocumentBinaryObject>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  <cac:Contract>
    <cbc:ID>34322</cbc:ID>
  </cac:Contract>
  <cac:ProjectReference>
    <cbc:ID>PID33</cbc:ID>
  </cac:ProjectReference>
  <cac:BuyerCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Helseforetak</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Sinsenveien 40</cbc:StreetName>
        <cbc:AdditionalStreetName>Oppgang B</cbc:AdditionalStreetName>
        <cbc:CityName>Oslo</cbc:CityName>
        <cbc:PostalZone>0501</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>Address Line 3</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>NO9311867455MVA</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Helseforetak AS</cbc:RegistrationName>
        <cbc:CompanyID schemeID="0082">931186755</cbc:CompanyID>
        <cac:RegistrationAddress>
          <cbc:CityName>Oslo</cbc:CityName>
          <cac:Country>
            <cbc:IdentificationCode>NO</cbc:IdentificationCode>
          </cac:Country>
        </cac:RegistrationAddress>
      </cac:PartyLegalEntity>
      <cac:Contact>
        <cbc:Name>Ole Olsen</cbc:Name>
        <cbc:Telephone>23055000</cbc:Telephone>
        <cbc:ElectronicMail>post@helseforetak.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:BuyerCustomerParty>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0192">123456785</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Medical</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Storgt. 12</cbc:StreetName>
        <cbc:AdditionalStreetName>4. etasje</cbc:AdditionalStreetName>
        <cbc:CityName>Oslo</cbc:CityName>
        <cbc:PostalZone>0585</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>Address Line 3</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Medical AS</cbc:RegistrationName>
        <cbc:CompanyID schemeID="0082">123456789</cbc:CompanyID>
        <cac:RegistrationAddress>
          <cbc:CityName>Oslo</cbc:CityName>
          <cac:Country>
            <cbc:IdentificationCode>NO</cbc:IdentificationCode>
          </cac:Country>
        </cac:RegistrationAddress>
      </cac:PartyLegalEntity>
      <cac:Contact>
        <cbc:Name>Nils Nilsen</cbc:Name>
        <cbc:Telephone>22150510</cbc:Telephone>
        <cbc:ElectronicMail>post@medical.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:SellerSupplierParty>
  <cac:OriginatorCustomerParty>
    <cac:Party>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Helseavdeling</cbc:Name>
      </cac:PartyName>
      <cac:Contact>
        <cbc:Name>Julie Jensen</cbc:Name>
        <cbc:Telephone>67915012</cbc:Telephone>
        <cbc:ElectronicMail>post@helse.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:OriginatorCustomerParty>
  <cac:AccountingCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Accounting</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Sinsenveien 42</cbc:StreetName>
        <cbc:AdditionalStreetName>Oppgang A</cbc:AdditionalStreetName>
        <cbc:CityName>Oslo</cbc:CityName>
        <cbc:PostalZone>0501</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>Address Line 3</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>NO9311867455MVA</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Helseforetak AS</cbc:RegistrationName>
        <cbc:CompanyID schemeID="0082">931186723</cbc:CompanyID>
        <cac:RegistrationAddress>
          <cbc:CityName>Oslo</cbc:CityName>
          <cac:Country>
            <cbc:IdentificationCode>NO</cbc:IdentificationCode>
          </cac:Country>
        </cac:RegistrationAddress>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingCustomerParty>
  <cac:Delivery>
    <cac:DeliveryLocation>
      <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      <cac:Address>
        <cbc:StreetName>Solheimsveien 10</cbc:StreetName>
        <cbc:AdditionalStreetName>Add</cbc:AdditionalStreetName>
        <cbc:CityName>Lørenskog</cbc:CityName>
        <cbc:PostalZone>1473</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>3rd Address line</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:Address>
    </cac:DeliveryLocation>
    <cac:RequestedDeliveryPeriod>
      <cbc:StartDate>2012-10-10</cbc:StartDate>
      <cbc:StartTime>12:30:00</cbc:StartTime>
      <cbc:EndDate>2012-10-20</cbc:EndDate>
      <cbc:EndTime>18:00:00</cbc:EndTime>
    </cac:RequestedDeliveryPeriod>
    <cac:DeliveryParty>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0082">13691234</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Helseavdeling</cbc:Name>
      </cac:PartyName>
      <cac:Contact>
        <cbc:Name>Ole</cbc:Name>
        <cbc:Telephone>987098709</cbc:Telephone>
        <cbc:ElectronicMail>ole@helseforetak.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:DeliveryParty>
    <cac:Shipment>
      <cbc:ID>NA</cbc:ID>
      <cbc:ShippingPriorityLevelCode>1</cbc:ShippingPriorityLevelCode>
    </cac:Shipment>
  </cac:Delivery>
  <cac:DeliveryTerms>
    <cbc:ID>FOB</cbc:ID>
    <cbc:SpecialTerms>CAD</cbc:SpecialTerms>
    <cac:DeliveryLocation>
      <cbc:ID>FOB Oslo</cbc:ID>
    </cac:DeliveryLocation>
  </cac:DeliveryTerms>
  <cac:PaymentTerms>
    <cbc:Note>Payment terms description</cbc:Note>
  </cac:PaymentTerms>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReasonCode>ABK</cbc:AllowanceChargeReasonCode>
    <cbc:AllowanceChargeReason>Miscellaneous services</cbc:AllowanceChargeReason>
    <cbc:Amount currencyID="NOK">400.00</cbc:Amount>
    <cac:TaxCategory>
      <cbc:ID>Z</cbc:ID>
      <cbc:Percent>0</cbc:Percent>
      <cac:TaxScheme>
        <cbc:ID>VAT</cbc:ID>
      </cac:TaxScheme>
    </cac:TaxCategory>
  </cac:AllowanceCharge>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
    <cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
    <cbc:MultiplierFactorNumeric>10</cbc:MultiplierFactorNumeric>
    <cbc:Amount currencyID="NOK">652.50</cbc:Amount>
    <cbc:BaseAmount currencyID="NOK">6525.00</cbc:BaseAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>25</cbc:Percent>
      <cac:TaxScheme>
        <cbc:ID>VAT</cbc:ID>
      </cac:TaxScheme>
    </cac:TaxCategory>
  </cac:AllowanceCharge>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="NOK">100.00</cbc:TaxAmount>
  </cac:TaxTotal>
  <cac:AnticipatedMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="NOK">6525.00</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="NOK">6272.50</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="NOK">6372.50</cbc:TaxInclusiveAmount>
    <cbc:AllowanceTotalAmount currencyID="NOK">652.50</cbc:AllowanceTotalAmount>
    <cbc:ChargeTotalAmount currencyID="NOK">400.00</cbc:ChargeTotalAmount>
    <cbc:PrepaidAmount currencyID="NOK">10.00</cbc:PrepaidAmount>
    <cbc:PayableRoundingAmount currencyID="NOK">0.50</cbc:PayableRoundingAmount>
    <cbc:PayableAmount currencyID="NOK">6363</cbc:PayableAmount>
  </cac:AnticipatedMonetaryTotal>
  <cac:OrderLine>
    <cbc:Note>Freetext note on line 1</cbc:Note>
    <cac:LineItem>
      <cbc:ID>1</cbc:ID>
      <cbc:Quantity unitCode="EA">120</cbc:Quantity>
      <cbc:LineExtensionAmount currencyID="NOK">6300.00</cbc:LineExtensionAmount>
      <cbc:PartialDeliveryIndicator>false</cbc:PartialDeliveryIndicator>
      <cbc:AccountingCost>12345678</cbc:AccountingCost>
      <cac:Delivery>
        <cac:RequestedDeliveryPeriod>
          <cbc:StartDate>2010-02-10</cbc:StartDate>
          <cbc:StartTime>12:30:00</cbc:StartTime>
          <cbc:EndDate>2010-02-25</cbc:EndDate>
          <cbc:EndTime>18:00:00</cbc:EndTime>
        </cac:RequestedDeliveryPeriod>
      </cac:Delivery>
      <cac:OriginatorParty>
        <cac:PartyIdentification>
          <cbc:ID schemeID="0082">1234567890</cbc:ID>
        </cac:PartyIdentification>
        <cac:PartyName>
          <cbc:Name>Josef K.</cbc:Name>
        </cac:PartyName>
      </cac:OriginatorParty>
      <cac:AllowanceCharge>
        <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
        <cbc:AllowanceChargeReasonCode>ABK</cbc:AllowanceChargeReasonCode>
        <cbc:AllowanceChargeReason>Miscellaneous services</cbc:AllowanceChargeReason>
        <cbc:Amount currencyID="NOK">600.00</cbc:Amount>
      </cac:AllowanceCharge>
      <cac:AllowanceCharge>
        <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
        <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
        <cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
        <cbc:MultiplierFactorNumeric>5</cbc:MultiplierFactorNumeric>
        <cbc:Amount currencyID="NOK">300.00</cbc:Amount>
        <cbc:BaseAmount currencyID="NOK">6000.00</cbc:BaseAmount>
      </cac:AllowanceCharge>
      <cac:Price>
        <cbc:PriceAmount currencyID="NOK">50.000</cbc:PriceAmount>
        <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
        <cac:AllowanceCharge>
          <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
          <cbc:Amount currencyID="NOK">10.00</cbc:Amount>
          <cbc:BaseAmount currencyID="NOK">60.00</cbc:BaseAmount>
        </cac:AllowanceCharge>
      </cac:Price>
      <cac:Item>
        <cbc:Description>Needle 4mm</cbc:Description>
        <cbc:Name>Needle 4mm</cbc:Name>
        <cac:BuyersItemIdentification>
          <cbc:ID>123456</cbc:ID>
        </cac:BuyersItemIdentification>
        <cac:SellersItemIdentification>
          <cbc:ID>121212</cbc:ID>
        </cac:SellersItemIdentification>
        <cac:ManufacturersItemIdentification>
          <cbc:ID>manid659</cbc:ID>
        </cac:ManufacturersItemIdentification>
        <cac:StandardItemIdentification>
          <cbc:ID schemeID="0160">7560000012345</cbc:ID>
        </cac:StandardItemIdentification>
        <cac:ItemSpecificationDocumentReference>
          <cbc:ID>12345678</cbc:ID>
        </cac:ItemSpecificationDocumentReference>
        <cac:CommodityClassification>
          <cbc:ItemClassificationCode listID="MP" listVersionID="19.0501">12345678</cbc:ItemClassificationCode>
        </cac:CommodityClassification>

        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>25</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
        <cac:AdditionalItemProperty>
          <cbc:Name>Length</cbc:Name>
          <cbc:Value>30 mm</cbc:Value>
          <cbc:ValueQuantity unitCode="C62">30</cbc:ValueQuantity>
          <cbc:ValueQualifier>descr</cbc:ValueQualifier>
        </cac:AdditionalItemProperty>
        <cac:ItemInstance>
          <cbc:SerialID>SE-123456</cbc:SerialID>
          <cac:LotIdentification>
            <cbc:LotNumberID>LO-123456</cbc:LotNumberID>
          </cac:LotIdentification>
        </cac:ItemInstance>
      </cac:Item>
    </cac:LineItem>
  </cac:OrderLine>
  <cac:OrderLine>
    <cbc:Note>Freetext note on line 2</cbc:Note>
    <cac:LineItem>
      <cbc:ID>2</cbc:ID>
      <cbc:Quantity unitCode="EA">15</cbc:Quantity>
      <cbc:LineExtensionAmount currencyID="NOK">225.00</cbc:LineExtensionAmount>
      <cbc:PartialDeliveryIndicator>true</cbc:PartialDeliveryIndicator>
      <cbc:AccountingCost>ProjectID123</cbc:AccountingCost>
      <cac:Delivery>
        <cac:RequestedDeliveryPeriod>
          <cbc:StartDate>2012-10-15</cbc:StartDate>
          <cbc:EndDate>2012-10-31</cbc:EndDate>
        </cac:RequestedDeliveryPeriod>
      </cac:Delivery>
      <cac:OriginatorParty>
        <cac:PartyIdentification>
          <cbc:ID schemeID="0082">1234567890</cbc:ID>
        </cac:PartyIdentification>
        <cac:PartyName>
          <cbc:Name>Josef K.</cbc:Name>
        </cac:PartyName>
      </cac:OriginatorParty>
      <cac:Price>
        <cbc:PriceAmount currencyID="NOK">15.000</cbc:PriceAmount>
        <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
        <cac:AllowanceCharge>
          <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
          <cbc:Amount currencyID="NOK">100.0000</cbc:Amount>
          <cbc:BaseAmount currencyID="NOK">115.0000</cbc:BaseAmount>
        </cac:AllowanceCharge>
      </cac:Price>
      <cac:Item>
        <cbc:Description>Wet tissues for children</cbc:Description>
        <cbc:Name>Wet tissues</cbc:Name>
        <cac:SellersItemIdentification>
          <cbc:ID>SItemNo011</cbc:ID>
        </cac:SellersItemIdentification>
        <cac:CommodityClassification>
          <cbc:ItemClassificationCode listID="MP" listVersionID="19.0501">56789123</cbc:ItemClassificationCode>
        </cac:CommodityClassification>
        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>25</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
        <cac:AdditionalItemProperty>
          <cbc:Name>Weight</cbc:Name>
          <cbc:Value>100 g</cbc:Value>
        </cac:AdditionalItemProperty>
      </cac:Item>
    </cac:LineItem>
  </cac:OrderLine>
</Order>
```

{% endtab %}
{% endtabs %}


# OrderResponse

Base OrderResponse example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/OrderResponse_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "OrderResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:order_response:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:ordering:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "101"
      }
    ],
    "cbc:SalesOrderID": [
      {
        "_": "101-111"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2013-07-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "06:10:10"
      }
    ],
    "cbc:OrderResponseCode": [
      {
        "_": "CA"
      }
    ],
    "cbc:Note": [
      {
        "_": "Response message with amendments in the details"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:CustomerReference": [
      {
        "_": "ABC-123"
      }
    ],
    "cac:OrderReference": [
      {
        "cbc:ID": [
          {
            "_": "11233"
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7598000000128",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK12345678",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "The Supplier AB"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7590000012347",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK55412777",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "City Hospital"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cac:PromisedDeliveryPeriod": [
          {
            "cbc:StartDate": [
              {
                "_": "2013-07-15"
              }
            ],
            "cbc:StartTime": [
              {
                "_": "12:30:00"
              }
            ],
            "cbc:EndDate": [
              {
                "_": "2013-07-16"
              }
            ],
            "cbc:EndTime": [
              {
                "_": "18:00:00"
              }
            ]
          }
        ]
      }
    ],
    "cac:OrderLine": [
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cbc:Note": [
              {
                "_": "Order line note text"
              }
            ],
            "cbc:LineStatusCode": [
              {
                "_": "3"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "10",
                "$": {
                  "unitCode": "C62"
                }
              }
            ],
            "cbc:MaximumBackorderQuantity": [
              {
                "_": "3"
              }
            ],
            "cac:Delivery": [
              {
                "cac:PromisedDeliveryPeriod": [
                  {
                    "cbc:StartDate": [
                      {
                        "_": "2018-08-10"
                      }
                    ],
                    "cbc:StartTime": [
                      {
                        "_": "12:30:00"
                      }
                    ],
                    "cbc:EndDate": [
                      {
                        "_": "2018-08-12"
                      }
                    ],
                    "cbc:EndTime": [
                      {
                        "_": "18:00:00"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "1.50",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "C62"
                    }
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Brown sauce"
                  }
                ],
                "cac:BuyersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "123456"
                      }
                    ]
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-33"
                      }
                    ]
                  }
                ],
                "cac:StandardItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "7400000001234",
                        "$": {
                          "schemeID": "0160"
                        }
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:SellerSubstitutedLineItem": [
          {
            "cbc:ID": [
              {
                "_": "12356"
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Sauce brown, ready"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-34"
                      }
                    ]
                  }
                ],
                "cac:StandardItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "7400000001235",
                        "$": {
                          "schemeID": "0160"
                        }
                      }
                    ]
                  }
                ],
                "cac:CommodityClassification": [
                  {
                    "cbc:ItemClassificationCode": [
                      {
                        "_": "12345678",
                        "$": {
                          "listID": "MP",
                          "listVersionID": "19.0501"
                        }
                      }
                    ]
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "25"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ],
                "cac:AdditionalItemProperty": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Weight"
                      }
                    ],
                    "cbc:Value": [
                      {
                        "_": "12 gram"
                      }
                    ],
                    "cbc:ValueQuantity": [
                      {
                        "_": "12",
                        "$": {
                          "unitCode": "GRM"
                        }
                      }
                    ],
                    "cbc:ValueQualifier": [
                      {
                        "_": "gram"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "1"
              }
            ]
          }
        ]
      },
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "2"
              }
            ],
            "cbc:LineStatusCode": [
              {
                "_": "5"
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "White sauce"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-34"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "2"
              }
            ]
          }
        ]
      },
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "3"
              }
            ],
            "cbc:Note": [
              {
                "_": "Substituted Item"
              }
            ],
            "cbc:LineStatusCode": [
              {
                "_": "3"
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Pepper sauce"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-35"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:SellerSubstitutedLineItem": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Pepper sauce"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-36"
                      }
                    ]
                  }
                ],
                "cac:StandardItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "8722700577588",
                        "$": {
                          "schemeID": "0160"
                        }
                      }
                    ]
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "25"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "3"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<OrderResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:order_response:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:ordering:3</cbc:ProfileID>
  <cbc:ID>101</cbc:ID>
  <cbc:SalesOrderID>101-111</cbc:SalesOrderID>
  <cbc:IssueDate>2013-07-01</cbc:IssueDate>
  <cbc:IssueTime>06:10:10</cbc:IssueTime>
  <cbc:OrderResponseCode>CA</cbc:OrderResponseCode>
  <cbc:Note>Response message with amendments in the details</cbc:Note>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cbc:CustomerReference>ABC-123</cbc:CustomerReference>
  <cac:OrderReference>
    <cbc:ID>11233</cbc:ID>
  </cac:OrderReference>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7598000000128</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0184">DK12345678</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>The Supplier AB</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:SellerSupplierParty>
  <cac:BuyerCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7590000012347</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0184">DK55412777</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>City Hospital</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:BuyerCustomerParty>
  <cac:Delivery>
    <cac:PromisedDeliveryPeriod>
      <cbc:StartDate>2013-07-15</cbc:StartDate>
      <cbc:StartTime>12:30:00</cbc:StartTime>
      <cbc:EndDate>2013-07-16</cbc:EndDate>
      <cbc:EndTime>18:00:00</cbc:EndTime>
    </cac:PromisedDeliveryPeriod>
  </cac:Delivery>
  <cac:OrderLine>
    <cac:LineItem>
      <cbc:ID>1</cbc:ID>
      <cbc:Note>Order line note text</cbc:Note>
      <cbc:LineStatusCode>3</cbc:LineStatusCode>
      <cbc:Quantity unitCode="C62">10</cbc:Quantity>
      <cbc:MaximumBackorderQuantity>3</cbc:MaximumBackorderQuantity>
      <cac:Delivery>
        <cac:PromisedDeliveryPeriod>
          <cbc:StartDate>2018-08-10</cbc:StartDate>
          <cbc:StartTime>12:30:00</cbc:StartTime>
          <cbc:EndDate>2018-08-12</cbc:EndDate>
          <cbc:EndTime>18:00:00</cbc:EndTime>
        </cac:PromisedDeliveryPeriod>
      </cac:Delivery>
      <cac:Price>
        <cbc:PriceAmount currencyID="EUR">1.50</cbc:PriceAmount>
        <cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
      </cac:Price>
      <cac:Item>
        <cbc:Name>Brown sauce</cbc:Name>
        <cac:BuyersItemIdentification>
          <cbc:ID>123456</cbc:ID>
        </cac:BuyersItemIdentification>
        <cac:SellersItemIdentification>
          <cbc:ID>SN-33</cbc:ID>
        </cac:SellersItemIdentification>
        <cac:StandardItemIdentification>
          <cbc:ID schemeID="0160">7400000001234</cbc:ID>
        </cac:StandardItemIdentification>
      </cac:Item>
    </cac:LineItem>
    <cac:SellerSubstitutedLineItem>
      <cbc:ID>12356</cbc:ID>
      <cac:Item>
        <cbc:Name>Sauce brown, ready</cbc:Name>
        <cac:SellersItemIdentification>
          <cbc:ID>SN-34</cbc:ID>
        </cac:SellersItemIdentification>
        <cac:StandardItemIdentification>
          <cbc:ID schemeID="0160">7400000001235</cbc:ID>
        </cac:StandardItemIdentification>
        <cac:CommodityClassification>
          <cbc:ItemClassificationCode listID="MP" listVersionID="19.0501">12345678</cbc:ItemClassificationCode>
        </cac:CommodityClassification>
        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>25</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
        <cac:AdditionalItemProperty>
          <cbc:Name>Weight</cbc:Name>
          <cbc:Value>12 gram</cbc:Value>
          <cbc:ValueQuantity unitCode="GRM">12</cbc:ValueQuantity>
          <cbc:ValueQualifier>gram</cbc:ValueQualifier>
        </cac:AdditionalItemProperty>
      </cac:Item>
    </cac:SellerSubstitutedLineItem>
    <cac:OrderLineReference>
      <cbc:LineID>1</cbc:LineID>
    </cac:OrderLineReference>
  </cac:OrderLine>
  <cac:OrderLine>
    <cac:LineItem>
      <cbc:ID>2</cbc:ID>
      <cbc:LineStatusCode>5</cbc:LineStatusCode>
      <cac:Item>
        <cbc:Name>White sauce</cbc:Name>
        <cac:SellersItemIdentification>
          <cbc:ID>SN-34</cbc:ID>
        </cac:SellersItemIdentification>
      </cac:Item>
    </cac:LineItem>
    <cac:OrderLineReference>
      <cbc:LineID>2</cbc:LineID>
    </cac:OrderLineReference>
  </cac:OrderLine>
  <cac:OrderLine>
    <cac:LineItem>
      <cbc:ID>3</cbc:ID>
      <cbc:Note>Substituted Item</cbc:Note>
      <cbc:LineStatusCode>3</cbc:LineStatusCode>
      <cac:Item>
        <cbc:Name>Pepper sauce</cbc:Name>
        <cac:SellersItemIdentification>
          <cbc:ID>SN-35</cbc:ID>
        </cac:SellersItemIdentification>
      </cac:Item>
    </cac:LineItem>
    <cac:SellerSubstitutedLineItem>
      <cbc:ID>1</cbc:ID>
      <cac:Item>
        <cbc:Name>Pepper sauce</cbc:Name>
        <cac:SellersItemIdentification>
          <cbc:ID>SN-36</cbc:ID>
        </cac:SellersItemIdentification>
        <cac:StandardItemIdentification>
          <cbc:ID schemeID="0160">8722700577588</cbc:ID>
        </cac:StandardItemIdentification>
        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>25</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
      </cac:Item>
    </cac:SellerSubstitutedLineItem>
    <cac:OrderLineReference>
      <cbc:LineID>3</cbc:LineID>
    </cac:OrderLineReference>
  </cac:OrderLine>
</OrderResponse>
```

{% endtab %}
{% endtabs %}


# OrderAgreement

Base OrderResponse example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/OrderAgreement_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "OrderResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:order_agreement:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:order_agreement:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "0263bf48-9a55-4d15-adf5-2c2921036d1c"
      }
    ],
    "cbc:SalesOrderID": [
      {
        "_": "101-111"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2013-07-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "06:10:10"
      }
    ],
    "cbc:Note": [
      {
        "_": "We have a new phone number 33 44 55"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cbc:CustomerReference": [
      {
        "_": "ABC-123"
      }
    ],
    "cac:OrderReference": [
      {
        "cbc:ID": [
          {
            "_": "11233"
          }
        ]
      }
    ],
    "cac:OriginatorDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "123456"
          }
        ]
      }
    ],
    "cac:AdditionalDocumentReference": [
      {
        "cbc:ID": [
          {
            "_": "147852"
          }
        ],
        "cbc:DocumentType": [
          {
            "_": "Timesheet"
          }
        ],
        "cac:Attachment": [
          {
            "cbc:EmbeddedDocumentBinaryObject": [
              {
                "_": "\n\t\t\t\tUjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi",
                "$": {
                  "mimeCode": "image/tiff",
                  "filename": "hours-spend.csv"
                }
              }
            ],
            "cac:ExternalReference": [
              {
                "cbc:URI": [
                  {
                    "_": "http://www.example.com/index.html"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Contract": [
      {
        "cbc:ID": [
          {
            "_": "CON-12345"
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7598000000128",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK12345678",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Storgt. 12"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "4. etasje"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0585"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "The Supplier AB"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "123456789",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "John Doe"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "11223344"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "jd@supplier.com"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7590000012347",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK55412777",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Sinsenveien 40"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Oppgang B"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0501"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "City Hospital"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "931186755",
                    "$": {
                      "schemeID": "0082"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryContact": [
          {
            "cbc:Name": [
              {
                "_": "Peter Petersen"
              }
            ],
            "cbc:Telephone": [
              {
                "_": "22334455"
              }
            ],
            "cbc:ElectronicMail": [
              {
                "_": "pp@hospital.no"
              }
            ]
          }
        ]
      }
    ],
    "cac:OriginatorCustomerParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK55412777",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Helseavdeling"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AccountingCustomerParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "DK55412777",
                    "$": {
                      "schemeID": "0184"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Accounting"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:AllowanceCharge": [
      {
        "cbc:ChargeIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:AllowanceChargeReasonCode": [
          {
            "_": "ABK"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Miscellaneous services"
          }
        ],
        "cbc:Amount": [
          {
            "_": "2.00",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cbc:ChargeIndicator": [
          {
            "_": "false"
          }
        ],
        "cbc:AllowanceChargeReasonCode": [
          {
            "_": "95"
          }
        ],
        "cbc:AllowanceChargeReason": [
          {
            "_": "Discount"
          }
        ],
        "cbc:MultiplierFactorNumeric": [
          {
            "_": "10"
          }
        ],
        "cbc:Amount": [
          {
            "_": "3.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:BaseAmount": [
          {
            "_": "32.50",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxCategory": [
          {
            "cbc:ID": [
              {
                "_": "S"
              }
            ],
            "cbc:Percent": [
              {
                "_": "25"
              }
            ],
            "cac:TaxScheme": [
              {
                "cbc:ID": [
                  {
                    "_": "VAT"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "7.81",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cac:TaxSubtotal": [
          {
            "cbc:TaxableAmount": [
              {
                "_": "31.25",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:TaxAmount": [
              {
                "_": "7.81",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:TaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "25"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:LegalMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "32.5",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "31.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "39.06",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:AllowanceTotalAmount": [
          {
            "_": "3.25",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:ChargeTotalAmount": [
          {
            "_": "2.00",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PrepaidAmount": [
          {
            "_": "10.00",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableRoundingAmount": [
          {
            "_": "0.94",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "30.00",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:OrderLine": [
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cbc:Note": [
              {
                "_": "Order line note text"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "15",
                "$": {
                  "unitCode": "C62"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "22.50",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:Delivery": [
              {
                "cbc:Quantity": [
                  {
                    "_": "15.00",
                    "$": {
                      "unitCode": "C62"
                    }
                  }
                ],
                "cac:PromisedDeliveryPeriod": [
                  {
                    "cbc:StartDate": [
                      {
                        "_": "2018-08-10"
                      }
                    ],
                    "cbc:StartTime": [
                      {
                        "_": "12:00:00"
                      }
                    ],
                    "cbc:EndDate": [
                      {
                        "_": "2018-08-12"
                      }
                    ],
                    "cbc:EndTime": [
                      {
                        "_": "12:00:00"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "1.50",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "C62"
                    }
                  }
                ],
                "cbc:PriceType": [
                  {
                    "_": "AAA"
                  }
                ],
                "cac:AllowanceCharge": [
                  {
                    "cbc:ChargeIndicator": [
                      {
                        "_": "false"
                      }
                    ],
                    "cbc:Amount": [
                      {
                        "_": "0.20",
                        "$": {
                          "currencyID": "EUR"
                        }
                      }
                    ],
                    "cbc:BaseAmount": [
                      {
                        "_": "1.70",
                        "$": {
                          "currencyID": "EUR"
                        }
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Description": [
                  {
                    "_": "Brown sauce - long description"
                  }
                ],
                "cbc:Name": [
                  {
                    "_": "Brown sauce"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-33"
                      }
                    ]
                  }
                ],
                "cac:StandardItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "7400000001234",
                        "$": {
                          "schemeID": "0160"
                        }
                      }
                    ]
                  }
                ],
                "cac:ItemSpecificationDocumentReference": [
                  {
                    "cbc:ID": [
                      {
                        "_": "147852"
                      }
                    ],
                    "cbc:DocumentTypeCode": [
                      {
                        "_": "TRADE_ITEM_DESCRIPTION"
                      }
                    ],
                    "cbc:DocumentType": [
                      {
                        "_": "Timesheet"
                      }
                    ],
                    "cac:Attachment": [
                      {
                        "cbc:EmbeddedDocumentBinaryObject": [
                          {
                            "_": "\n\t\t\t\t\t\t\tUjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi",
                            "$": {
                              "mimeCode": "image/tiff",
                              "filename": "hours-spend.csv"
                            }
                          }
                        ],
                        "cac:ExternalReference": [
                          {
                            "cbc:URI": [
                              {
                                "_": "http://www.example.com/index.html"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ],
                "cac:CommodityClassification": [
                  {
                    "cbc:ItemClassificationCode": [
                      {
                        "_": "12345678",
                        "$": {
                          "listID": "MP",
                          "listVersionID": "19.0501"
                        }
                      }
                    ]
                  }
                ],
                "cac:TransactionConditions": [
                  {
                    "cbc:ActionCode": [
                      {
                        "_": "CT"
                      }
                    ]
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "25"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ],
                "cac:AdditionalItemProperty": [
                  {
                    "cbc:ID": [
                      {
                        "_": "\n\t\t\t\t\t\t77e416eb-a363-4258-a04e-171d843a6460",
                        "$": {
                          "schemeDataURI": "https://define.cobuilder.no/77e416eb-a363-4258-a04e-171d843a6460/2022/",
                          "schemeID": "ISO22057",
                          "schemeVersionID": "2022"
                        }
                      }
                    ],
                    "cbc:Name": [
                      {
                        "_": "Length"
                      }
                    ],
                    "cbc:NameCode": [
                      {
                        "_": "test",
                        "$": {
                          "listID": "NN"
                        }
                      }
                    ],
                    "cbc:Value": [
                      {
                        "_": "30 mm"
                      }
                    ]
                  }
                ],
                "cac:Certificate": [
                  {
                    "cbc:ID": [
                      {
                        "_": "EU EcoLabel"
                      }
                    ],
                    "cbc:CertificateTypeCode": [
                      {
                        "_": "NA"
                      }
                    ],
                    "cbc:CertificateType": [
                      {
                        "_": "Environmental"
                      }
                    ],
                    "cbc:Remarks": [
                      {
                        "_": "Item labl value"
                      }
                    ],
                    "cac:IssuerParty": [
                      {
                        "cac:PartyName": [
                          {
                            "cbc:Name": [
                              {
                                "_": "Issuer party name"
                              }
                            ]
                          }
                        ]
                      }
                    ],
                    "cac:DocumentReference": [
                      {
                        "cbc:ID": [
                          {
                            "_": "http://www.label.eu/test/"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "2"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "C62"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "10",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "10.00",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "White sauce"
                  }
                ],
                "cac:SellersItemIdentification": [
                  {
                    "cbc:ID": [
                      {
                        "_": "SN-34"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<OrderResponse
	xmlns="urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2"
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:order_agreement:3</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:order_agreement:3</cbc:ProfileID>
	<cbc:ID>0263bf48-9a55-4d15-adf5-2c2921036d1c</cbc:ID>
	<cbc:SalesOrderID>101-111</cbc:SalesOrderID>
	<cbc:IssueDate>2013-07-01</cbc:IssueDate>
	<cbc:IssueTime>06:10:10</cbc:IssueTime>
	<cbc:Note>We have a new phone number 33 44 55</cbc:Note>
	<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
	<cbc:CustomerReference>ABC-123</cbc:CustomerReference>
	<cac:OrderReference>
		<cbc:ID>11233</cbc:ID>
	</cac:OrderReference>
	<cac:OriginatorDocumentReference>
		<cbc:ID>123456</cbc:ID>
	</cac:OriginatorDocumentReference>
	<cac:AdditionalDocumentReference>
		<cbc:ID>147852</cbc:ID>
		<cbc:DocumentType>Timesheet</cbc:DocumentType>
		<cac:Attachment>
			<cbc:EmbeddedDocumentBinaryObject mimeCode="image/tiff" filename="hours-spend.csv">
				UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</cbc:EmbeddedDocumentBinaryObject>
			<cac:ExternalReference>
				<cbc:URI>http://www.example.com/index.html</cbc:URI>
			</cac:ExternalReference>
		</cac:Attachment>
	</cac:AdditionalDocumentReference>
	<cac:Contract>
		<cbc:ID>CON-12345</cbc:ID>
	</cac:Contract>
	<cac:SellerSupplierParty>
		<cac:Party>
			<cbc:EndpointID schemeID="0088">7598000000128</cbc:EndpointID>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0184">DK12345678</cbc:ID>
			</cac:PartyIdentification>
			<cac:PostalAddress>
				<cbc:StreetName>Storgt. 12</cbc:StreetName>
				<cbc:AdditionalStreetName>4. etasje</cbc:AdditionalStreetName>
				<cbc:CityName>Oslo</cbc:CityName>
				<cbc:PostalZone>0585</cbc:PostalZone>
				<cbc:CountrySubentity>Region</cbc:CountrySubentity>
				<cac:AddressLine>
					<cbc:Line>Address Line 3</cbc:Line>
				</cac:AddressLine>
				<cac:Country>
					<cbc:IdentificationCode>NO</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>The Supplier AB</cbc:RegistrationName>
				<cbc:CompanyID schemeID="0082">123456789</cbc:CompanyID>
			</cac:PartyLegalEntity>
			<cac:Contact>
				<cbc:Name>John Doe</cbc:Name>
				<cbc:Telephone>11223344</cbc:Telephone>
				<cbc:ElectronicMail>jd@supplier.com</cbc:ElectronicMail>
			</cac:Contact>
		</cac:Party>
	</cac:SellerSupplierParty>
	<cac:BuyerCustomerParty>
		<cac:Party>
			<cbc:EndpointID schemeID="0088">7590000012347</cbc:EndpointID>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0184">DK55412777</cbc:ID>
			</cac:PartyIdentification>
			<cac:PostalAddress>
				<cbc:StreetName>Sinsenveien 40</cbc:StreetName>
				<cbc:AdditionalStreetName>Oppgang B</cbc:AdditionalStreetName>
				<cbc:CityName>Oslo</cbc:CityName>
				<cbc:PostalZone>0501</cbc:PostalZone>
				<cbc:CountrySubentity>Region</cbc:CountrySubentity>
				<cac:AddressLine>
					<cbc:Line>Address Line 3</cbc:Line>
				</cac:AddressLine>
				<cac:Country>
					<cbc:IdentificationCode>NO</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>City Hospital</cbc:RegistrationName>
				<cbc:CompanyID schemeID="0082">931186755</cbc:CompanyID>
			</cac:PartyLegalEntity>
		</cac:Party>
		<cac:DeliveryContact>
			<cbc:Name>Peter Petersen</cbc:Name>
			<cbc:Telephone>22334455</cbc:Telephone>
			<cbc:ElectronicMail>pp@hospital.no</cbc:ElectronicMail>
		</cac:DeliveryContact>
	</cac:BuyerCustomerParty>
	<cac:OriginatorCustomerParty>
		<cac:Party>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0184">DK55412777</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>Helseavdeling</cbc:Name>
			</cac:PartyName>
		</cac:Party>
	</cac:OriginatorCustomerParty>
	<cac:AccountingCustomerParty>
		<cac:Party>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0184">DK55412777</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>Accounting</cbc:Name>
			</cac:PartyName>
		</cac:Party>
	</cac:AccountingCustomerParty>
	<cac:AllowanceCharge>
		<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
		<cbc:AllowanceChargeReasonCode>ABK</cbc:AllowanceChargeReasonCode>
		<cbc:AllowanceChargeReason>Miscellaneous services</cbc:AllowanceChargeReason>
		<!--	<cbc:MultiplierFactorNumeric>10</cbc:MultiplierFactorNumeric>
-->
		<cbc:Amount currencyID="EUR">2.00</cbc:Amount>
		<!--	<cbc:BaseAmount currencyID="EUR">32.50</cbc:BaseAmount>
-->
		<cac:TaxCategory>
			<cbc:ID>S</cbc:ID>
			<cbc:Percent>25</cbc:Percent>
			<cac:TaxScheme>
				<cbc:ID>VAT</cbc:ID>
			</cac:TaxScheme>
		</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:AllowanceCharge>
		<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
		<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
		<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
		<cbc:MultiplierFactorNumeric>10</cbc:MultiplierFactorNumeric>
		<cbc:Amount currencyID="EUR">3.25</cbc:Amount>
		<cbc:BaseAmount currencyID="EUR">32.50</cbc:BaseAmount>
		<cac:TaxCategory>
			<cbc:ID>S</cbc:ID>
			<cbc:Percent>25</cbc:Percent>
			<cac:TaxScheme>
				<cbc:ID>VAT</cbc:ID>
			</cac:TaxScheme>
		</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="EUR">7.81</cbc:TaxAmount>
		<cac:TaxSubtotal>
			<cbc:TaxableAmount currencyID="EUR">31.25</cbc:TaxableAmount>
			<cbc:TaxAmount currencyID="EUR">7.81</cbc:TaxAmount>
			<cac:TaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>25</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>
	<cac:LegalMonetaryTotal>
		<cbc:LineExtensionAmount currencyID="EUR">32.5</cbc:LineExtensionAmount>
		<cbc:TaxExclusiveAmount currencyID="EUR">31.25</cbc:TaxExclusiveAmount>
		<cbc:TaxInclusiveAmount currencyID="EUR">39.06</cbc:TaxInclusiveAmount>
		<cbc:AllowanceTotalAmount currencyID="EUR">3.25</cbc:AllowanceTotalAmount>
		<cbc:ChargeTotalAmount currencyID="EUR">2.00</cbc:ChargeTotalAmount>
		<cbc:PrepaidAmount currencyID="EUR">10.00</cbc:PrepaidAmount>
		<cbc:PayableRoundingAmount currencyID="EUR">0.94</cbc:PayableRoundingAmount>
		<cbc:PayableAmount currencyID="EUR">30.00</cbc:PayableAmount>
	</cac:LegalMonetaryTotal>
	<cac:OrderLine>
		<cac:LineItem>
			<cbc:ID>1</cbc:ID>
			<cbc:Note>Order line note text</cbc:Note>
			<cbc:Quantity unitCode="C62">15</cbc:Quantity>
			<cbc:LineExtensionAmount currencyID="EUR">22.50</cbc:LineExtensionAmount>
			<cac:Delivery>
				<cbc:Quantity unitCode="C62">15.00</cbc:Quantity>
				<cac:PromisedDeliveryPeriod>
					<cbc:StartDate>2018-08-10</cbc:StartDate>
					<cbc:StartTime>12:00:00</cbc:StartTime>
					<cbc:EndDate>2018-08-12</cbc:EndDate>
					<cbc:EndTime>12:00:00</cbc:EndTime>
				</cac:PromisedDeliveryPeriod>
			</cac:Delivery>
			<cac:Price>
				<cbc:PriceAmount currencyID="EUR">1.50</cbc:PriceAmount>
				<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
				<cbc:PriceType>AAA</cbc:PriceType>
				<cac:AllowanceCharge>
					<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
					<cbc:Amount currencyID="EUR">0.20</cbc:Amount>
					<cbc:BaseAmount currencyID="EUR">1.70</cbc:BaseAmount>
				</cac:AllowanceCharge>
			</cac:Price>
			<cac:Item>
				<cbc:Description>Brown sauce - long description</cbc:Description>
				<cbc:Name>Brown sauce</cbc:Name>
				<cac:SellersItemIdentification>
					<cbc:ID>SN-33</cbc:ID>
				</cac:SellersItemIdentification>
				<cac:StandardItemIdentification>
					<cbc:ID schemeID="0160">7400000001234</cbc:ID>
				</cac:StandardItemIdentification>
				<cac:ItemSpecificationDocumentReference>
					<cbc:ID>147852</cbc:ID>
					<cbc:DocumentTypeCode>TRADE_ITEM_DESCRIPTION</cbc:DocumentTypeCode>
					<cbc:DocumentType>Timesheet</cbc:DocumentType>
					<cac:Attachment>
						<cbc:EmbeddedDocumentBinaryObject mimeCode="image/tiff"
							filename="hours-spend.csv">
							UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</cbc:EmbeddedDocumentBinaryObject>
						<cac:ExternalReference>
							<cbc:URI>http://www.example.com/index.html</cbc:URI>
						</cac:ExternalReference>
					</cac:Attachment>
				</cac:ItemSpecificationDocumentReference>
				<cac:CommodityClassification>
					<cbc:ItemClassificationCode listID="MP" listVersionID="19.0501">12345678</cbc:ItemClassificationCode>
				</cac:CommodityClassification>
				<cac:TransactionConditions>
					<cbc:ActionCode>CT</cbc:ActionCode>
				</cac:TransactionConditions>
				<cac:ClassifiedTaxCategory>
					<cbc:ID>S</cbc:ID>
					<cbc:Percent>25</cbc:Percent>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:ClassifiedTaxCategory>
				<cac:AdditionalItemProperty>
					<cbc:ID
						schemeDataURI="https://define.cobuilder.no/77e416eb-a363-4258-a04e-171d843a6460/2022/"
						schemeID="ISO22057" schemeVersionID="2022">
						77e416eb-a363-4258-a04e-171d843a6460</cbc:ID>
					<cbc:Name>Length</cbc:Name>
					<cbc:NameCode listID="NN">test</cbc:NameCode>
					<cbc:Value>30 mm</cbc:Value>
				</cac:AdditionalItemProperty>
				<cac:Certificate>
					<cbc:ID>EU EcoLabel</cbc:ID>
					<cbc:CertificateTypeCode>NA</cbc:CertificateTypeCode>
					<cbc:CertificateType>Environmental</cbc:CertificateType>
					<cbc:Remarks>Item labl value</cbc:Remarks>
					<cac:IssuerParty>
						<cac:PartyName>
							<cbc:Name>Issuer party name</cbc:Name>
						</cac:PartyName>
					</cac:IssuerParty>
					<cac:DocumentReference>
						<cbc:ID>http://www.label.eu/test/</cbc:ID>
					</cac:DocumentReference>
				</cac:Certificate>
			</cac:Item>
		</cac:LineItem>
	</cac:OrderLine>
	<cac:OrderLine>
		<cac:LineItem>
			<cbc:ID>2</cbc:ID>
			<cbc:Quantity unitCode="C62">1</cbc:Quantity>
			<cbc:LineExtensionAmount currencyID="EUR">10</cbc:LineExtensionAmount>
			<cac:Price>
				<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
			</cac:Price>
			<cac:Item>
				<cbc:Name>White sauce</cbc:Name>
				<cac:SellersItemIdentification>
					<cbc:ID>SN-34</cbc:ID>
				</cac:SellersItemIdentification>
			</cac:Item>
		</cac:LineItem>
	</cac:OrderLine>
</OrderResponse>
```

{% endtab %}
{% endtabs %}


# OrderChange

Base OrderChange example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/OrderChange_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "OrderChange": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns:xs": "http://www.w3.org/2001/XMLSchema"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:order_change:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:advanced_ordering:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "Change-1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2022-02-01"
      }
    ],
    "cbc:SequenceNumberID": [
      {
        "_": "1"
      }
    ],
    "cbc:Note": [
      {
        "_": "Changes according to Order reponse"
      }
    ],
    "cbc:DocumentCurrencyCode": [
      {
        "_": "EUR"
      }
    ],
    "cac:ValidityPeriod": [
      {
        "cbc:EndDate": [
          {
            "_": "2022-03-01"
          }
        ]
      }
    ],
    "cac:OrderReference": [
      {
        "cbc:ID": [
          {
            "_": "Order-1"
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7300010000001",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5541277710",
                    "$": {
                      "schemeID": "0007"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "City Hospital"
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "City Hospital 345433"
                  }
                ],
                "cbc:CompanyID": [
                  {
                    "_": "5541277710",
                    "$": {
                      "schemeID": "0007"
                    }
                  }
                ],
                "cac:RegistrationAddress": [
                  {
                    "cbc:CityName": [
                      {
                        "_": "Eurocity"
                      }
                    ],
                    "cac:Country": [
                      {
                        "cbc:IdentificationCode": [
                          {
                            "_": "SE"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Martin Foggerty"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "+46555785488"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "martin.foggerty@cityhospital.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7302347231110",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5546577791",
                    "$": {
                      "schemeID": "0007"
                    }
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Harbour street"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Dock 45"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Bergen"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "The Supplier AB"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Delivery": [
      {
        "cac:DeliveryLocation": [
          {
            "cac:Address": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Lower street 5"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "Reception"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Stockholm"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "11120"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Right"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:RequestedDeliveryPeriod": [
          {
            "cbc:StartDate": [
              {
                "_": "2013-07-15"
              }
            ],
            "cbc:EndDate": [
              {
                "_": "2013-07-16"
              }
            ]
          }
        ],
        "cac:DeliveryParty": [
          {
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Hospital Tourist Department"
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "John"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "+465558877523"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "john@cityhospital.se"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TaxTotal": [
      {
        "cbc:TaxAmount": [
          {
            "_": "100",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:AnticipatedMonetaryTotal": [
      {
        "cbc:LineExtensionAmount": [
          {
            "_": "500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxExclusiveAmount": [
          {
            "_": "500",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:TaxInclusiveAmount": [
          {
            "_": "600",
            "$": {
              "currencyID": "EUR"
            }
          }
        ],
        "cbc:PayableAmount": [
          {
            "_": "600",
            "$": {
              "currencyID": "EUR"
            }
          }
        ]
      }
    ],
    "cac:OrderLine": [
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cbc:LineStatusCode": [
              {
                "_": "3"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "5",
                "$": {
                  "unitCode": "NAR"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "200",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "40",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Item 1"
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "20"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cac:LineItem": [
          {
            "cbc:ID": [
              {
                "_": "2"
              }
            ],
            "cbc:LineStatusCode": [
              {
                "_": "3"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "50",
                "$": {
                  "unitCode": "NAR"
                }
              }
            ],
            "cbc:LineExtensionAmount": [
              {
                "_": "300",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "6",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ]
              }
            ],
            "cac:Item": [
              {
                "cbc:Name": [
                  {
                    "_": "Item 2"
                  }
                ],
                "cac:ClassifiedTaxCategory": [
                  {
                    "cbc:ID": [
                      {
                        "_": "S"
                      }
                    ],
                    "cbc:Percent": [
                      {
                        "_": "20"
                      }
                    ],
                    "cac:TaxScheme": [
                      {
                        "cbc:ID": [
                          {
                            "_": "VAT"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<OrderChange xmlns="urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:order_change:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:advanced_ordering:3</cbc:ProfileID>
  <cbc:ID>Change-1</cbc:ID>
  <cbc:IssueDate>2022-02-01</cbc:IssueDate>
  <cbc:SequenceNumberID>1</cbc:SequenceNumberID>
  <cbc:Note>Changes according to Order reponse</cbc:Note>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cac:ValidityPeriod>
    <cbc:EndDate>2022-03-01</cbc:EndDate>
  </cac:ValidityPeriod>
  <cac:OrderReference>
    <cbc:ID>Order-1</cbc:ID>
  </cac:OrderReference>
  <cac:BuyerCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0007">5541277710</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>City Hospital</cbc:Name>
      </cac:PartyName>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>City Hospital 345433</cbc:RegistrationName>
        <cbc:CompanyID schemeID="0007">5541277710</cbc:CompanyID>
        <cac:RegistrationAddress>
          <cbc:CityName>Eurocity</cbc:CityName>
          <cac:Country>
            <cbc:IdentificationCode>SE</cbc:IdentificationCode>
          </cac:Country>
        </cac:RegistrationAddress>
      </cac:PartyLegalEntity>
      <cac:Contact>
        <cbc:Name>Martin Foggerty</cbc:Name>
        <cbc:Telephone>+46555785488</cbc:Telephone>
        <cbc:ElectronicMail>martin.foggerty@cityhospital.se</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:BuyerCustomerParty>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7302347231110</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0007">5546577791</cbc:ID>
      </cac:PartyIdentification>
      <cac:PostalAddress>
        <cbc:StreetName>Harbour street</cbc:StreetName>
        <cbc:AdditionalStreetName>Dock 45</cbc:AdditionalStreetName>
        <cbc:CityName>Bergen</cbc:CityName>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>The Supplier AB</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:SellerSupplierParty>
  <cac:Delivery>
    <cac:DeliveryLocation>
      <cac:Address>
        <cbc:StreetName>Lower street 5</cbc:StreetName>
        <cbc:AdditionalStreetName>Reception</cbc:AdditionalStreetName>
        <cbc:CityName>Stockholm</cbc:CityName>
        <cbc:PostalZone>11120</cbc:PostalZone>
        <cac:AddressLine>
          <cbc:Line>Right</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>SE</cbc:IdentificationCode>
        </cac:Country>
      </cac:Address>
    </cac:DeliveryLocation>
    <cac:RequestedDeliveryPeriod>
      <cbc:StartDate>2013-07-15</cbc:StartDate>
      <cbc:EndDate>2013-07-16</cbc:EndDate>
    </cac:RequestedDeliveryPeriod>
    <cac:DeliveryParty>
      <cac:PartyName>
        <cbc:Name>Hospital Tourist Department</cbc:Name>
      </cac:PartyName>
      <cac:Contact>
        <cbc:Name>John</cbc:Name>
        <cbc:Telephone>+465558877523</cbc:Telephone>
        <cbc:ElectronicMail>john@cityhospital.se</cbc:ElectronicMail>
      </cac:Contact>
    </cac:DeliveryParty>
  </cac:Delivery>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="EUR">100</cbc:TaxAmount>
  </cac:TaxTotal>
  <cac:AnticipatedMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="EUR">500</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="EUR">500</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="EUR">600</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="EUR">600</cbc:PayableAmount>
  </cac:AnticipatedMonetaryTotal>
  <cac:OrderLine>
    <cac:LineItem>
      <cbc:ID>1</cbc:ID>
      <cbc:LineStatusCode>3</cbc:LineStatusCode>
      <cbc:Quantity unitCode="NAR">5</cbc:Quantity>
      <cbc:LineExtensionAmount currencyID="EUR">200</cbc:LineExtensionAmount>
      <cac:Price>
        <cbc:PriceAmount currencyID="EUR">40</cbc:PriceAmount>
      </cac:Price>
      <cac:Item>
        <cbc:Name>Item 1</cbc:Name>
        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>20</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
      </cac:Item>
    </cac:LineItem>
  </cac:OrderLine>
  <cac:OrderLine>
    <cac:LineItem>
      <cbc:ID>2</cbc:ID>
      <cbc:LineStatusCode>3</cbc:LineStatusCode>
      <cbc:Quantity unitCode="NAR">50</cbc:Quantity>
      <cbc:LineExtensionAmount currencyID="EUR">300</cbc:LineExtensionAmount>
      <cac:Price>
        <cbc:PriceAmount currencyID="EUR">6</cbc:PriceAmount>
      </cac:Price>
      <cac:Item>
        <cbc:Name>Item 2</cbc:Name>
        <cac:ClassifiedTaxCategory>
          <cbc:ID>S</cbc:ID>
          <cbc:Percent>20</cbc:Percent>
          <cac:TaxScheme>
            <cbc:ID>VAT</cbc:ID>
          </cac:TaxScheme>
        </cac:ClassifiedTaxCategory>
      </cac:Item>
    </cac:LineItem>
  </cac:OrderLine>
</OrderChange>
```

{% endtab %}
{% endtabs %}


# OrderCancellation

Base OrderCancellation example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/OrderCancellation_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "OrderCancellation": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns:xs": "http://www.w3.org/2001/XMLSchema"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:order_cancellation:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:advanced_ordering:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "Cancellation-1"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2022-02-01"
      }
    ],
    "cbc:CancellationNote": [
      {
        "_": "With reference to phone call"
      }
    ],
    "cac:OrderReference": [
      {
        "cbc:ID": [
          {
            "_": "Order-1"
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7300010000001",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5541277710",
                    "$": {
                      "schemeID": "0007"
                    }
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "City Hospital 345433"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7302347231110",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5546577791",
                    "$": {
                      "schemeID": "0007"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "The Supplier AB"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "SE"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "The Supplier AB"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<OrderCancellation xmlns="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:order_cancellation:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:advanced_ordering:3</cbc:ProfileID>
  <cbc:ID>Cancellation-1</cbc:ID>
  <cbc:IssueDate>2022-02-01</cbc:IssueDate>
  <cbc:CancellationNote>With reference to phone call</cbc:CancellationNote>
  <cac:OrderReference>
    <cbc:ID>Order-1</cbc:ID>
  </cac:OrderReference>
  <cac:BuyerCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0007">5541277710</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>City Hospital 345433</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:BuyerCustomerParty>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7302347231110</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0007">5546577791</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>The Supplier AB</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cac:Country>
          <cbc:IdentificationCode>SE</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>The Supplier AB</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:SellerSupplierParty>
</OrderCancellation>
```

{% endtab %}
{% endtabs %}


# Catalogue

Base Catalogue example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/Catalogue_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "Catalogue": {
    "$": {
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:catalogue:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:catalogue_only:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "1387"
      }
    ],
    "cbc:ActionCode": [
      {
        "_": "Add"
      }
    ],
    "cbc:Name": [
      {
        "_": "Spring Catalogue"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2016-08-01"
      }
    ],
    "cbc:VersionID": [
      {
        "_": "2.0"
      }
    ],
    "cac:ValidityPeriod": [
      {
        "cbc:StartDate": [
          {
            "_": "2018-09-01"
          }
        ],
        "cbc:EndDate": [
          {
            "_": "2019-08-31"
          }
        ]
      }
    ],
    "cac:ReferencedContract": [
      {
        "cbc:ID": [
          {
            "_": "CRT1387"
          }
        ]
      }
    ],
    "cac:SourceCatalogueReference": [
      {
        "cbc:ID": [
          {
            "_": "1.0"
          }
        ]
      }
    ],
    "cac:ProviderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "987654325",
            "$": {
              "schemeID": "0192"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "5790000435951",
                "$": {
                  "schemeID": "0088"
                }
              }
            ]
          }
        ],
        "cac:PostalAddress": [
          {
            "cbc:StreetName": [
              {
                "_": "Sinsenveien 40"
              }
            ],
            "cbc:AdditionalStreetName": [
              {
                "_": "Oppgang B"
              }
            ],
            "cbc:CityName": [
              {
                "_": "Oslo"
              }
            ],
            "cbc:PostalZone": [
              {
                "_": "0501"
              }
            ],
            "cbc:CountrySubentity": [
              {
                "_": "Region"
              }
            ],
            "cac:AddressLine": [
              {
                "cbc:Line": [
                  {
                    "_": "Address Line 3"
                  }
                ]
              }
            ],
            "cac:Country": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Helseforetak AS"
              }
            ],
            "cbc:CompanyID": [
              {
                "_": "123456785",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:RegistrationAddress": [
              {
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "987654325",
            "$": {
              "schemeID": "0192"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "5790000435944",
                "$": {
                  "schemeID": "0088"
                }
              }
            ]
          }
        ],
        "cac:PostalAddress": [
          {
            "cbc:StreetName": [
              {
                "_": "Storgt. 12"
              }
            ],
            "cbc:AdditionalStreetName": [
              {
                "_": "4. etasje"
              }
            ],
            "cbc:CityName": [
              {
                "_": "Oslo"
              }
            ],
            "cbc:PostalZone": [
              {
                "_": "0585"
              }
            ],
            "cbc:CountrySubentity": [
              {
                "_": "Region"
              }
            ],
            "cac:AddressLine": [
              {
                "cbc:Line": [
                  {
                    "_": "Address Line 3"
                  }
                ]
              }
            ],
            "cac:Country": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Medical AS"
              }
            ],
            "cbc:CompanyID": [
              {
                "_": "123456785",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:RegistrationAddress": [
              {
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Medical"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Storgt. 12"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "4. etasje"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0585"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Nils Nilsen"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "22150510"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "post@medical.no"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:ContractorCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "123456785",
                "$": {
                  "schemeID": "0192"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Medical"
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Nils Nilsen"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "22150510"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "post@medical.no"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:TradingTerms": [
      {
        "cbc:Information": [
          {
            "_": "Net within 30 days"
          }
        ]
      }
    ],
    "cac:CatalogueLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:ActionCode": [
          {
            "_": "Update"
          }
        ],
        "cbc:OrderableIndicator": [
          {
            "_": "true"
          }
        ],
        "cbc:OrderableUnit": [
          {
            "_": "LBR"
          }
        ],
        "cbc:ContentUnitQuantity": [
          {
            "_": "10",
            "$": {
              "unitCode": "C62"
            }
          }
        ],
        "cbc:OrderQuantityIncrementNumeric": [
          {
            "_": "1"
          }
        ],
        "cbc:MinimumOrderQuantity": [
          {
            "_": "1",
            "$": {
              "unitCode": "LBR"
            }
          }
        ],
        "cbc:MaximumOrderQuantity": [
          {
            "_": "100",
            "$": {
              "unitCode": "LBR"
            }
          }
        ],
        "cbc:WarrantyInformation": [
          {
            "_": "text"
          }
        ],
        "cbc:PackLevelCode": [
          {
            "_": "TU"
          }
        ],
        "cac:LineValidityPeriod": [
          {
            "cbc:StartDate": [
              {
                "_": "2018-09-26"
              }
            ],
            "cbc:EndDate": [
              {
                "_": "2019-08-31"
              }
            ]
          }
        ],
        "cac:ItemComparison": [
          {
            "cbc:PriceAmount": [
              {
                "_": "9.00",
                "$": {
                  "currencyID": "EUR"
                }
              }
            ],
            "cbc:Quantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ]
          }
        ],
        "cac:ComponentRelatedItem": [
          {
            "cbc:ID": [
              {
                "_": "2345"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ]
          }
        ],
        "cac:AccessoryRelatedItem": [
          {
            "cbc:ID": [
              {
                "_": "54584"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ]
          }
        ],
        "cac:RequiredRelatedItem": [
          {
            "cbc:ID": [
              {
                "_": "5564540"
              }
            ],
            "cbc:Quantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ]
          }
        ],
        "cac:RequiredItemLocationQuantity": [
          {
            "cbc:LeadTimeMeasure": [
              {
                "_": "2",
                "$": {
                  "unitCode": "DAY"
                }
              }
            ],
            "cbc:MinimumQuantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ],
            "cbc:MaximumQuantity": [
              {
                "_": "10",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ],
            "cac:ApplicableTerritoryAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Storgt. 12"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "4. etasje"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Oslo"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "0585"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Region"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "Address Line 3"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "NO"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "10.00",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "C62"
                    }
                  }
                ],
                "cbc:PriceType": [
                  {
                    "_": "AAA"
                  }
                ],
                "cbc:OrderableUnitFactorRate": [
                  {
                    "_": "1"
                  }
                ],
                "cac:ValidityPeriod": [
                  {
                    "cbc:StartDate": [
                      {
                        "_": "2018-10-01"
                      }
                    ],
                    "cbc:EndDate": [
                      {
                        "_": "2018-12-31"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Photo copy paper 80g A4, package of 500 sheets."
              }
            ],
            "cbc:PackQuantity": [
              {
                "_": "1",
                "$": {
                  "unitCode": "LBR"
                }
              }
            ],
            "cbc:PackSizeNumeric": [
              {
                "_": "10"
              }
            ],
            "cbc:Name": [
              {
                "_": "Copy paper"
              }
            ],
            "cbc:Keyword": [
              {
                "_": "text"
              }
            ],
            "cbc:BrandName": [
              {
                "_": "text"
              }
            ],
            "cac:SellersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "MNTR011"
                  }
                ]
              }
            ],
            "cac:ManufacturersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "MNTR01349087911"
                  }
                ]
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "1234567890114",
                    "$": {
                      "schemeID": "0160"
                    }
                  }
                ]
              }
            ],
            "cac:ItemSpecificationDocumentReference": [
              {
                "cbc:ID": [
                  {
                    "_": "12345"
                  }
                ],
                "cac:Attachment": [
                  {
                    "cbc:EmbeddedDocumentBinaryObject": [
                      {
                        "_": "UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi",
                        "$": {
                          "mimeCode": "image/png",
                          "filename": "image1.png"
                        }
                      }
                    ],
                    "cac:ExternalReference": [
                      {
                        "cbc:URI": [
                          {
                            "_": "http://www.supplier.com/image1.png"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:OriginCountry": [
              {
                "cbc:IdentificationCode": [
                  {
                    "_": "NO"
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "20101601",
                    "$": {
                      "listID": "MP",
                      "listVersionID": "19.0501",
                      "name": "Office furniture"
                    }
                  }
                ]
              }
            ],
            "cac:TransactionConditions": [
              {
                "cbc:ActionCode": [
                  {
                    "_": "CT"
                  }
                ]
              }
            ],
            "cac:HazardousItem": [
              {
                "cbc:UNDGCode": [
                  {
                    "_": "ADR"
                  }
                ],
                "cbc:HazardClassID": [
                  {
                    "_": "Code"
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "18"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:AdditionalItemProperty": [
              {
                "cbc:Name": [
                  {
                    "_": "Paper weight in grams"
                  }
                ],
                "cbc:NameCode": [
                  {
                    "_": "test",
                    "$": {
                      "listID": "NN"
                    }
                  }
                ],
                "cbc:Value": [
                  {
                    "_": "18"
                  }
                ],
                "cbc:ValueQuantity": [
                  {
                    "_": "18",
                    "$": {
                      "unitCode": "GRM"
                    }
                  }
                ],
                "cbc:ValueQualifier": [
                  {
                    "_": "text"
                  }
                ]
              }
            ],
            "cac:ManufacturerParty": [
              {
                "cac:PartyName": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Manufacturer AS"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:ItemInstance": [
              {
                "cbc:BestBeforeDate": [
                  {
                    "_": "2018-12-31"
                  }
                ],
                "cac:LotIdentification": [
                  {
                    "cbc:LotNumberID": [
                      {
                        "_": "123456789"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Certificate": [
              {
                "cbc:ID": [
                  {
                    "_": "123450"
                  }
                ],
                "cbc:CertificateTypeCode": [
                  {
                    "_": "NA"
                  }
                ],
                "cbc:CertificateType": [
                  {
                    "_": "Environmental"
                  }
                ],
                "cbc:Remarks": [
                  {
                    "_": "tekst"
                  }
                ],
                "cac:IssuerParty": [
                  {
                    "cac:PartyName": [
                      {
                        "cbc:Name": [
                          {
                            "_": "NA"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:Dimension": [
              {
                "cbc:AttributeID": [
                  {
                    "_": "LN"
                  }
                ],
                "cbc:Measure": [
                  {
                    "_": "0.1",
                    "$": {
                      "unitCode": "MTR"
                    }
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "cbc:ID": [
          {
            "_": "2"
          }
        ],
        "cac:RequiredItemLocationQuantity": [
          {
            "cac:Price": [
              {
                "cbc:PriceAmount": [
                  {
                    "_": "90.00",
                    "$": {
                      "currencyID": "EUR"
                    }
                  }
                ],
                "cbc:BaseQuantity": [
                  {
                    "_": "1",
                    "$": {
                      "unitCode": "C62"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Description": [
              {
                "_": "Photo copy paper 80g A4, carton of 10 units with 500 sheets each"
              }
            ],
            "cbc:Name": [
              {
                "_": "Copy paper"
              }
            ],
            "cac:SellersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "MNTR012"
                  }
                ]
              }
            ],
            "cac:ManufacturersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "MNTR01349087912"
                  }
                ]
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "1234567890124",
                    "$": {
                      "schemeID": "0160"
                    }
                  }
                ]
              }
            ],
            "cac:CommodityClassification": [
              {
                "cbc:ItemClassificationCode": [
                  {
                    "_": "20101601",
                    "$": {
                      "listID": "MP",
                      "listVersionID": "19.0501"
                    }
                  }
                ]
              }
            ],
            "cac:ClassifiedTaxCategory": [
              {
                "cbc:ID": [
                  {
                    "_": "S"
                  }
                ],
                "cbc:Percent": [
                  {
                    "_": "18"
                  }
                ],
                "cac:TaxScheme": [
                  {
                    "cbc:ID": [
                      {
                        "_": "VAT"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:AdditionalItemProperty": [
              {
                "cbc:Name": [
                  {
                    "_": "Paper weight in grams"
                  }
                ],
                "cbc:Value": [
                  {
                    "_": "18"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<Catalogue xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns="urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:catalogue:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:catalogue_only:3</cbc:ProfileID>
  <cbc:ID>1387</cbc:ID>
  <cbc:ActionCode>Add</cbc:ActionCode>
  <cbc:Name>Spring Catalogue</cbc:Name>
  <cbc:IssueDate>2016-08-01</cbc:IssueDate>
  <cbc:VersionID>2.0</cbc:VersionID>
  <cac:ValidityPeriod>
    <cbc:StartDate>2018-09-01</cbc:StartDate>
    <cbc:EndDate>2019-08-31</cbc:EndDate>
  </cac:ValidityPeriod>
  <cac:ReferencedContract>
    <cbc:ID>CRT1387</cbc:ID>
  </cac:ReferencedContract>
  <cac:SourceCatalogueReference>
    <cbc:ID>1.0</cbc:ID>
  </cac:SourceCatalogueReference>
  <cac:ProviderParty>
    <cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
    <cac:PartyIdentification>
      <cbc:ID schemeID="0088">5790000435951</cbc:ID>
    </cac:PartyIdentification>
    <cac:PostalAddress>
      <cbc:StreetName>Sinsenveien 40</cbc:StreetName>
      <cbc:AdditionalStreetName>Oppgang B</cbc:AdditionalStreetName>
      <cbc:CityName>Oslo</cbc:CityName>
      <cbc:PostalZone>0501</cbc:PostalZone>
      <cbc:CountrySubentity>Region</cbc:CountrySubentity>
      <cac:AddressLine>
        <cbc:Line>Address Line 3</cbc:Line>
      </cac:AddressLine>
      <cac:Country>
        <cbc:IdentificationCode>NO</cbc:IdentificationCode>
      </cac:Country>
    </cac:PostalAddress>
    <cac:PartyLegalEntity>
      <cbc:RegistrationName>Helseforetak AS</cbc:RegistrationName>
      <cbc:CompanyID schemeID="0192">123456785</cbc:CompanyID>
      <cac:RegistrationAddress>
        <cbc:CityName>Oslo</cbc:CityName>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:RegistrationAddress>
    </cac:PartyLegalEntity>
  </cac:ProviderParty>
  <cac:ReceiverParty>
    <cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
    <cac:PartyIdentification>
      <cbc:ID schemeID="0088">5790000435944</cbc:ID>
    </cac:PartyIdentification>
    <cac:PostalAddress>
      <cbc:StreetName>Storgt. 12</cbc:StreetName>
      <cbc:AdditionalStreetName>4. etasje</cbc:AdditionalStreetName>
      <cbc:CityName>Oslo</cbc:CityName>
      <cbc:PostalZone>0585</cbc:PostalZone>
      <cbc:CountrySubentity>Region</cbc:CountrySubentity>
      <cac:AddressLine>
        <cbc:Line>Address Line 3</cbc:Line>
      </cac:AddressLine>
      <cac:Country>
        <cbc:IdentificationCode>NO</cbc:IdentificationCode>
      </cac:Country>
    </cac:PostalAddress>
    <cac:PartyLegalEntity>
      <cbc:RegistrationName>Medical AS</cbc:RegistrationName>
      <cbc:CompanyID schemeID="0192">123456785</cbc:CompanyID>
      <cac:RegistrationAddress>
        <cbc:CityName>Oslo</cbc:CityName>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:RegistrationAddress>
    </cac:PartyLegalEntity>
  </cac:ReceiverParty>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Medical</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Storgt. 12</cbc:StreetName>
        <cbc:AdditionalStreetName>4. etasje</cbc:AdditionalStreetName>
        <cbc:CityName>Oslo</cbc:CityName>
        <cbc:PostalZone>0585</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>Address Line 3</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:Contact>
        <cbc:Name>Nils Nilsen</cbc:Name>
        <cbc:Telephone>22150510</cbc:Telephone>
        <cbc:ElectronicMail>post@medical.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:SellerSupplierParty>
  <cac:ContractorCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0192">123456785</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Medical</cbc:Name>
      </cac:PartyName>
      <cac:Contact>
        <cbc:Name>Nils Nilsen</cbc:Name>
        <cbc:Telephone>22150510</cbc:Telephone>
        <cbc:ElectronicMail>post@medical.no</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:ContractorCustomerParty>
  <cac:TradingTerms>
    <cbc:Information>Net within 30 days</cbc:Information>
  </cac:TradingTerms>
  <cac:CatalogueLine>
    <cbc:ID>1</cbc:ID>
    <cbc:ActionCode>Update</cbc:ActionCode>
    <cbc:OrderableIndicator>true</cbc:OrderableIndicator>
    <cbc:OrderableUnit>LBR</cbc:OrderableUnit>
    <cbc:ContentUnitQuantity unitCode="C62">10</cbc:ContentUnitQuantity>
    <cbc:OrderQuantityIncrementNumeric>1</cbc:OrderQuantityIncrementNumeric>
    <cbc:MinimumOrderQuantity unitCode="LBR">1</cbc:MinimumOrderQuantity>
    <cbc:MaximumOrderQuantity unitCode="LBR">100</cbc:MaximumOrderQuantity>
    <cbc:WarrantyInformation>text</cbc:WarrantyInformation>
    <cbc:PackLevelCode>TU</cbc:PackLevelCode>
    <cac:LineValidityPeriod>
      <cbc:StartDate>2018-09-26</cbc:StartDate>
      <cbc:EndDate>2019-08-31</cbc:EndDate>
    </cac:LineValidityPeriod>
    <cac:ItemComparison>
      <cbc:PriceAmount currencyID="EUR">9.00</cbc:PriceAmount>
      <cbc:Quantity unitCode="LBR">1</cbc:Quantity>
    </cac:ItemComparison>
    <cac:ComponentRelatedItem>
      <cbc:ID>2345</cbc:ID>
      <cbc:Quantity unitCode="LBR">1</cbc:Quantity>
    </cac:ComponentRelatedItem>
    <cac:AccessoryRelatedItem>
      <cbc:ID>54584</cbc:ID>
      <cbc:Quantity unitCode="LBR">1</cbc:Quantity>
    </cac:AccessoryRelatedItem>
    <cac:RequiredRelatedItem>
      <cbc:ID>5564540</cbc:ID>
      <cbc:Quantity unitCode="LBR">1</cbc:Quantity>
    </cac:RequiredRelatedItem>
    <cac:RequiredItemLocationQuantity>
      <cbc:LeadTimeMeasure unitCode="DAY">2</cbc:LeadTimeMeasure>
      <cbc:MinimumQuantity unitCode="LBR">1</cbc:MinimumQuantity>
      <cbc:MaximumQuantity unitCode="LBR">10</cbc:MaximumQuantity>
      <cac:ApplicableTerritoryAddress>
        <cbc:StreetName>Storgt. 12</cbc:StreetName>
        <cbc:AdditionalStreetName>4. etasje</cbc:AdditionalStreetName>
        <cbc:CityName>Oslo</cbc:CityName>
        <cbc:PostalZone>0585</cbc:PostalZone>
        <cbc:CountrySubentity>Region</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>Address Line 3</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>NO</cbc:IdentificationCode>
        </cac:Country>
      </cac:ApplicableTerritoryAddress>
      <cac:Price>
        <cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
        <cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
        <cbc:PriceType>AAA</cbc:PriceType>
        <cbc:OrderableUnitFactorRate>1</cbc:OrderableUnitFactorRate>
        <cac:ValidityPeriod>
          <cbc:StartDate>2018-10-01</cbc:StartDate>
          <cbc:EndDate>2018-12-31</cbc:EndDate>
        </cac:ValidityPeriod>
      </cac:Price>
    </cac:RequiredItemLocationQuantity>
    <cac:Item>
      <cbc:Description>Photo copy paper 80g A4, package of 500 sheets.</cbc:Description>
      <cbc:PackQuantity unitCode="LBR">1</cbc:PackQuantity>
      <cbc:PackSizeNumeric>10</cbc:PackSizeNumeric>
      <cbc:Name>Copy paper</cbc:Name>
      <cbc:Keyword>text</cbc:Keyword>
      <cbc:BrandName>text</cbc:BrandName>
      <cac:SellersItemIdentification>
        <cbc:ID>MNTR011</cbc:ID>
      </cac:SellersItemIdentification>
      <cac:ManufacturersItemIdentification>
        <cbc:ID>MNTR01349087911</cbc:ID>
      </cac:ManufacturersItemIdentification>
      <cac:StandardItemIdentification>
        <cbc:ID schemeID="0160">1234567890114</cbc:ID>
      </cac:StandardItemIdentification>
      <cac:ItemSpecificationDocumentReference>
        <cbc:ID>12345</cbc:ID>
        <cac:Attachment>
          <cbc:EmbeddedDocumentBinaryObject mimeCode="image/png" filename="image1.png">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</cbc:EmbeddedDocumentBinaryObject>
          <cac:ExternalReference>
            <cbc:URI>http://www.supplier.com/image1.png</cbc:URI>
          </cac:ExternalReference>
        </cac:Attachment>
      </cac:ItemSpecificationDocumentReference>
      <cac:OriginCountry>
        <cbc:IdentificationCode>NO</cbc:IdentificationCode>
      </cac:OriginCountry>
      <cac:CommodityClassification>
        <cbc:ItemClassificationCode listID="MP" listVersionID="19.0501" name="Office furniture">20101601</cbc:ItemClassificationCode>
      </cac:CommodityClassification>
      <cac:TransactionConditions>
        <cbc:ActionCode>CT</cbc:ActionCode>
      </cac:TransactionConditions>
      <cac:HazardousItem>
        <cbc:UNDGCode>ADR</cbc:UNDGCode>
        <cbc:HazardClassID>Code</cbc:HazardClassID>
      </cac:HazardousItem>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>18</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
      <cac:AdditionalItemProperty>
        <cbc:Name>Paper weight in grams</cbc:Name>
        <cbc:NameCode listID="NN">test</cbc:NameCode>
        <cbc:Value>18</cbc:Value>
        <cbc:ValueQuantity unitCode="GRM">18</cbc:ValueQuantity>
        <cbc:ValueQualifier>text</cbc:ValueQualifier>
      </cac:AdditionalItemProperty>
      <cac:ManufacturerParty>
        <cac:PartyName>
          <cbc:Name>Manufacturer AS</cbc:Name>
        </cac:PartyName>
      </cac:ManufacturerParty>
      <cac:ItemInstance>
        <cbc:BestBeforeDate>2018-12-31</cbc:BestBeforeDate>
        <cac:LotIdentification>
          <cbc:LotNumberID>123456789</cbc:LotNumberID>
        </cac:LotIdentification>
      </cac:ItemInstance>
      <cac:Certificate>
        <cbc:ID>123450</cbc:ID>
        <cbc:CertificateTypeCode>NA</cbc:CertificateTypeCode>
        <cbc:CertificateType>Environmental</cbc:CertificateType>
        <cbc:Remarks>tekst</cbc:Remarks>
        <cac:IssuerParty>
          <cac:PartyName>
            <cbc:Name>NA</cbc:Name>
          </cac:PartyName>
        </cac:IssuerParty>
      </cac:Certificate>
      <cac:Dimension>
        <cbc:AttributeID>LN</cbc:AttributeID>
        <cbc:Measure unitCode="MTR">0.1</cbc:Measure>
      </cac:Dimension>
    </cac:Item>
  </cac:CatalogueLine>
  <cac:CatalogueLine>
    <cbc:ID>2</cbc:ID>
    <cac:RequiredItemLocationQuantity>
      <cac:Price>
        <cbc:PriceAmount currencyID="EUR">90.00</cbc:PriceAmount>
        <cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
      </cac:Price>
    </cac:RequiredItemLocationQuantity>
    <cac:Item>
      <cbc:Description>Photo copy paper 80g A4, carton of 10 units with 500 sheets each</cbc:Description>
      <cbc:Name>Copy paper</cbc:Name>
      <cac:SellersItemIdentification>
        <cbc:ID>MNTR012</cbc:ID>
      </cac:SellersItemIdentification>
      <cac:ManufacturersItemIdentification>
        <cbc:ID>MNTR01349087912</cbc:ID>
      </cac:ManufacturersItemIdentification>
      <cac:StandardItemIdentification>
        <cbc:ID schemeID="0160">1234567890124</cbc:ID>
      </cac:StandardItemIdentification>
      <cac:CommodityClassification>
        <cbc:ItemClassificationCode listID="MP" listVersionID="19.0501">20101601</cbc:ItemClassificationCode>
      </cac:CommodityClassification>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>18</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
      <cac:AdditionalItemProperty>
        <cbc:Name>Paper weight in grams</cbc:Name>
        <cbc:Value>18</cbc:Value>
      </cac:AdditionalItemProperty>
    </cac:Item>
  </cac:CatalogueLine>
</Catalogue>
```

{% endtab %}
{% endtabs %}


# CatalogueResponse

Base Catalogue example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/CatalogueResponse_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ApplicationResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:catalogue_response:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:catalogue_only:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "imrid001"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-12-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00"
      }
    ],
    "cbc:Note": [
      {
        "_": "text"
      }
    ],
    "cac:SenderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "5798000012349",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "DK88776655",
                "$": {
                  "schemeID": "0184"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Buyer organization"
              }
            ]
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "7330001000000",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Seller company"
              }
            ]
          }
        ]
      }
    ],
    "cac:DocumentResponse": [
      {
        "cac:Response": [
          {
            "cbc:ResponseCode": [
              {
                "_": "AP"
              }
            ]
          }
        ],
        "cac:DocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "Cat-1"
              }
            ],
            "cbc:VersionID": [
              {
                "_": "2.0"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"
					 xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
					 xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:catalogue_response:3</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:catalogue_only:3</cbc:ProfileID>
	<cbc:ID>imrid001</cbc:ID>
	<cbc:IssueDate>2017-12-01</cbc:IssueDate>
	<cbc:IssueTime>12:00:00</cbc:IssueTime>
	<cbc:Note>text</cbc:Note>
	<cac:SenderParty>
		<cbc:EndpointID schemeID="0088">5798000012349</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0184">DK88776655</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Buyer organization</cbc:RegistrationName>
		</cac:PartyLegalEntity>
	</cac:SenderParty>
	<cac:ReceiverParty>
		<cbc:EndpointID schemeID="0088">7330001000000</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0192">987654325</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Seller company</cbc:RegistrationName>
		</cac:PartyLegalEntity>
	</cac:ReceiverParty>
	<cac:DocumentResponse>
		<cac:Response>
			<cbc:ResponseCode>AP</cbc:ResponseCode>
		</cac:Response>
		<cac:DocumentReference>
			<cbc:ID>Cat-1</cbc:ID>
			<cbc:VersionID>2.0</cbc:VersionID>
		</cac:DocumentReference>
	</cac:DocumentResponse>
</ApplicationResponse>
```

{% endtab %}
{% endtabs %}


# DespatchAdvice

Base DespatchAdvice example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/DespatchAdvice_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "DespatchAdvice": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:despatch_advice:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:despatch_advice:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "565899"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2018-09-20"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00"
      }
    ],
    "cbc:Note": [
      {
        "_": "sample"
      }
    ],
    "cac:OrderReference": [
      {
        "cbc:ID": [
          {
            "_": "AEG012345"
          }
        ]
      }
    ],
    "cac:DespatchSupplierParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "7300010000001",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "7300010000001",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Busy Street"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Farthing"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "AA99 1BB"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Heremouthshire"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "The Roundabout"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "Consortial"
                  }
                ]
              }
            ],
            "cac:Contact": [
              {
                "cbc:Name": [
                  {
                    "_": "Mrs Bouquet"
                  }
                ],
                "cbc:Telephone": [
                  {
                    "_": "0158 1233714"
                  }
                ],
                "cbc:ElectronicMail": [
                  {
                    "_": "bouquet@fpconsortial.co.uk"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:DeliveryCustomerParty": [
      {
        "cac:Party": [
          {
            "cbc:EndpointID": [
              {
                "_": "5798000000124",
                "$": {
                  "schemeID": "0088"
                }
              }
            ],
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Avon Way"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "way 2"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Bridgtow"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "ZZ99 1ZZ"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Avon"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "3rd Floor, Room 5"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ],
            "cac:PartyLegalEntity": [
              {
                "cbc:RegistrationName": [
                  {
                    "_": "IYT Corporation"
                  }
                ]
              }
            ]
          }
        ],
        "cac:DeliveryContact": [
          {
            "cbc:Name": [
              {
                "_": "Mr Fred Churchill"
              }
            ],
            "cbc:Telephone": [
              {
                "_": "0127 2653214"
              }
            ],
            "cbc:ElectronicMail": [
              {
                "_": "fred@iytcorporation.gov.uk"
              }
            ]
          }
        ]
      }
    ],
    "cac:BuyerCustomerParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "IYT Corporation"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Avon Way"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "way 2"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Bridgtow"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "ZZ99 1ZZ"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Avon"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "3rd Floor, Room 5"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:SellerSupplierParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "IYT Corporation"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Avon Way"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "way 2"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Bridgtow"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "ZZ99 1ZZ"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Avon"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "3rd Floor, Room 5"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:OriginatorCustomerParty": [
      {
        "cac:Party": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "5790000435951",
                    "$": {
                      "schemeID": "0088"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "IYT Corporation"
                  }
                ]
              }
            ],
            "cac:PostalAddress": [
              {
                "cbc:StreetName": [
                  {
                    "_": "Avon Way"
                  }
                ],
                "cbc:AdditionalStreetName": [
                  {
                    "_": "way 2"
                  }
                ],
                "cbc:CityName": [
                  {
                    "_": "Bridgtow"
                  }
                ],
                "cbc:PostalZone": [
                  {
                    "_": "ZZ99 1ZZ"
                  }
                ],
                "cbc:CountrySubentity": [
                  {
                    "_": "Avon"
                  }
                ],
                "cac:AddressLine": [
                  {
                    "cbc:Line": [
                      {
                        "_": "3rd Floor, Room 5"
                      }
                    ]
                  }
                ],
                "cac:Country": [
                  {
                    "cbc:IdentificationCode": [
                      {
                        "_": "GB"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:Shipment": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:Information": [
          {
            "_": "text"
          }
        ],
        "cbc:GrossWeightMeasure": [
          {
            "_": "1",
            "$": {
              "unitCode": "C62"
            }
          }
        ],
        "cbc:GrossVolumeMeasure": [
          {
            "_": "1",
            "$": {
              "unitCode": "C62"
            }
          }
        ],
        "cbc:TotalTransportHandlingUnitQuantity": [
          {
            "_": "3"
          }
        ],
        "cac:Consignment": [
          {
            "cbc:ID": [
              {
                "_": "1"
              }
            ],
            "cbc:Information": [
              {
                "_": "text"
              }
            ],
            "cac:CarrierParty": [
              {
                "cac:PartyName": [
                  {
                    "cbc:Name": [
                      {
                        "_": "Name"
                      }
                    ]
                  }
                ],
                "cac:Person": [
                  {
                    "cac:IdentityDocumentReference": [
                      {
                        "cbc:ID": [
                          {
                            "_": "1234"
                          }
                        ],
                        "cbc:DocumentType": [
                          {
                            "_": "Inv"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Delivery": [
          {
            "cbc:TrackingID": [
              {
                "_": "456789"
              }
            ],
            "cac:EstimatedDeliveryPeriod": [
              {
                "cbc:StartDate": [
                  {
                    "_": "2018-09-25"
                  }
                ],
                "cbc:StartTime": [
                  {
                    "_": "12:00:00"
                  }
                ],
                "cbc:EndDate": [
                  {
                    "_": "2018-09-27"
                  }
                ],
                "cbc:EndTime": [
                  {
                    "_": "12:00:00"
                  }
                ]
              }
            ],
            "cac:Despatch": [
              {
                "cbc:ActualDespatchDate": [
                  {
                    "_": "2018-09-25"
                  }
                ],
                "cbc:ActualDespatchTime": [
                  {
                    "_": "13:00:00"
                  }
                ],
                "cac:DespatchAddress": [
                  {
                    "cbc:StreetName": [
                      {
                        "_": "Avon Way"
                      }
                    ],
                    "cbc:AdditionalStreetName": [
                      {
                        "_": "way 2"
                      }
                    ],
                    "cbc:CityName": [
                      {
                        "_": "Bridgtow"
                      }
                    ],
                    "cbc:PostalZone": [
                      {
                        "_": "ZZ99 1ZZ"
                      }
                    ],
                    "cbc:CountrySubentity": [
                      {
                        "_": "Avon"
                      }
                    ],
                    "cac:AddressLine": [
                      {
                        "cbc:Line": [
                          {
                            "_": "3rd Floor, Room 5"
                          }
                        ]
                      }
                    ],
                    "cac:Country": [
                      {
                        "cbc:IdentificationCode": [
                          {
                            "_": "GB"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "cac:DespatchLine": [
      {
        "cbc:ID": [
          {
            "_": "1"
          }
        ],
        "cbc:Note": [
          {
            "_": "Mrs Green agreed to waive charge"
          }
        ],
        "cbc:DeliveredQuantity": [
          {
            "_": "10",
            "$": {
              "unitCode": "C62"
            }
          }
        ],
        "cbc:OutstandingQuantity": [
          {
            "_": "2",
            "$": {
              "unitCode": "C62"
            }
          }
        ],
        "cbc:OutstandingReason": [
          {
            "_": "text"
          }
        ],
        "cac:OrderLineReference": [
          {
            "cbc:LineID": [
              {
                "_": "1"
              }
            ],
            "cac:OrderReference": [
              {
                "cbc:ID": [
                  {
                    "_": "AEG012345"
                  }
                ]
              }
            ]
          }
        ],
        "cac:Item": [
          {
            "cbc:Name": [
              {
                "_": "beeswax"
              }
            ],
            "cac:BuyersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "6578489"
                  }
                ]
              }
            ],
            "cac:SellersItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "17589683"
                  }
                ]
              }
            ],
            "cac:StandardItemIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "1234567891234",
                    "$": {
                      "schemeID": "0160"
                    }
                  }
                ],
                "cbc:ExtendedID": [
                  {
                    "_": "22114455"
                  }
                ]
              }
            ],
            "cac:HazardousItem": [
              {
                "cbc:UNDGCode": [
                  {
                    "_": "ADR"
                  }
                ],
                "cbc:HazardClassID": [
                  {
                    "_": "Code"
                  }
                ]
              }
            ],
            "cac:AdditionalItemProperty": [
              {
                "cbc:Name": [
                  {
                    "_": "Colour"
                  }
                ],
                "cbc:Value": [
                  {
                    "_": "Blue"
                  }
                ]
              }
            ],
            "cac:ItemInstance": [
              {
                "cbc:ManufactureDate": [
                  {
                    "_": "2018-01-01"
                  }
                ],
                "cbc:BestBeforeDate": [
                  {
                    "_": "2018-12-01"
                  }
                ],
                "cbc:SerialID": [
                  {
                    "_": "4558784"
                  }
                ],
                "cac:LotIdentification": [
                  {
                    "cbc:LotNumberID": [
                      {
                        "_": "546378239"
                      }
                    ],
                    "cbc:ExpiryDate": [
                      {
                        "_": "2010-01-01"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:Shipment": [
          {
            "cbc:ID": [
              {
                "_": "NA"
              }
            ],
            "cac:TransportHandlingUnit": [
              {
                "cbc:ID": [
                  {
                    "_": "5454"
                  }
                ],
                "cbc:TransportHandlingUnitTypeCode": [
                  {
                    "_": "4H"
                  }
                ],
                "cbc:HazardousRiskIndicator": [
                  {
                    "_": "false"
                  }
                ],
                "cbc:ShippingMarks": [
                  {
                    "_": "text"
                  }
                ],
                "cac:MeasurementDimension": [
                  {
                    "cbc:AttributeID": [
                      {
                        "_": "AAW"
                      }
                    ],
                    "cbc:Measure": [
                      {
                        "_": "1",
                        "$": {
                          "unitCode": "C62"
                        }
                      }
                    ]
                  }
                ],
                "cac:Package": [
                  {
                    "cbc:ID": [
                      {
                        "_": "126"
                      }
                    ],
                    "cbc:PackagingTypeCode": [
                      {
                        "_": "BX"
                      }
                    ]
                  },
                  {
                    "cbc:ID": [
                      {
                        "_": "667"
                      }
                    ],
                    "cbc:PackagingTypeCode": [
                      {
                        "_": "BX"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<DespatchAdvice xmlns="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
  <cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:despatch_advice:3</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:despatch_advice:3</cbc:ProfileID>
  <cbc:ID>565899</cbc:ID>
  <cbc:IssueDate>2018-09-20</cbc:IssueDate>
  <cbc:IssueTime>12:00:00</cbc:IssueTime>
  <cbc:Note>sample</cbc:Note>
  <cac:OrderReference>
    <cbc:ID>AEG012345</cbc:ID>
  </cac:OrderReference>
  <cac:DespatchSupplierParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">7300010000001</cbc:ID>
      </cac:PartyIdentification>
      <cac:PostalAddress>
        <cbc:StreetName>Busy Street</cbc:StreetName>
        <cbc:CityName>Farthing</cbc:CityName>
        <cbc:PostalZone>AA99 1BB</cbc:PostalZone>
        <cbc:CountrySubentity>Heremouthshire</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>The Roundabout</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Consortial</cbc:RegistrationName>
      </cac:PartyLegalEntity>
      <cac:Contact>
        <cbc:Name>Mrs Bouquet</cbc:Name>
        <cbc:Telephone>0158 1233714</cbc:Telephone>
        <cbc:ElectronicMail>bouquet@fpconsortial.co.uk</cbc:ElectronicMail>
      </cac:Contact>
    </cac:Party>
  </cac:DespatchSupplierParty>
  <cac:DeliveryCustomerParty>
    <cac:Party>
      <cbc:EndpointID schemeID="0088">5798000000124</cbc:EndpointID>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PostalAddress>
        <cbc:StreetName>Avon Way</cbc:StreetName>
        <cbc:AdditionalStreetName>way 2</cbc:AdditionalStreetName>
        <cbc:CityName>Bridgtow</cbc:CityName>
        <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone>
        <cbc:CountrySubentity>Avon</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>3rd Floor, Room 5</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>IYT Corporation</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
    <cac:DeliveryContact>
      <cbc:Name>Mr Fred Churchill</cbc:Name>
      <cbc:Telephone>0127 2653214</cbc:Telephone>
      <cbc:ElectronicMail>fred@iytcorporation.gov.uk</cbc:ElectronicMail>
    </cac:DeliveryContact>
  </cac:DeliveryCustomerParty>
  <cac:BuyerCustomerParty>
    <cac:Party>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>IYT Corporation</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Avon Way</cbc:StreetName>
        <cbc:AdditionalStreetName>way 2</cbc:AdditionalStreetName>
        <cbc:CityName>Bridgtow</cbc:CityName>
        <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone>
        <cbc:CountrySubentity>Avon</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>3rd Floor, Room 5</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
    </cac:Party>
  </cac:BuyerCustomerParty>
  <cac:SellerSupplierParty>
    <cac:Party>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>IYT Corporation</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Avon Way</cbc:StreetName>
        <cbc:AdditionalStreetName>way 2</cbc:AdditionalStreetName>
        <cbc:CityName>Bridgtow</cbc:CityName>
        <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone>
        <cbc:CountrySubentity>Avon</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>3rd Floor, Room 5</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
    </cac:Party>
  </cac:SellerSupplierParty>
  <cac:OriginatorCustomerParty>
    <cac:Party>
      <cac:PartyIdentification>
        <cbc:ID schemeID="0088">5790000435951</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>IYT Corporation</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Avon Way</cbc:StreetName>
        <cbc:AdditionalStreetName>way 2</cbc:AdditionalStreetName>
        <cbc:CityName>Bridgtow</cbc:CityName>
        <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone>
        <cbc:CountrySubentity>Avon</cbc:CountrySubentity>
        <cac:AddressLine>
          <cbc:Line>3rd Floor, Room 5</cbc:Line>
        </cac:AddressLine>
        <cac:Country>
          <cbc:IdentificationCode>GB</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
    </cac:Party>
  </cac:OriginatorCustomerParty>
  <cac:Shipment>
    <cbc:ID>1</cbc:ID>
    <cbc:Information>text</cbc:Information>
    <cbc:GrossWeightMeasure unitCode="C62">1</cbc:GrossWeightMeasure>
    <cbc:GrossVolumeMeasure unitCode="C62">1</cbc:GrossVolumeMeasure>
    <cbc:TotalTransportHandlingUnitQuantity>3</cbc:TotalTransportHandlingUnitQuantity>
    <cac:Consignment>
      <cbc:ID>1</cbc:ID>
      <cbc:Information>text</cbc:Information>
      <cac:CarrierParty>
        <cac:PartyName>
          <cbc:Name>Name</cbc:Name>
        </cac:PartyName>
        <cac:Person>
          <cac:IdentityDocumentReference>
            <cbc:ID>1234</cbc:ID>
            <cbc:DocumentType>Inv</cbc:DocumentType>
          </cac:IdentityDocumentReference>
        </cac:Person>
      </cac:CarrierParty>
    </cac:Consignment>
    <cac:Delivery>
      <cbc:TrackingID>456789</cbc:TrackingID>
      <cac:EstimatedDeliveryPeriod>
        <cbc:StartDate>2018-09-25</cbc:StartDate>
        <cbc:StartTime>12:00:00</cbc:StartTime>
        <cbc:EndDate>2018-09-27</cbc:EndDate>
        <cbc:EndTime>12:00:00</cbc:EndTime>
      </cac:EstimatedDeliveryPeriod>
      <cac:Despatch>
        <cbc:ActualDespatchDate>2018-09-25</cbc:ActualDespatchDate>
        <cbc:ActualDespatchTime>13:00:00</cbc:ActualDespatchTime>
        <cac:DespatchAddress>
          <cbc:StreetName>Avon Way</cbc:StreetName>
          <cbc:AdditionalStreetName>way 2</cbc:AdditionalStreetName>
          <cbc:CityName>Bridgtow</cbc:CityName>
          <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone>
          <cbc:CountrySubentity>Avon</cbc:CountrySubentity>
          <cac:AddressLine>
            <cbc:Line>3rd Floor, Room 5</cbc:Line>
          </cac:AddressLine>
          <cac:Country>
            <cbc:IdentificationCode>GB</cbc:IdentificationCode>
          </cac:Country>
        </cac:DespatchAddress>
      </cac:Despatch>
    </cac:Delivery>
  </cac:Shipment>
  <cac:DespatchLine>
    <cbc:ID>1</cbc:ID>
    <cbc:Note>Mrs Green agreed to waive charge</cbc:Note>
    <cbc:DeliveredQuantity unitCode="C62">10</cbc:DeliveredQuantity>
    <cbc:OutstandingQuantity unitCode="C62">2</cbc:OutstandingQuantity>
    <cbc:OutstandingReason>text</cbc:OutstandingReason>
    <cac:OrderLineReference>
      <cbc:LineID>1</cbc:LineID>
      <cac:OrderReference>
        <cbc:ID>AEG012345</cbc:ID>
      </cac:OrderReference>
    </cac:OrderLineReference>
    <cac:Item>
      <cbc:Name>beeswax</cbc:Name>
      <cac:BuyersItemIdentification>
        <cbc:ID>6578489</cbc:ID>
      </cac:BuyersItemIdentification>
      <cac:SellersItemIdentification>
        <cbc:ID>17589683</cbc:ID>
      </cac:SellersItemIdentification>
      <cac:StandardItemIdentification>
        <cbc:ID schemeID="0160">1234567891234</cbc:ID>
        <cbc:ExtendedID>22114455</cbc:ExtendedID>
      </cac:StandardItemIdentification>
      <cac:HazardousItem>
        <cbc:UNDGCode>ADR</cbc:UNDGCode>
        <cbc:HazardClassID>Code</cbc:HazardClassID>
      </cac:HazardousItem>
      <cac:AdditionalItemProperty>
        <cbc:Name>Colour</cbc:Name>
        <cbc:Value>Blue</cbc:Value>
      </cac:AdditionalItemProperty>
      <cac:ItemInstance>
        <cbc:ManufactureDate>2018-01-01</cbc:ManufactureDate>
        <cbc:BestBeforeDate>2018-12-01</cbc:BestBeforeDate>
        <cbc:SerialID>4558784</cbc:SerialID>
        <cac:LotIdentification>
          <cbc:LotNumberID>546378239</cbc:LotNumberID>
          <cbc:ExpiryDate>2010-01-01</cbc:ExpiryDate>
        </cac:LotIdentification>
      </cac:ItemInstance>
    </cac:Item>
    <cac:Shipment>
      <cbc:ID>NA</cbc:ID>
      <cac:TransportHandlingUnit>
        <cbc:ID>5454</cbc:ID>
        <cbc:TransportHandlingUnitTypeCode>4H</cbc:TransportHandlingUnitTypeCode>
        <cbc:HazardousRiskIndicator>false</cbc:HazardousRiskIndicator>
        <cbc:ShippingMarks>text</cbc:ShippingMarks>
        <cac:MeasurementDimension>
          <cbc:AttributeID>AAW</cbc:AttributeID>
          <cbc:Measure unitCode="C62">1</cbc:Measure>
        </cac:MeasurementDimension>
        <cac:Package>
          <cbc:ID>126</cbc:ID>
          <cbc:PackagingTypeCode>BX</cbc:PackagingTypeCode>
        </cac:Package>
        <cac:Package>
          <cbc:ID>667</cbc:ID>
          <cbc:PackagingTypeCode>BX</cbc:PackagingTypeCode>
        </cac:Package>
      </cac:TransportHandlingUnit>
    </cac:Shipment>
  </cac:DespatchLine>
</DespatchAdvice>
```

{% endtab %}
{% endtabs %}


# MessageLevelResponse

Base DespatchAdvice example

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/MessageLevelResponse_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ApplicationResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:mlr:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:mlr:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "MLR-ID123"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2016-08-15"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00"
      }
    ],
    "cac:SenderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "7300010000001",
            "$": {
              "schemeID": "0088"
            }
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "7315458756328",
            "$": {
              "schemeID": "0088"
            }
          }
        ]
      }
    ],
    "cac:DocumentResponse": [
      {
        "cac:Response": [
          {
            "cbc:ResponseCode": [
              {
                "_": "RE"
              }
            ],
            "cbc:Description": [
              {
                "_": "Rejected due to validation errore"
              }
            ]
          }
        ],
        "cac:DocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "EnvelopeID-12456789"
              }
            ],
            "cbc:DocumentTypeCode": [
              {
                "_": "9"
              }
            ],
            "cbc:VersionID": [
              {
                "_": "2"
              }
            ]
          }
        ],
        "cac:LineResponse": [
          {
            "cac:LineReference": [
              {
                "cbc:LineID": [
                  {
                    "_": "/Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1]"
                  }
                ]
              }
            ],
            "cac:Response": [
              {
                "cbc:ResponseCode": [
                  {
                    "_": "RE"
                  }
                ],
                "cbc:Description": [
                  {
                    "_": "Validation gives error [CL-T77-R002]- Tax categories MUST be coded using UN/ECE 5305 code list "
                  }
                ],
                "cac:Status": [
                  {
                    "cbc:StatusReasonCode": [
                      {
                        "_": "BV"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"
					 xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
					 xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:mlr:3</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:mlr:3</cbc:ProfileID>
	<cbc:ID>MLR-ID123</cbc:ID>
	<cbc:IssueDate>2016-08-15</cbc:IssueDate>
	<cbc:IssueTime>12:00:00</cbc:IssueTime>
	<cac:SenderParty>
		<cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
	</cac:SenderParty>
	<cac:ReceiverParty>
		<cbc:EndpointID schemeID="0088">7315458756328</cbc:EndpointID>
	</cac:ReceiverParty>
	<cac:DocumentResponse>
		<cac:Response>
			<cbc:ResponseCode>RE</cbc:ResponseCode>
			<cbc:Description>Rejected due to validation errore</cbc:Description>
		</cac:Response>
		<cac:DocumentReference>
			<cbc:ID>EnvelopeID-12456789</cbc:ID>
			<cbc:DocumentTypeCode>9</cbc:DocumentTypeCode>
			<cbc:VersionID>2</cbc:VersionID>
		</cac:DocumentReference>
		<cac:LineResponse>
			<cac:LineReference>
				<cbc:LineID>/Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1]</cbc:LineID>
			</cac:LineReference>
			<cac:Response>
				<cbc:ResponseCode>RE</cbc:ResponseCode>
				<cbc:Description>Validation gives error [CL-T77-R002]- Tax categories MUST be coded using UN/ECE 5305 code list </cbc:Description>
				<cac:Status>
					<cbc:StatusReasonCode>BV</cbc:StatusReasonCode>
				</cac:Status>
			</cac:Response>
		</cac:LineResponse>
	</cac:DocumentResponse>
</ApplicationResponse>
```

{% endtab %}
{% endtabs %}


# MessageLevelStatus

Base DespatchAdvice example

Sample origin: <https://docs.peppol.eu/edelivery/specs/mls/v1.0.0/mls/>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ApplicationResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:peppol:edec:mls:1.0"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:peppol:edec:mls"
      }
    ],
    "cbc:ID": [
      {
        "_": "MLS-ID123"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2025-03-11"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00Z"
      }
    ],
    "cac:SenderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "123456",
            "$": {
              "schemeID": "0299"
            }
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "234567",
            "$": {
              "schemeID": "0299"
            }
          }
        ]
      }
    ],
    "cac:DocumentResponse": [
      {
        "cac:Response": [
          {
            "cbc:ResponseCode": [
              {
                "_": "AB"
              }
            ]
          }
        ],
        "cac:DocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "90f14eff-3705-4869-ad3c-caae270a234e"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"
                     xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                     xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:peppol:edec:mls:1.0</cbc:CustomizationID>
  <cbc:ProfileID>urn:peppol:edec:mls</cbc:ProfileID>
  <cbc:ID>MLS-ID123</cbc:ID>
  <cbc:IssueDate>2025-03-11</cbc:IssueDate>
  <cbc:IssueTime>12:00:00Z</cbc:IssueTime>
  
  <cac:SenderParty>
    <cbc:EndpointID schemeID="0299">123456</cbc:EndpointID>
  </cac:SenderParty>
  
  <cac:ReceiverParty>
    <cbc:EndpointID schemeID="0299">234567</cbc:EndpointID>
  </cac:ReceiverParty>
  
  <cac:DocumentResponse>
    <cac:Response>
      <cbc:ResponseCode>AB</cbc:ResponseCode>
    </cac:Response>
    <cac:DocumentReference>
      <!-- The SBDH envelope InstanceIdentifier of the source message -->
      <cbc:ID>90f14eff-3705-4869-ad3c-caae270a234e</cbc:ID>
    </cac:DocumentReference>
  </cac:DocumentResponse>
</ApplicationResponse>

```

{% endtab %}
{% endtabs %}


# SFTP Integration

The Qvalia SFTP integration handles all Peppol XML Document types by default but we also support "custom" formats.

The SFTP setup is done by our helpdesk, and you will require a Qvalia account prior to being able to test the SFTP integration.

Qvalia hosts an SFTP Server, and both sending and receiving is done through an SFTP client from your environment.

## Custom format

"Custom format" means we can add a transformation for your required format both for outbound (sending) and inbound (receiving) documents. For example, if you use SAP IDoc we can transform incoming Peppol XML to SAP IDoc for you and you'd pick up the ready-made SAP format from our SFTP. Likewise, if you are using outbound, you can upload your SAP IDoc and we will transform it for you.

As long as you have structured data we can add a custom format for you, and handle anything you send to us, as long as it is possible to transform into Peppol BIS 3 format.

Any custom type message must be uploaded to the `/custom` subdirectory on the SFTP, e.g. `/send/custom/`

## Sending and receiving using SFTP

Any inbound (receiving) documents will be uniquely named according to a predefined format including, e.g., the document date and document number, and place in the root directory of your SFTP account.

### Receiving (inbound messages)

We recommend that you follow the common SFTP renaming standards for downloading received files to avoid downloading duplicates in case connection would be interrupted:

* Connect to the SFTP server
* List files
* Start processing file list by:
  * Rename the first file in the list to `{original-filename}.downloading`
  * Start download of `{original-filename}.downloading`
  * Once download is completed, delete `{original-filename}.downloading` from SFTP Server
  * Rename `{original-filename}.downloading` locally back to `{original-filename}`&#x20;

#### Receive Consolidation

If you have multiple accounts set up with us, but want to handle all SFTP communication in one and the same account you can use “consolidation”.

Helpdesk can help you setting up SFTP Consolidation!

```
[dir] ..
  ACCNT1_Order_msg_1.xml
  ACCNT2_Invoice_msg_1.xml
  ACCNT3_OrderResponse_msg_1.xml
```

### Sending (outbound messages)

Outbound (sending) documents from you to your business party must be uploaded by you to the sub-directory named `/send`. The `send` directory is created automatically for you when you opt for the outbound functionality from Qvalia.

{% hint style="warning" %}
When you are uploading files to the Qvalia SFTP you **must** upload them with the original filename and extension, e.g. `my_outbound_invoice01.xml`

I.e. you may not upload using a temporary filename and then rename the file after it has been uploaded!
{% endhint %}

#### Dynamic Routing

We can utilize “dynamic routing” to determine how to best deliver the message (only supported for Invoice and CreditNote).

{% hint style="info" %}
You must contact Helpdesk prior to using dynamic routing!
{% endhint %}

```
/send/dynamic_routing/
```

The message will be inspected to find the delivery information according to your account setup (which you will receive from Helpdesk). The fall-back for dynamic routing is always to print the message and send as a letter.

#### Custom Routing

If you have opted for a custom transformation of messages from Qvalia you will be using the `/custom` directory to upload to. You will receive further instructions from the Qvalia onboarding team on how to handle and package your files.

{% hint style="info" %}
You must contact Helpdesk prior to using custom routing!
{% endhint %}

```
/send/custom/
```

#### Processed files

Once the processing is completed the file will be moved, and renamed, in a sub-directory called `/processed`, meaning you will find your already processed files in `/send/processed/{original-filename}.processed`.

When, and if, you remove (delete) the files form `/processed` is up to you but please note that some SFTP clients can't read too large file lists why we recommend emptying the `/processed` sub-directory at a set interval, depending on the number of files you send.

#### Consolidation

If you have multiple accounts set up with us, but want to handle all SFTP communication in one and the same account you can use “consolidation”.

Helpdesk can help you setting up SFTP Consolidation!

```
[dir] ..
  ACCNT1_Order_msg_1.xml
  ACCNT2_Invoice_msg_1.xml
  ACCNT3_OrderResponse_msg_1.xml
```

For your outgoing messages, you can either opt for file naming, or use subdirectories, for sending over a consolidated account.

```
[dir] ..
  send/
    consolidation.ACCNT1.Order1.xml
    consolidation.ACCNT3.Invoice1.xml
```

```
[dir] ..
  send/
    ACCNT1/
      Order1.xml
    ACCNT3/
      Invoice1.xml
```

## Error handling

When you upload your outbound documents and they should happen to be faulty in some way (e.g. invalid Peppol XML) the file uploaded will be renamed to `{original-filename}.{error type}.error`.

It is up to you to download and inspect any `.error` file that will remain on your SFTP area. We never delete `.error` files, so they'll remain in your `/send` directory until you delete them yourself.

The error types are

* **\*.invalid\_messagetype.error**
  * A file that we cannot recognize and/or handle. It can also be a zero byte (empty) file.
* **\*.validation.error**
  * The uploaded file is invalid Peppol BIS 3
* **\*.peppol\_recipient.error**
  * The recipient of the Peppol message is not registered in the Peppol network, or does not accept the uploaded message type
* **\*.unknown\_internal.error**
  * It's on us, not you; We couldn't handle the file for some reason
* **\*.envelope\_missing.error** (Svefaktura, Finvoice only!)
  * We need the SBD envelope with sender and recipient details in the SBDH
* **\*.unsupported\_messagetype.error**
  * The uploaded ZIP archive contains invalid files
* **\*.mixed\_messagetypes.error**
  * The uploaded ZIP archive, or envelope, contains multiple types of files
* **\*.invalid\_type.error**
  * The uploaded data is not supported by the chosen delivery method
* **\*.invalid\_path.error**
  * The file has been uploaded in a directory we do not actively handle


# Operators

For Swedish operators Qvalia can offer support for the legacy formats Svefaktura 1.0 (Basic Invoice) as well as Svefaktura 2 (Peppol BIS2/4A).

**Qvalia is primarily using the protocol `SFTI Transportprofil Bas 2.0` over `HTTP POST` for the Swedish legacy formats. SFTP transportation can also be accepted, and configured, for any Operator who wants to send legacy formats.**

We **strongly** encourage the usage of **Peppol** instead of legacy formats, but we do understand that some older systems still needs to fall back on older versions of specifications, and we try our best to meet the needs of our customers.

**Please reach out to <peppol@qvalia.com> if you are an Operator who wants to use any of the legacy formats!**

SFTI Transportprofil Bas 2.0 is an old and not supported standard, but as some companies and Operators in Sweden still cling to it Qvalia has the option of POST'ing Transportprofil Bas 2.0 over HTTP.

As we would like to follow the recommendation of the Swedish Government and the IT authorities of Sweden we have deprecated the usage of Svefaktura, and try to move all our customers over to Peppol.

After the 1st of March 2021, no new established Svefaktura connections should be added according to DIGG's recommendations and mandate `MDFFS 2021:1`. See article from SFTI/DIGG here (in Swedish) for more information: <https://sfti.se/sfti/standarder/rekommenderadestandarder/avfordameddelanden.52834.html>

{% tabs %}
{% tab title="Transportprofil Bas 2.0 Request" %}

```plaintext
Content-Type: multipart/related; boundary="BoundarY"; type="text/xml";
soapaction: ebXML
```

```xml
--BoundarY
Content-ID: <ebxhmheader1@avsandare.com>
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns:xlink="http://www.w3.org/1999/xlink"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
	xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
	<SOAP:Header>
	  <eb:MessageHeader SOAP:mustUnderstand="1" eb:version="2.0">
		  <eb:From>
			  <eb:PartyId eb:type="countrycode:organizationid">SE1234567890</eb:PartyId>
		  </eb:From>
			<eb:To>
			  <eb:PartyId eb:type="countrycode:organizationid">SE9876543210</eb:PartyId>
			</eb:To>
			<eb:CPAId>20160214:SE1234567890:SE9876543210</eb:CPAId>
			<eb:ConversationId>20160214:4567:SE1234567890</eb:ConversationId>
			<eb:Service>urn:sfti:services:documentprocessing:BasicInvoice</eb:Service>
			<eb:Action>incomingBasicInvoice</eb:Action>
		  <eb:MessageData>
			  <eb:MessageId>20160214-102030-28572@foretag.se</eb:MessageId>
				<eb:Timestamp>2016-02-14T11:12:12</eb:Timestamp>
			</eb:MessageData>
		</eb:MessageHeader>
		<eb:AckRequested SOAP:mustUnderstand="1" eb:version="2.0" eb:signed="false" SOAP:actor="urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH"/>
		<eb:SyncReply eb:id="" eb:version="2.0" SOAP:mustUnderstand="1" SOAP:actor="http://schemas.xmlsoap.org/soap/actor/next">
		</eb:SyncReply>
	</SOAP:Header>
	<SOAP:Body>
	  <eb:Manifest eb:version="2.0">
		  <eb:Reference xlink:href="cid:ebxmlpayload1@avsandare.com" xlink:type="simple">
			  <eb:Description xml:lang="se">Fritext beskrivning av meddelande</eb:Description>
				<eb:Schema eb:location="urn:se:sfti:collaborationprocesses:BasicInvoice.xsd" eb:version="1.0"></eb:Schema>
			</eb:Reference>
		</eb:Manifest>
	</SOAP:Body>
</SOAP:Envelope>

--BoundarY
Content-ID: <ebxmlpayload1@avsandare.se>
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<StandardBusinessDocument xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
  <StandardBusinessDocumentHeader>
    <HeaderVersion>1.0</HeaderVersion>
    <Sender>
      <Identifier
        Authority="iso6523-actorid-upis">0088:7301234567890</Identifier>
    </Sender>
    <Receiver>
      <Identifier
        Authority="iso6523-actorid-upis">0007:1234567890</Identifier>
    </Receiver>
    <DocumentIdentification>
      <Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</Standard>
      <TypeVersion>2.1</TypeVersion>
      <InstanceIdentifier>2016021401022</InstanceIdentifier>
      <Type>Invoice</Type>
      <CreationDateAndTime>2016-02-14T14:40:38.4644993+02:00</CreationDateAndTime>
    </DocumentIdentification>
    <BusinessScope>
      <Scope>
        <Type>DOCUMENTID</Type>
        <InstanceIdentifier>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1</InstanceIdentifier>
      </Scope>
      <Scope>
        <Type>PROCESSID</Type>
        <InstanceIdentifier>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</InstanceIdentifier>
      </Scope>
    </BusinessScope>
  </StandardBusinessDocumentHeader>
  <Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
    <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
    <cbc:ID>...</cbc:ID>
    <cbc:IssueDate>2016-02-14</cbc:IssueDate>
    <cbc:DueDate>2016-03-31</cbc:DueDate>
    <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode>SEK</cbc:DocumentCurrencyCode>
    <cbc:BuyerReference>...</cbc:BuyerReference>
    <cac:AccountingSupplierParty>
      ...
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
      ...
    </cac:AccountingCustomerParty>
    <cac:PaymentMeans>
      ...
    </cac:PaymentMeans>
    <cac:PaymentTerms>
      ...
    </cac:PaymentTerms>
    <cac:TaxTotal>
      ...
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
      ...
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
      ...
    </cac:InvoiceLine>
  </Invoice>
</StandardBusinessDocument>

--BoundarY––
```

{% endtab %}

{% tab title="Response" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-
  open.org/committees/ebxml-msg/schema/envelope.xsd"
  xmlns:eb="http://www.oasis-
  open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
  <SOAP:Header xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
    http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
    <eb:MessageHeader SOAP:mustUnderstand="1" eb:version="2.0">
      <eb:From>
        <eb:PartyId eb:type="countrycode:organizationid">
        </eb:PartyId>
      </eb:From>
      <eb:To>
        <eb:PartyId eb:type="countrycode:organizationid">
        </eb:PartyId>
      </eb:To>
      <eb:CPAId>
      </eb:CPAId>
      <eb:ConversationId>
      </eb:ConversationId>
      <eb:Service>
      </eb:Service>
      <eb:Action>
      </eb:Action>
      <eb:MessageData>
        <eb:MessageId>
        </eb:MessageId>
        <eb:Timestamp>
        </eb:Timestamp>
        <eb:RefToMessageId>
        </eb:RefToMessageId>
      </eb:MessageData>
    </eb:MessageHeader>
    <eb:Acknowledgment SOAP:mustUnderstand="1" eb:version="2.0" SOAP:actor="urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH">
      <eb:Timestamp>
      </eb:Timestamp>
      <eb:RefToMessageId>
      </eb:RefToMessageId>
      <eb:From>
        <eb:PartyId eb:type="countrycode:organizationid">
        </eb:PartyId>
      </eb:From>
    </eb:Acknowledgment>
  </SOAP:Header>
  <SOAP:Body xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
    http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"/>
</SOAP:Envelope>
```

{% endtab %}
{% endtabs %}


