Create a QuickBooks Online invoice from a completed field service job/invoice record.
domain: developer.intuit.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
QuickBooks OAuth refresh token rotation — the full failure-mode walkthrough related to developer.intuit.com, checked against official docs, with linked verified routes.
Steps
Complete QBO's OAuth2 authorization-code flow to get an access token scoped to the customer's realmId (company).
Map the FSM customer to an existing QBO Customer (CustomerRef); QBO requires a valid CustomerRef.value on every invoice.
POST the invoice to https://quickbooks.api.intuit.com/v3/company/{realmId}/invoice with Line items using SalesItemLineDetail (ItemRef, quantity, rate).
Set Content-Type/Accept to application/json and send an Authorization bearer header on the request.
For updates (not creates), include the existing Id and current SyncToken — QBO rejects updates with a stale SyncToken.
Known gotchas
Every update call needs the invoice's current SyncToken; concurrent edits from the QBO UI will invalidate a token you cached from an earlier read.
Line items must reference existing QBO Item (ItemRef) records — you can't invoice free-text line items without first creating/matching an Item.
realmId (company ID) is separate from the OAuth token and must be tracked per connected QBO company, especially if a customer reconnects or switches companies.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?