Create an invoice for one or more orders atomically.
POST/invoicing/v0/invoice
This API provides invoicing operations including grouped fulfillment (also known as "Samlefaktura") for consolidating multiple verified orders into a single invoice - perfect for scenarios where your customer places multiple orders that should be billed together. Use Cases - Same-day deliveries: Customer places multiple orders throughout the day, invoice once at end of day - Weekly/monthly billing: Consolidate a week's worth of orders into one invoice - Project-based: Multiple orders for the same project combined into one bill How It Works - Single order: Simply fulfills the order to create an invoice - Multiple orders: Merges all line items and totals into one consolidated order, fulfills it, and marks the original orders as CANCELLED (they remain viewable and linked via successor_order_id) The operation is atomic - either all orders are successfully processed and the invoice is created, or the entire operation fails and no changes are made. Requirements All orders must: - Be in VERIFIED or CONFIRMED state - Have the same buyer organization (organization number), same currency and same merchant - Not have been partially fulfilled or be partial orders themselves Important notes - Consolidated order uses the first order's billing details as template - Original merchant order IDs are preserved in the consolidated order's notes - Line items from different orders are combined in sequence (not grouped by order)
Request
Responses
- 201
- 400
- default
Invoice created successfully
Bad Request
Error response