Skip to content

QBO Connect Postman collection ​

qbo-connect.postman_collection.json calls QBO Connect the way the Odoo module does: it registers an Odoo instance, connects a QuickBooks Online company, and sends QuickBooks Online Accounting API requests through the QBO Connect proxy. This folder documents every request in the collection, one page per resource, in the layout of Intuit's API reference: the object, then each operation with its request body, response, request URL and samples.

The contract behind it is docs/api/API_CONTRACTS.md. When the two disagree, the contract and its tests win; update this folder with them.

Reference ​

PagePostman folderRequests
HealthInstance APIHealth
InstanceInstance APIRegister instance, Rotate secret, Recover instance
Connect sessionInstance APIStart connect, Start reconnect
ConnectionInstance APIList connections, Show connection, Show connection with result code, Confirm resync, Disconnect
Access token (handoff)Instance APIGet access token
Webhooks to OdooNone: QBO Connect sends them to OdooHeaders, signature check (Python), events, retries, resync
QuickBooks API proxyQuickBooks API (proxy)How every proxied request works: URL, rules, headers, errors, limits
CompanyInfo and Preferences1. Company & setup2
Account2. Accounts (chart of accounts)7
Tax: TaxCode, TaxRate, TaxAgency, TaxService3. Tax · 3b. Tax set-up writes5 + 3
Customer4. Customers5
Vendor5. Vendors4
Item6. Products & services (Item)9
Invoice7. Invoices9
Payment8. Customer payments (Payment)8
CreditMemo9. Credit memos5
Bill and BillPayment10. Bills & bill payments11
Query, CDC and batch11. Pagination, filtering, CDC & batch8
Cleanup12. Cleanup (deactivate test data)13

Sample values in these pages (ids, times, amounts) are illustrative. Responses relayed from QuickBooks are abridged to the fields the collection sends or checks; each page links to Intuit's reference for the full object.

Before you start ​

  • QBO Connect running. Local set-up: docs/local-dev/LOCAL_DEV.md.
  • A licence key.
    • With the default licence driver (subscription), use the QBOC-… key from the customer panel (Licence key page) of a subscribed organisation.
    • With QBO_LICENSE_DRIVER=mock, allowed only in local development, any WK-… key works and stands for an active licence. The collection's default WK-TEST-LOCAL-0001 is such a key.
  • A QuickBooks sandbox company, for the QuickBooks API (proxy) folders: see docs/local-dev/INTUIT_SANDBOX_SETUP.md.
    • Never run these folders against a production company. They create, change, void and delete data.

Quick start ​

  1. Import qbo-connect.postman_collection.json into Postman.
  2. Open the collection's Variables tab and set base_url, odoo_base_url, odoo_callback_path and license_key (see Collection variables).
  3. Send Health. Expect 200 with "status": "ok".
  4. Send Register instance. Its test stores instance_id and instance_secret. The secret is shown only once.
  5. Send Start connect, then do the Intuit sign-in in a browser:
    • The Postman console prints connect_url. Open it in a browser within 10 minutes.
    • Sign in with Intuit and choose the sandbox company.
    • The browser is sent back to {{odoo_base_url}}/qbo/return?qbo_status=connected&connection_id=…&result_code=…. If nothing listens on that address, read the values from the browser's address bar.
  6. Send List connections. When they are empty, it stores connection_id and realm_id.
  7. Optional: put the result_code from step 5 in the variable of that name and send Show connection with result code.
  8. Run the folders under QuickBooks API (proxy) in order, 1 → 12, for example with the Collection Runner.
    • Later folders use ids stored by earlier ones.
    • Folder 3b is skipped unless allow_permanent_tax_writes is true.

Authentication: request signing ​

Three requests are unsigned: Health, Register instance and Recover instance. Every other request is signed with the instance secret by the collection's pre-request script, exactly as the Odoo module signs it. You do not add these headers yourself.

HeaderValue
X-QBO-Instanceinstance_id (inst_ + 26 characters)
X-QBO-TimestampUnix time in seconds. QBO Connect accepts ±300 seconds of clock difference.
X-QBO-NonceA new random value per request, 16–128 characters of [A-Za-z0-9_-]. A nonce can be used only once.
X-QBO-Signaturev1= + hex HMAC-SHA256 of the canonical string, keyed with instance_secret

The canonical string is seven lines joined with \n:

