/billing_new
/billing_new/invoices

Create from orders

Creates one draft from matching order charges and reports skipped items. Billing period dates do not filter charges. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateFromOrdersReq) -> (InvoiceCreateFromOrdersRes)

post/billing_new/invoices/create_from_orders/v1

Request body

schema_version1 required
invoice_type'accounts_receivable' | 'accounts_payable' required
counterparty_org_idstring nullable

Must be a string starting with org_

counterparty_off_chrt_org_data_idstring nullable
counterparty_driver_idstring nullable
currency_code'USD' | 'CAD' | 'EUR' | 'GBP' | 'MXN' | 'AUD' | 'JPY' | 'CNY' | 'CHF' | 'INR' required
namestring nullable
descriptionstring nullable
export_ref__sage__department_idstring nullable
export_ref__sage__customer_idstring nullable
period_start_at_timestampstring date-time nullable

Supply both bounds or omit both to derive the period from delivery completion days in UTC.

period_end_at_timestampstring date-time nullable

When derived, the exclusive UTC midnight after the last delivery day. Explicit bounds are preserved.

order_idsstring[] required

Response

Successful Response

added_invoice_line_item_idsstring[]
already_invoiced_line_item_idsstring[]
finalized_line_item_idsstring[]
unmatched_line_item_idsstring[]

Charges for another counterparty, invoice type, or currency, regardless of status.

orders_without_added_chargesstring[]

Changes

Changed in 1 of the 9 revisions of this API.1