Skip to content

Postman docs › QuickBooks API (proxy)

QuickBooks API proxy ​

The Odoo module calls the QuickBooks Online Accounting API through QBO Connect. Paths, query strings and bodies are the ones in Intuit's reference. Only the base URL changes: the module sends each request to QBO Connect, signed with the instance secret, instead of to Intuit with a bearer token. QBO Connect checks the request, adds the connection's stored access token, forwards it to Intuit, and returns Intuit's status and body unchanged. Intuit tokens never leave QBO Connect (ADR-019).

There is one generic route and no per-entity endpoint. Every operation in folders 1–12 of the collection goes through it.

Request URL ​

QBO Connect{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/<resource>
Forwarded to (sandbox)https://sandbox-quickbooks.api.intuit.com/v3/company/<realmID>/<resource>
Forwarded to (production)https://quickbooks.api.intuit.com/v3/company/<realmID>/<resource>

QBO Connect uses the environment it runs in (QBO_ENVIRONMENT). A connection made in the other environment is refused with 409 environment_mismatch. It adds minorversion=75 to the forwarded query when the request does not set one.

Collection requestForwarded to Intuit
GET …/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}GET /v3/company/<realmID>/invoice/<id>?minorversion=75
GET …/qbo/v3/company/{{realm_id}}/query?query=select * from ItemGET /v3/company/<realmID>/query?query=…&minorversion=75
POST …/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}}POST /v3/company/<realmID>/invoice?requestid=…&minorversion=75
POST …/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}/send?sendTo=…POST /v3/company/<realmID>/invoice/<id>/send?sendTo=…

Request rules ​

RuleValue
Pathv3/company/{realmId}/ followed by 1–6 segments of [A-Za-z0-9_-]. Anything else returns 404 not_found.
Companyrealm_id must belong to a connection of the calling instance (else 404). The connection must be active and in the current environment, and the licence must be active (409 / 403).
MethodsGET and POST. Anything else returns 405.
POST bodyAt most 5 MiB (413 payload_too_large). Accepted types: application/json; application/text for queries; text/plain; application/octet-stream only with an empty body on {entity}/{id}/send. Anything else, including multipart uploads, returns 415 unsupported_media_type.
Query stringAt most 50 parameters. Names match [A-Za-z][A-Za-z0-9_]*. Values are strings of up to 8000 characters, forwarded exactly as sent.
Acceptapplication/json (the default), application/xml, application/pdf or text/plain.
Timeout125 seconds. Intuit times out at 120 seconds.

Headers ​

