Order Confirmations
List order confirmations
Credential: a company's API key or OAuth token.
Returns a paginated list of order confirmations.
Filters
| Parameter | Description |
|---|---|
| status | Display status: draft, sent, converted. Derived statuses are resolved server-side. |
| customerId | Filter to one customer. |
| page / limit | Pagination (defaults: page 1, limit 25, max limit 100). |
| sortBy / sortOrder | Sort field (e.g. date, documentNumber, amount, status) and direction. Defaults to newest first. |
Required Scope
order-confirmations-read
query Parameters
cursorOpaque cursor from the previous response's nextCursor. Returns the rows after it, in the same order. Send the same filters and sort as the request that produced it, and do not send page. The preferred way to page through a list.
pageDeprecated: page with cursor instead. Page number (1-indexed). From 2026-12-31, a page past the first of a list with more than 10,000 matching rows is refused.
limitItems per page
statusFilter by display status (draft/sent/converted). Derived statuses are resolved server-side.
customerIdFilter by customer id
sortBySort field: date, documentNumber, amount or status; anything else sorts by creation time. documentNumber cannot be combined with cursor, since documents without a number have no place in its order.
sortOrderSort order
List order confirmations › Responses
Paginated list of order confirmations
List of order confirmations (line items omitted; GET one for lines)
totalTotal number of documents matching the query
limitMaximum number of items per page
nextCursorCursor for the next page; pass it as cursor. null on the last page, and on every page of a sort that cannot page by cursor — hasMore then says whether another page follows by page number.
hasMoreWhether more rows follow this page.
pageDeprecated: page with nextCursor instead. Current page number (1-indexed).
totalPagesDeprecated: page with nextCursor instead. Total number of pages available.
Create a draft order confirmation
Credential: a company's API key or OAuth token.
Creates a draft order confirmation.
- The document number is not allocated here — it is assigned on send.
- Totals (subtotal/vat/amount) are computed from the line items.
Required Scope
order-confirmations-write
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Create a draft order confirmation › Request Body
customerIdCustomer this order confirmation is for
dateDocument date (ISO, YYYY-MM-DD)
customerDepartmentIdCustomer department id
customerContactIdCustomer contact id ("Deres ref.")
currencyCurrency code
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document.
notesMessage printed on the PDF under subject. The customer sees it on the document.
discountIdsDocument-scope discount records to apply once to the whole document, after every line discount, reducing the lines whose product each applies to (every line when it names no product). Each id is a discount record (see GET /discounts). The order sent is the order they apply in. Each is checked for the line's product, the document's customer and the document date; a document converted from a quote is checked at the quote's date. A fixed or per-unit discount takes its amount in the document's currency: a discount with no amount in that currency is refused, never converted at an exchange rate. One applies when it applies to the customer and to at least one line's product. Refused with: DISCOUNT_NOT_APPLICABLE (no such discount in your company, inactive, not assigned to this product and customer, or outside its dates on the document date; details.reason says which), DISCOUNT_WRONG_SCOPE, DISCOUNT_REFERENCED_TWICE, DISCOUNT_NOT_COMBINABLE, DISCOUNT_NO_AMOUNT_IN_CURRENCY, DISCOUNT_LINE_WITHOUT_PRODUCT, DISCOUNT_EXCEEDS_LINE and DISCOUNT_EXCEEDS_DOCUMENT.
discountCodesDiscount codes the customer gave, the same list sent to POST /discounts/check, matched without regard to case or surrounding spaces and applied after discountIds in the order sent. A code claims its discount, which then applies as if named by id, including one that applies only through a code: a line-scope discount lands on every line whose product it applies to, a document-scope one on the document. Saving uses none of the code's own limit: the invoice the document converts to counts it when booked, refused there with DISCOUNT_CODE_REDEMPTION_LIMIT_REACHED. A conversion carries each code with its discount, judged at the date of the document its conversion chain starts at: the quote, or an order confirmation made without one; one converted at the quoted figures keeps its codes as they were. A code naming a discount already named is applied once. Refused with: DISCOUNT_CODE_INVALID (empty, spaces or too long) and DISCOUNT_NOT_APPLICABLE with details.reason codeUnknown, codeInactive, codeExpired or codeCustomerMismatch and details.code, beside every refusal discountIds lists.
Create a draft order confirmation › Responses
Order confirmation created
idDocument identifier
statusStored lifecycle status (draft/sent)
displayStatusStatus to display. Equals status except the derived "converted" state.
dateDocument date (ISO, YYYY-MM-DD)
amountTotal amount including VAT
subtotalSubtotal excluding VAT
vatTotal VAT
currencyCurrency code
createdAtCreated timestamp (ISO)
updatedAtUpdated timestamp (ISO)
The document-scope discount records the document referenced, in the order they applied, each applied once after every line discount. Empty when it referenced none.
totalDiscountedWhat the document's discounts took off in all, in the document's currency: each line's amount before discounts less its amount after them, plus the document discounts. A line discount typed by hand in LedgerBee counts too. Null when the document references no discount record.
documentNumberAllocated document number (null until sent)
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document.
notesMessage printed on the PDF under subject. The customer sees it on the document.
customerIdCustomer id
sourceDocumentIdSource document id (the quote this order confirmation was converted from)
convertedToInvoiceIdId of the invoice this order confirmation was converted into
sentAtTimestamp the document was sent (ISO)
Warnings about the save. Present on the create and update responses only, empty when there is nothing to warn about. A warning never blocks the save.
Get an order confirmation
Credential: a company's API key or OAuth token.
Returns a single order confirmation, including its line items.
Required Scope
order-confirmations-read
path Parameters
idThe order confirmation id
Get an order confirmation › Responses
The order confirmation
idDocument identifier
statusStored lifecycle status (draft/sent)
displayStatusStatus to display. Equals status except the derived "converted" state.
dateDocument date (ISO, YYYY-MM-DD)
amountTotal amount including VAT
subtotalSubtotal excluding VAT
vatTotal VAT
currencyCurrency code
createdAtCreated timestamp (ISO)
updatedAtUpdated timestamp (ISO)
The document-scope discount records the document referenced, in the order they applied, each applied once after every line discount. Empty when it referenced none.
totalDiscountedWhat the document's discounts took off in all, in the document's currency: each line's amount before discounts less its amount after them, plus the document discounts. A line discount typed by hand in LedgerBee counts too. Null when the document references no discount record.
documentNumberAllocated document number (null until sent)
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document.
notesMessage printed on the PDF under subject. The customer sees it on the document.
customerIdCustomer id
sourceDocumentIdSource document id (the quote this order confirmation was converted from)
convertedToInvoiceIdId of the invoice this order confirmation was converted into
sentAtTimestamp the document was sent (ISO)
Warnings about the save. Present on the create and update responses only, empty when there is nothing to warn about. A warning never blocks the save.
Update a draft order confirmation
Credential: a company's API key or OAuth token.
Replaces the editable fields and line items of a draft document.
Line items are replaced wholesale — send the full intended set. A converted
document is read-only (SALES_DOCUMENT_LOCKED_CONVERTED).
Required Scope
order-confirmations-write
path Parameters
idThe order confirmation id
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Update a draft order confirmation › Request Body
customerIdCustomer this order confirmation is for
dateDocument date (ISO, YYYY-MM-DD)
customerDepartmentIdCustomer department id
customerContactIdCustomer contact id ("Deres ref.")
currencyCurrency code
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document. Leave it out to keep the stored subject; send null to clear it.
notesMessage printed on the PDF under subject. The customer sees it on the document.
statusNew stored status (validated against the document type: draft/sent for order confirmations).
discountIdsDocument-scope discount records to apply once to the whole document, after every line discount, reducing the lines whose product each applies to (every line when it names no product). Each id is a discount record (see GET /discounts). The order sent is the order they apply in. Each is checked for the line's product, the document's customer and the document date; a document converted from a quote is checked at the quote's date. A fixed or per-unit discount takes its amount in the document's currency: a discount with no amount in that currency is refused, never converted at an exchange rate. One applies when it applies to the customer and to at least one line's product. On an update, leaving it out keeps the discounts the document has; an empty array removes them. Refused with: DISCOUNT_NOT_APPLICABLE (no such discount in your company, inactive, not assigned to this product and customer, or outside its dates on the document date; details.reason says which), DISCOUNT_WRONG_SCOPE, DISCOUNT_REFERENCED_TWICE, DISCOUNT_NOT_COMBINABLE, DISCOUNT_NO_AMOUNT_IN_CURRENCY, DISCOUNT_LINE_WITHOUT_PRODUCT, DISCOUNT_EXCEEDS_LINE and DISCOUNT_EXCEEDS_DOCUMENT.
discountCodesDiscount codes the customer gave, the same list sent to POST /discounts/check, matched without regard to case or surrounding spaces and applied after discountIds in the order sent. A code claims its discount, which then applies as if named by id, including one that applies only through a code: a line-scope discount lands on every line whose product it applies to, a document-scope one on the document. Saving uses none of the code's own limit: the invoice the document converts to counts it when booked, refused there with DISCOUNT_CODE_REDEMPTION_LIMIT_REACHED. A conversion carries each code with its discount, judged at the date of the document its conversion chain starts at: the quote, or an order confirmation made without one; one converted at the quoted figures keeps its codes as they were. A code naming a discount already named is applied once. On an update, a discount the document carries through a code keeps that code when the update names the discount again without it. Refused with: DISCOUNT_CODE_INVALID (empty, spaces or too long) and DISCOUNT_NOT_APPLICABLE with details.reason codeUnknown, codeInactive, codeExpired or codeCustomerMismatch and details.code, beside every refusal discountIds lists.
Update a draft order confirmation › Responses
Order confirmation updated
idDocument identifier
statusStored lifecycle status (draft/sent)
displayStatusStatus to display. Equals status except the derived "converted" state.
dateDocument date (ISO, YYYY-MM-DD)
amountTotal amount including VAT
subtotalSubtotal excluding VAT
vatTotal VAT
currencyCurrency code
createdAtCreated timestamp (ISO)
updatedAtUpdated timestamp (ISO)
The document-scope discount records the document referenced, in the order they applied, each applied once after every line discount. Empty when it referenced none.
totalDiscountedWhat the document's discounts took off in all, in the document's currency: each line's amount before discounts less its amount after them, plus the document discounts. A line discount typed by hand in LedgerBee counts too. Null when the document references no discount record.
documentNumberAllocated document number (null until sent)
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document.
notesMessage printed on the PDF under subject. The customer sees it on the document.
customerIdCustomer id
sourceDocumentIdSource document id (the quote this order confirmation was converted from)
convertedToInvoiceIdId of the invoice this order confirmation was converted into
sentAtTimestamp the document was sent (ISO)
Warnings about the save. Present on the create and update responses only, empty when there is nothing to warn about. A warning never blocks the save.
Convert an order confirmation into an invoice
Credential: a company's API key or OAuth token.
Converts the order confirmation into an invoice (target: "invoice").
By default the source document's fields and line items are copied verbatim. To
review and adjust the target before finalizing, supply an optional document
payload — its fields override the copied values.
A document converts only once. Re-converting fails with
SALES_DOCUMENT_ALREADY_CONVERTED_TO_INVOICE.
The conversion is refused when the resulting invoice total (VAT included) is
below 0: an invoice cannot have a negative total. The request fails with 400
and INVOICE_INVALID_SIGN, and no invoice is created. The document for a
negative total is a credit note — create it with POST /v1/credit-notes. A
total of exactly 0 converts.
A discount record the order confirmation references may have been edited,
switched off or moved out of its window since it was priced. discountPricing
picks how the invoice is priced: asQuoted keeps the order confirmation's
figures, current uses the records as they are now (checked at the date of the
quote the order confirmation was converted from, else its own date) and refuses
one that no longer applies with DISCOUNT_NOT_APPLICABLE. Omitted, the
conversion prices at the current records and warnings lists a
DISCOUNT_CHANGED_SINCE_QUOTE entry, with both figures, for each discount that
changed. The invoice keeps the choice: a later edit prices the order
confirmation's discounts the same way.
The response identifies the produced invoice via targetType ("invoice") and
targetId.
Required Scope
order-confirmations-write
path Parameters
idThe order confirmation id to convert
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Convert an order confirmation into an invoice › Request Body
targetTarget to convert into. An order confirmation only ever converts into an "invoice".
Edited target document (review-before-finalize). Omit to copy the source verbatim.
discountPricingHow the discount records the source references are priced when a record was edited, switched off or moved out of its window after the source was priced. asQuoted keeps the source's saved figures. current prices the records as they are now, at the source's date, and refuses a record that no longer applies (DISCOUNT_NOT_APPLICABLE). Omitted means current; the response then lists a DISCOUNT_CHANGED_SINCE_QUOTE warning for each discount whose figures differ.
Convert an order confirmation into an invoice › Responses
Conversion result
targetTypeType of document produced by the conversion (always "invoice")
targetIdIdentifier of the produced document
One per discount whose figures differ from the source document's, when the request named no discountPricing and the conversion priced at the current records. Empty otherwise. A warning never blocks the conversion.
Download an order confirmation as PDF
Credential: a company's API key or OAuth token.
Renders and streams the document as a PDF (application/pdf).
Pass ?draft=true to render an unfinalized "draft" watermark preview before
the document is sent.
Required Scope
order-confirmations-read
path Parameters
idThe order confirmation id
query Parameters
draftRender a draft-watermarked preview when "true".
Download an order confirmation as PDF › Responses
PDF binary stream
Send an order confirmation
Credential: a company's API key or OAuth token.
Sends the document. This allocates the document number (if not already set), renders the PDF, optionally emails it, and marks the document sent.
Delivery
deliveryType: "Manual"(default) — allocates the number and marks sent without emailing. Use this when you will deliver the PDF yourself (download it viaGET /:id/pdf).deliveryType: "Email"— emails the rendered PDF. The recipient resolves fromrecipientEmail(override), else the customer contact, else the customer email. If none can be resolved the request fails withSALES_DOCUMENT_MISSING_RECIPIENT.
Sproom / e-invoice does not apply to order confirmations — there is no legal e-invoice type for an order confirmation.
A document that has already been converted is read-only and cannot be sent
(SALES_DOCUMENT_LOCKED_CONVERTED).
Required Scope
order-confirmations-write
path Parameters
idThe order confirmation id
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Send an order confirmation › Request Body
deliveryTypeDelivery method. Defaults to Manual. Sproom/e-invoice does not apply to order confirmations.
recipientEmailOverride recipient email for Email delivery
Send an order confirmation › Responses
Order confirmation sent
idDocument identifier
statusStored lifecycle status (draft/sent)
displayStatusStatus to display. Equals status except the derived "converted" state.
dateDocument date (ISO, YYYY-MM-DD)
amountTotal amount including VAT
subtotalSubtotal excluding VAT
vatTotal VAT
currencyCurrency code
createdAtCreated timestamp (ISO)
updatedAtUpdated timestamp (ISO)
The document-scope discount records the document referenced, in the order they applied, each applied once after every line discount. Empty when it referenced none.
totalDiscountedWhat the document's discounts took off in all, in the document's currency: each line's amount before discounts less its amount after them, plus the document discounts. A line discount typed by hand in LedgerBee counts too. Null when the document references no discount record.
documentNumberAllocated document number (null until sent)
referencePO number ("PO-nr.")
ourReferenceOur reference ("Vores ref.")
subjectHeading printed in bold on the PDF, directly above notes. The customer sees it on the document.
notesMessage printed on the PDF under subject. The customer sees it on the document.
customerIdCustomer id
sourceDocumentIdSource document id (the quote this order confirmation was converted from)
convertedToInvoiceIdId of the invoice this order confirmation was converted into
sentAtTimestamp the document was sent (ISO)
Warnings about the save. Present on the create and update responses only, empty when there is nothing to warn about. A warning never blocks the save.