# 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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"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"}}}}}}
```