text
QBO1-HMAC-SHA256
POST                                   ← method, upper case
/api/v1/qbo/v3/company/9341.../invoice ← path only: no host, no query, no trailing slash
requestid=pm-3f2a...                   ← query as sent: keys sorted, RFC 3986 encoded; empty line if no query
1764583200                             ← same value as X-QBO-Timestamp
5f0c1d6e9a8b4c3d2e1f0a9b8c7d6e5f       ← same value as X-QBO-Nonce
e3b0c44298fc1c149afbf4c8996fb924...    ← hex SHA-256 of the exact body bytes (of "" when empty)

How the script builds it:

  • It signs the body after Postman replaces {{variables}}, so the hash covers the bytes that are sent.
  • If base_url contains a sub-directory, the script removes it, so the signed path starts at /api/v1/.
  • Query values are parsed the way the server parses them (the last duplicate wins), then sorted and re-encoded. QBO Connect never trims query values or turns empty ones into null, so what you send is what is verified.
  • Before signing, every request gets a fresh request_id (pm- + 30 hex characters). The write requests send it to QuickBooks as requestid.
  • run_id is set if it is empty.

Reference implementations: tests/Concerns/SignsInstanceRequests.php (PHP) and tools/mock-odoo/lib.php (PHP client). The Python version for the Odoo module is in API_CONTRACTS.md.

Signing failures return 401 with one of these codes:

CodeMeaning
signature_missingOne of the four headers is missing.
timestamp_out_of_rangeThe clock is more than 300 seconds off.
nonce_reusedThe nonce was already used. Postman generates a new one for every send.
invalid_signatureUnknown instance_id, wrong secret, or the request changed after signing.

Collection variables ​

Variables you set ​

VariableDefaultDescription
base_urlhttp://localhost:8000QBO Connect's address (its APP_URL), without /api/v1.
odoo_base_urlhttp://127.0.0.1:8069The Odoo origin registered as the instance's base URL (scheme, host, port).
odoo_callback_path/qbo_connect/webhookWebhook path on the Odoo origin: /qbo_connect/webhook for mock Odoo, /quickbook_online_connector/webhook for the Odoo module.
license_keyWK-TEST-LOCAL-0001Licence key used by Register instance and Recover instance.
recovery_codeemptyOne-time recovery code from Webkul support (Recover instance only).
result_codeemptyresult_code from the browser return after connecting.
realm_idemptyQuickBooks company id. List connections fills it; set it by hand to use another connection.
allow_permanent_tax_writesfalsetrue runs folder 3b, which creates a tax agency and tax code that cannot be deleted.
test_emailqboc-test@example.comReserved example.com address for test customers, vendors and invoice e-mails.
start_position1Query paging: 1-based STARTPOSITION.
max_results2Query paging: MAXRESULTS (at most 1000).

Plain http URLs work only in local development (APP_ENV=local, sandbox keys), for localhost and for private IPs listed in QBO_DEV_ALLOWED_PRIVATE_IPS in QBO Connect's .env. Anywhere else, odoo_base_url must be https on a public host (ADR-026).

Variables the requests set ​

Set byVariables
Pre-request script (every request)request_id (per request); run_id when empty
Register instance, Rotate secret, Recover instanceinstance_id, instance_secret (Recover instance also clears recovery_code)
List connectionsconnection_id, realm_id, only when they are empty
Show connection, Confirm resyncsync_missed_events: sync_required.missed_events, empty when there is nothing to resync
1. CompanyInforun_id (new test run), changed_since (6 hours ago)
2. Accountsincome_account_id, expense_account_id, bank_account_id, account_id, account_sync_token
3. Taxtax_code_id, sales_tax_code_id, purchase_tax_code_id, tax_rate_id
3b. Tax set-up writestax_agency_id, new_tax_code_id
4. Customerscustomer_id, customer_sync_token
5. Vendorsvendor_id, vendor_sync_token
6. Itemsitem_id, item_sync_token, noninventory_item_id, inventory_item_id, product_income_account_id, asset_account_id, cogs_account_id
7. Invoicesinvoice_id, invoice_sync_token, invoice_total
8. Paymentspay_invoice_id, pay_invoice_total, pay_invoice_sync_token, payment_id, payment_sync_token
9. Credit memoscreditmemo_id, creditmemo_sync_token
10. Billsbill_id, bill_sync_token, bill_total, billpayment_id, billpayment_sync_token
11. Query, CDC & batchstart_position, batch_invoice_id, batch_invoice_sync_token, batch_creditmemo_id, batch_creditmemo_sync_token
12. Cleanupcleanup_sync_token

