Bills
List Bills
Paginated landed cost bills listing for the list view (`/v2/purchases/bills`). Lists every bill across all three link types (Purchase Order, Warehouse Transfer, Inbound Shipment) with computed totals, allocation status, and source (OCR vs manual).
Export Bills
Export landed cost bills as XLSX or CSV. The response is a binary file download, not JSON.
Get Bill
Returns a bill with its supplier, lines, allocations, and related purchase order / warehouse transfer data.
Update Bill
Updates an existing bill's header data and allocations.
Delete Bill
Deletes a bill.
Get Bill Line Items
Lean lines + allocations payload for the expandable row in the landed cost bills list view.
Get Bill Payees
Lists the distinct suppliers actually referenced by existing bills, ordered by name (may include grandfathered goods suppliers on migrated bills). Backs the Supplier filter on the bills list page.
Get Eligible Bill Payees
Lists all suppliers eligible to be billed: non-archived, service-type suppliers, ordered by name. Backs the payee picker on the landed-cost and cost-entry create/edit forms (where new bills are created).
Create Bill
Creates a standalone bill. Note: This endpoint is currently not used in practice — bills are typically created via purchase order or warehouse transfer nested routes.
Bulk Delete Bills
Bulk delete landed cost bills by explicit IDs or by list filters ('all filtered' scope).
Update Bill Lines
Batch updates the lines of a bill. Replaces existing lines with the provided collection.
Get Available Lines for Manual Allocation
Returns purchase order and warehouse transfer lines that are available for manual cost allocation to this bill. Includes pre-calculated allocation amounts.
Generate Accounting Transaction
Generates (or regenerates) the accounting posting for a landed-cost bill. On tenants using the v2 ledger, this synchronously rebuilds the bill's ledger journal entry; on legacy tenants it creates the accounting transaction. Safe to call repeatedly — an existing entry is superseded, not duplicated.
Create Cost Entries from Bill Lines
Create one cost entry per selected bill line, each tracking a chosen amount of that line for profitability analysis. This is the `scope: 'lines'` mode of the endpoint; to track the whole remaining bill as a single entry, see 'Create Cost Entry from Bill' (same URL, `scope: 'entire'`).
Get Bill Profitability Summary
Get a profitability-tracking summary for a bill: how much of the bill's total has been turned into cost entries, how much remains untracked, and the full list of cost entries created from the bill.
Get Bill Lines Availability
List every line on a bill with how much of each line has already been tracked as cost entries and how much is still available, plus bill-level totals.
Get Bill Line Availability
Get the tracking availability for a single bill line: its total, how much has already been tracked as cost entries, and how much is still available.
List Bill Payments
Lists all payments recorded against a landed-cost bill (supplier payments applied to the bill). Payments two-way sync with the connected accounting provider.
Add Bill Payment
Records a payment against a landed-cost bill and recalculates the bill's paid status. The payment is pushed to the connected accounting provider (Xero / QuickBooks Online).
Update Bill Payment
Updates an existing bill payment and recalculates the bill's paid status. The change is re-synced to the connected accounting provider.
Delete Bill Payment
Deletes a bill payment and recalculates the bill's paid status. The corresponding provider payment is voided/removed on the connected accounting provider.
Get Bill Activity Log
Paginated audit history for a bill — who changed what and when, including field-level before/after values.
List Bill Notes
Paginated notes attached to a bill, newest first.
Add Bill Note
Adds a note to a bill.
Toggle Bill Note Pin
Pins or unpins a bill note (toggles its pinned state).
Delete Bill Note
Deletes a bill note.
Sync Bill Tags
Replaces the full set of tags on a bill with the provided list.
List Bill Documents
Lists the scanned source invoice documents linked to a bill.
Reset Bill Due Date to Term
Discards a manually-overridden due date on a landed-cost bill and re-derives it from the bill's effective payment term (its own term, else the linked purchase order's term, else the supplier default). The response's `due_date_source` returns to `derived` (or `none` when no term is resolvable).