You send: the four signing headers (added by the collection's pre-request script), Accept, and Content-Type on POST. Do not send Authorization: QBO Connect adds the bearer token itself.

Sent to Intuit: only Authorization: Bearer <stored token>, Accept, Content-Type and User-Agent.

You receive:

HeaderValue
X-QBO-Upstream-StatusIntuit's HTTP status. Present only on responses that came from Intuit.
intuit_tidIntuit's transaction id. Log it and quote it to Intuit support.
Content-TypeIntuit's content type, for example application/json or application/pdf.
Content-DispositionIntuit's, when present (PDF downloads).
Cache-Control, Pragmano-cache, no-store and no-cache.
Retry-AfterOn 429: seconds to wait.

Other headers from Intuit, such as cookies and server information, are dropped.

Writes and requestid ​

Every write in the collection sends requestid={{request_id}}. The pre-request script generates a new value (pm- + 30 hex characters) before signing.

  • Intuit: a request id must be unique per company. It is at most 50 characters, or 36 for batch. Re-sending the same requestid returns the original response instead of creating a duplicate.
  • QBO Connect resubmits a POST after a 5xx or a network error only when it carries requestid. Always send one on writes.

Responses ​

There are two kinds of responses, and the X-QBO-Upstream-Status header tells them apart.

X-QBO-Upstream-StatusWhere the response comes fromBody
presentIntuit answered. QBO Connect relays the status and body unchanged.Intuit's body: the entity, a QueryResponse, a PDF, or a Fault.
absentQBO Connect refused the request or could not reach Intuit.QBO Connect's {"error": {...}} envelope (see errors).

A 200 from Intuit can still contain a Fault: parse the body. Intuit's JSON fault, as quoted in docs/research/intuit-accounting-api.md:

json
{
  "Fault": {
    "Error": [
      {
        "Message": "<message>",
        "Detail": "<detail>",
        "code": "<code>",
        "element": ""
      }
    ],
    "type": "ValidationFault"
  },
  "time": "2017-09-29T09:17:31.892-07:00"
}

Faults that matter for these requests:

CodeMeaningSource
6240Duplicate Name ExistsIntuit
5010Stale Object: an old SyncTokenIntuit
6220List item with an open balance cannot be deactivatedSeen on the sandbox
6430Wrong income account type for an inventory itemSeen on the sandbox
2020Required parameter missing (for example a sparse Bill update)Seen on the sandbox

Retries and refresh ​

  • Intuit 401: QBO Connect refreshes the access token once and retries once. If Intuit rejects the refresh token (invalid_grant), the connection becomes reauth_required and the call returns 409 connection_reauth_required.
  • Intuit 500, 502, 503, 504, or a network error:
    • resubmitted once for GET, and for POST only with requestid;
    • a connect or DNS timeout counts as a network error, because the request never reached Intuit;
    • a timeout after the request was sent is never resubmitted;
    • if the network error persists, the call returns 503 intuit_unavailable.
  • Intuit 429: relayed with Retry-After of at least 60 seconds. QBO Connect then pauses that company for 60 seconds, and calls during the pause get 429 rate_limited.

Limits ​

LimitValueResponse
Per instance1000 requests per minute429 rate_limited
Per QuickBooks company10 per second and 500 per minute (Intuit's limits). Internal retries count too.429 rate_limited + Retry-After
Batch, per company40 per minute429 rate_limited
Plan's monthly API quotaRequests that reached Intuit, per licence, per calendar month (UTC)429 quota_exceeded, details.scope: "license"; Retry-After = start of next month

Proxy errors ​

HTTPerror.codeWhen
403license_inactiveThe licence is not active.
404not_foundNot a company API path, or the company is not connected to this instance.
405method_not_allowed, http_errorMethod other than GET or POST.
409connection_reauth_requiredQuickBooks access expired or was revoked. Reconnect.
409connection_disconnectedThe connection is disconnected. Connect again.
409environment_mismatchThe connection belongs to the other QuickBooks environment.
413payload_too_largeBody over 5 MiB.
415unsupported_media_typeBody type not accepted (see the rules above).
422validation_failedQuery string breaks the rules above.
429rate_limited, quota_exceededSee Limits.
503intuit_unavailableIntuit could not be reached.

How the collection checks proxied calls ​

The QuickBooks API (proxy) folder runs these tests after every request inside it:

  • relayed from QuickBooks (X-QBO-Upstream-Status). Fails on a QBO Connect error and prints its body.
  • intuit_tid present.
  • no QuickBooks Fault. JSON responses only.

Each request then has its own tests, for example the HTTP status and the returned entity, and stores the ids and SyncTokens that later requests use.

Run order and test data ​

  1. Set realm_id: List connections stores it.
  2. Run folders 1 → 12 in order. Later folders use ids stored by earlier ones: accounts, tax codes, customer, vendor, item.
  3. Test records are named QBOC-TEST <run_id> …. 1. CompanyInfo starts a new run_id, so names stay unique across runs.
  4. Folder 3b only runs with allow_permanent_tax_writes = true. It needs a Postman version with pm.execution.skipRequest.
PageFolder
CompanyInfo and Preferences1. Company & setup
Account2. Accounts (chart of accounts)
Tax3. Tax (TaxCode, TaxRate, TaxAgency) · 3b. Tax set-up writes
Customer4. Customers
Vendor5. Vendors
Item6. Products & services (Item)
Invoice7. Invoices
Payment8. Customer payments (Payment)
CreditMemo9. Credit memos
Bill and BillPayment10. Bills & bill payments
Query, CDC and batch11. Pagination, filtering, CDC & batch
Cleanup12. Cleanup (deactivate test data)

Intuit's own operation matrix, payloads and constraints for these entities are in docs/research/intuit-accounting-entities.md.