# OrderChange 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":[]}],"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}/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":[]}],"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"}},"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":[]}],"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}/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":[]}],"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}/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":[]}],"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"}},"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":[]}],"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}/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"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.qvalia.io/api-documentation/apis/transaction-api/orderchange-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
