Sends the invoice for an order revision to the customer through the connected
accounting provider. integrationId identifies the accounting integration and
expectedOrderVersion is the order revision the invoice was drafted for.
invoiceDate and dueDate are unix seconds; omit them to use the provider
defaults.
Sending is a real external side effect. It is made idempotent by
idempotencyKey: reusing the same key returns the prior invoice without
re-sending. A version mismatch is rejected.
Generated Reference
POST/public-api/publicapi.v1.Invoice/SendInvoice
Sends the provider invoice for an order revision to the customer. Triggers a real customer-facing provider send; idempotent per idempotency_key.
RequestSendInvoiceRequest
ResponseSendInvoiceResponse
SendInvoiceRequest
Field
Type
Description
order_id
string
Order whose invoice to send.
integration_id
string
Accounting integration that owns the invoice.
expected_order_version
int32
Order revision the invoice was drafted for.
invoice_date
optional int64
Invoice issue date as unix seconds. Provider default when omitted.
due_date
optional int64
Payment due date as unix seconds. Provider default when omitted.
idempotency_key
string
Idempotency key; reusing it returns the prior invoice without re-sending.
SendInvoiceResponse
Field
Type
Description
invoice
Invoice
The invoice after sending.
Related Types
Invoice
Field
Type
Description
id
string
customer_id
string
order_id
string
order_version
int32
integration_id
string
business_state
InvoiceBusinessState
delivery_state
InvoiceDeliveryState
sync_state
InvoiceSyncState
total_minor
int64
currency
string
external_number
optional string
external_url
optional string
created_at
int64
updated_at
int64
lines
repeated InvoiceLine
Invoice line items, in document order.
invoice_date
optional int64
Invoice issue date as unix seconds, when set by the provider.
due_date
optional int64
Payment due date as unix seconds, when set by the provider.
sent_at
optional int64
Time the invoice was sent to the customer as unix seconds, when sent.
InvoiceLine
Field
Type
Description
description
string
Human-readable line description.
quantity
int32
Quantity billed on this line.
unit_price_minor
int64
Unit price in minor currency units (for example cents).
vat_rate
double
VAT rate applied to this line as a fraction (for example 0.21 for 21%).