An overview of the typical use case to update an invoice, to generate a new invoice for the customer and to correct taxes.
It can happen that invoices have been created but need to be updated due to changes on customer side (e.g. the customer has changed his address in between the order creation and the order invoicing date) or because of changes due to taxes (e.g. the tax rate has changed between the time when the order has been placed and when the product has been shipped or when the invoice has been created).
When updating invoice information, the following rules apply:
When updating an invoice, the following process steps will take place:
To update an invoice, make a PUT /accounting/{version}/businesses/{businessCode}/customers/{customerNumber}/orders/{orderReference}/invoices/{invoiceReference}
request, where {businessCode}
is the ID of the related business entity, {customerNumber}
is the identifier of the affected customer, {orderReference}
is the reference of the related order and invoiceReference
is the reference (as indicated during the creation) of the invoice to be updated.
For more information, please refer to the related endpoint description within the API Explorer.
POST /accounting/v1/businesses/1000/customers/TFI2021072801/orders/ODE12345678901/invoices/IDE12345678901 HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"goodwillReference": "GDE12345678901",
"invoice": {
"dispatchDate": "2018-11-06",
"dueDate": "2018-11-05",
"invoiceDate": "2018-11-04",
"invoiceReference": "IDE12345678901",
"items": [{
"orderItemReference": 1
}],
"shipmentReference": "S01234567"
},
"order": {
"billToAddress": {
...
},
"currency": "EUR",
"orderType": "DIGITAL_GOODS",
"orderDate": "2015-12-10T00:00:00.0000000",
"items": [
{
"grossUnitPrice": 11.9,
"orderItemReference": 1,
"quantity": 1,
"vatAmount": 1.9,
"vatPercent": 19,
"vatType": "NORMAL",
"productId": "WKD12346512A/1",
"description": "Best wishes (Digital card)",
"positionType": "SALES_ARTICLE"
}
],
"orderReference": "ODE12345678901",
"paymentReference": {
...
},
"processAfterDunning": "HAND_OVER_FOR_DEBT_COLLECTION",
"orderChannel": "ECOM",
"supplyingCountry": "DE",
"vatDeclarationCountry": "DE"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"internalRequestId": "23c9579b-baaf-468f-a529-f876226e183c"
}