Complete the OAuth 2.0 authorization code flow to obtain an access token and realmId (company ID) for the target QBO company.
Construct a POST request to https://quickbooks.api.intuit.com/v3/company/{realmId}/invoice with Content-Type: application/json and Authorization: Bearer YOUR_TOKEN.
Build the request body with required fields: CustomerRef (Id and name), Line array with at least one SalesItemLineDetail or DescriptionOnlyLine, and CurrencyRef if multicurrency is enabled.
Parse the response for the returned Invoice object; store the Id and SyncToken fields for any future updates.
To retrieve the invoice, issue a GET to the same base URL appended with /invoice/{invoiceId}.
If the company uses the Sandbox environment, replace the base URL host with sandbox-quickbooks.api.intuit.com.
Known gotchas
The realmId is company-specific and must be captured during the OAuth callback; using the wrong realmId returns a 401 or 403.
Every mutating operation requires the current SyncToken; stale tokens cause a 400 with a 'stale object' error.
Line items must include an Amount field that matches the calculated unit price times quantity or the API will reject the request.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp