The "Create Invoice" interface is used in two main scenarios: to inform Accounting as a Service about an invoice that has already been created by the client and sent to the end-customer, or to initiate the creation of an invoice by Accounting as a Service. Whether Accounting as a Service is responsible for generating invoices is determined during the onboarding process. If set up during onboarding, invoices will always be generated by Accounting as a Service.
The create invoice interface supports two main scenarios:
Please note the following:
General Workflow:
DispatchDate
, Carrier
, and TrackingCode
.To create an invoice, make a POST request to:
POST /accounting/v1/businesses/{businessCode}/customers/{customerNumber}/orders/{orderReference}/invoices
{businessCode}
: Represents the legal entity (e.g., use "1000" in sandbox).{customerNumber}
: The end-customer’s unique identifier used in the create order{orderReference}
: The orderReference provided for the original order in the create orderKey Points: Ensure all mandatory fields are completed as per the API-Explorer.
Request Body Structure
Below is an example of a complete request body for createing an invoice for an order:
{
"carrier": "DHL",
"dispatchDate": "2024-09-12",
"dueDate": "2024-09-12",
"invoiceDate": "2024-09-12",
"invoiceReference": "INV-NL833249069",
"shipmentReference": "ORD-NL8333249069",
"trackingCode": "5cbe48d9-9c3f-46f0-87ab-f1ff3e25d23",
"items": [
{"orderItemReference": 1},
{"orderItemReference": 2}
]
}
DispatchDate
: The date when the items were dispatched.Carrier
: A free-text field specifying the carrier or the provider for digital goods.TrackingCode
: A tracking code provided by the carrier to track the shipment.DueDate
: The date by which the customer must pay, crucial for the dunning process.InvoiceDate
: The date the invoice is issued.InvoiceReference
: The invoice ID that complies with local regulations.Note: The only difference between a full deliveries and a partial deliveries is that for partial deliveries not all line items are included while for full deliveries all line items are included.
You are responsible to track that all line items have a final status. They need to either be cancelled or invoiced in the end.