POST /api/v1/bills creates one ad-hoc invoice in OnboardMe. It does not push the invoice to Xero, and it does not create a proposal billing. Proposal invoices and recurring schedules belong on Proposals.
The client must be an Active client. A lead returns an error. Convert the lead first.
Create
Write access is required. Amounts are tax-exclusive. Each line isamount plus either taxAmount or taxPercent.
billNow is 0 (neither), 1 (upfront), or 2 (on completion). It defaults to 0 when omitted. syncNow and sendBill are stored for later ledger sync and email. This call does not push the invoice to Xero and does not send it unless sendBill is true. sendBill defaults to true when you omit it. Set it false when you only want the invoice stored. If syncNow is true, billNow is stored as 0.
A 201 returns the bill detail, the same shape as GET /api/v1/bills/{billingId}. Store billingID. GET /api/v1/bills/{billingId}/pdf returns the PDF.
When Xero is connected, GET /api/v1/bills/ledger/status returns xeroConnected: true. Every line then also needs:
extAccountIDorextItemID(a Xero account or inventory item)extTaxID, or ataxPercentthat matches a selected Xero tax rate within 0.02 percentage points
GET /api/v1/bills/ledger/accountsforextAccountID(code,name)GET /api/v1/bills/ledger/tax-ratesforextTaxIDand the matchingtaxPercentGET /api/v1/bills/ledger/branding-themesforbrandingThemeIDon the bill header
List by date, not by watermark
Bills do not supportlastUpdated. startDate and endDate are required and inclusive on the bill date:
searchFilter, invoiceStatus (Paid, Unpaid, Partially Paid, Overpaid, Cancelled), and billNowFilter (0, 1, or 2). Page until a short page and upsert on billingID. A bill edited later still has its original billDate, so re-read the window you care about, or GET /api/v1/bills/{billingId}.
List rows include billNumber, billTotal, invoiceStatus, clientName, and Xero fields externalID, externalNumber, externalURL once a later sync has run. syncFailedReason is set when that sync failed.
Recurring bills
This guide’s create call is one invoice. Schedules that run on a cadence are recurring billing:GET /api/v1/recurring-billing/listlists schedules.GET /api/v1/recurring-billing/{recurringBillingId}is one schedule.GET /api/v1/recurring-billing/{recurringBillingId}/runsis the history of invoices that schedule produced.
recurringBillings on POST /api/v1/proposals, not POST /api/v1/bills.
Failures
Bills reference
Create, list, get, and the recurring billing routes.