Responses and errors ​

QBO Connect's own errors always use this envelope. details is present only when there is something to add:

json
{
  "error": {
    "code": "validation_failed",
    "message": "The request is invalid.",
    "details": { "fields": { "base_url": ["…"] } }
  }
}

message is plain text that the Odoo module can show to the user. Decide what to do from code, not from message.

HTTPerror.codeMeaning
401signature_missing, invalid_signature, timestamp_out_of_range, nonce_reusedSigning problem (see above).
403license_invalid, license_inactive, instance_suspended, recovery_failed, token_handoff_disabledRefused. Show the message.
404not_foundUnknown id or realm, or it belongs to another instance.
405method_not_allowed, http_errorThe proxy accepts GET and POST only.
409connection_reauth_required, connection_disconnected, environment_mismatch, instance_limit_reached, instance_already_registeredReconnect, connect, or contact support.
413payload_too_largeProxy request body over 5 MiB.
415unsupported_media_typeProxy POST body type not accepted.
422validation_failedInvalid input; details.fields names the fields.
429rate_limited, quota_exceededSlow down; see Retry-After.
503intuit_unavailable, license_service_unavailableRetry later with backoff.

Responses relayed from QuickBooks are different: they carry Intuit's own status and body plus the header X-QBO-Upstream-Status. See QuickBooks API proxy.

Responses that carry a secret, a token or a connect link are sent with Cache-Control: no-cache, no-store and Pragma: no-cache.

Rate limits and quotas ​

These are the defaults; most can be changed in QBO Connect's .env.

LimitDefaultScopeWhen exceeded
Failed signature checks30 per minuteper IP429 rate_limited
Register instance10 per minuteper IP429 rate_limited
Recover instance5 per minuteper IP429 rate_limited
Other Instance API requests120 per minuteper instance429 rate_limited
QuickBooks API proxy1000 per minuteper instance429 rate_limited
Per QuickBooks company (Intuit's limits)10 per second, 500 per minute, batch 40 per minuteper company429 rate_limited
After Intuit answers 42960-second pauseper company429 rate_limited
Plan's monthly API quotafrom the plan (none for mock licences)per licence, calendar month (UTC)429 quota_exceeded, details.scope: "license"

Every 429 from QBO Connect has a Retry-After header with the seconds to wait.

Test data and safety ​

  • Sandbox only. The proxy folders write real records to whichever company realm_id points at.
  • Test names. Records are named QBOC-TEST <run_id> …; 1. CompanyInfo starts a new run_id for each run. E-mails go to test_email, a reserved example.com address.
  • Cleanup. Folder 12 deactivates the test records; transactions are deleted in their own folders. Folder 3b's tax agency and tax code are permanent, because the API cannot delete them.
  • Never share the secret. Never commit, export or share the collection with instance_secret or recovery_code filled in. Clear them first.
  • Lost secret. Use Rotate secret while the old secret still works. Otherwise, ask Webkul support for a recovery code and use Recover instance.
  • Not in this collection. Webhooks from QBO Connect to Odoo are not Postman requests. See Webhooks to Odoo and tools/mock-odoo.

Verification ​

  • Sandbox, 2026-12-01. Every proxied operation in the collection was run against a sandbox company with tools/mock-odoo/sandbox-check.php: 84/84 passed.
  • Collection run. The collection itself was run in a Node emulation of the Postman sandbox, not in Postman or Newman: 90 requests and 432 assertions, 0 failed and 3 skipped (folder 3b). Recorded in docs/progress/PROGRESS.md (T-24).
  • Instance API. Its behaviour is covered by the feature tests in tests/Feature/{Api,Connect,Tokens}, with Intuit mocked.
  • Confirm resync was added on 2026-12-02, after the collection run above. It is covered by tests/Feature/Api/ConnectionsApiTest.php, with Intuit mocked.
  • Webhooks to Odoo. Covered by the feature tests in tests/Feature/Webhooks, with Intuit and Odoo mocked, and by the concurrency tests in tests/Feature/Concurrency, which run real parallel processes on MySQL and Redis. No Intuit sandbox webhook has been delivered end to end yet.