Theme
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
| Page | Postman folder | Requests |
|---|---|---|
| Health | Instance API | Health |
| Instance | Instance API | Register instance, Rotate secret, Recover instance |
| Connect session | Instance API | Start connect, Start reconnect |
| Connection | Instance API | List connections, Show connection, Show connection with result code, Confirm resync, Disconnect |
| Access token (handoff) | Instance API | Get access token |
| Webhooks to Odoo | None: QBO Connect sends them to Odoo | Headers, signature check (Python), events, retries, resync |
| QuickBooks API proxy | QuickBooks API (proxy) | How every proxied request works: URL, rules, headers, errors, limits |
| CompanyInfo and Preferences | 1. Company & setup | 2 |
| Account | 2. Accounts (chart of accounts) | 7 |
| Tax: TaxCode, TaxRate, TaxAgency, TaxService | 3. Tax · 3b. Tax set-up writes | 5 + 3 |
| Customer | 4. Customers | 5 |
| Vendor | 5. Vendors | 4 |
| Item | 6. Products & services (Item) | 9 |
| Invoice | 7. Invoices | 9 |
| Payment | 8. Customer payments (Payment) | 8 |
| CreditMemo | 9. Credit memos | 5 |
| Bill and BillPayment | 10. Bills & bill payments | 11 |
| Query, CDC and batch | 11. Pagination, filtering, CDC & batch | 8 |
| Cleanup | 12. 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 theQBOC-…key from the customer panel (Licence key page) of a subscribed organisation. - With
QBO_LICENSE_DRIVER=mock, allowed only in local development, anyWK-…key works and stands for an active licence. The collection's defaultWK-TEST-LOCAL-0001is such a key.
- With the default licence driver (
- 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
- Import
qbo-connect.postman_collection.jsoninto Postman. - Open the collection's Variables tab and set
base_url,odoo_base_url,odoo_callback_pathandlicense_key(see Collection variables). - Send Health. Expect
200with"status": "ok". - Send Register instance. Its test stores
instance_idandinstance_secret. The secret is shown only once. - 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.
- The Postman console prints
- Send List connections. When they are empty, it stores
connection_idandrealm_id. - Optional: put the
result_codefrom step 5 in the variable of that name and send Show connection with result code. - 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_writesistrue.
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.
| Header | Value |
|---|---|
X-QBO-Instance | instance_id (inst_ + 26 characters) |
X-QBO-Timestamp | Unix time in seconds. QBO Connect accepts ±300 seconds of clock difference. |
X-QBO-Nonce | A new random value per request, 16–128 characters of [A-Za-z0-9_-]. A nonce can be used only once. |
X-QBO-Signature | v1= + 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_urlcontains 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 asrequestid. run_idis 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:
| Code | Meaning |
|---|---|
signature_missing | One of the four headers is missing. |
timestamp_out_of_range | The clock is more than 300 seconds off. |
nonce_reused | The nonce was already used. Postman generates a new one for every send. |
invalid_signature | Unknown instance_id, wrong secret, or the request changed after signing. |
Collection variables
Variables you set
| Variable | Default | Description |
|---|---|---|
base_url | http://localhost:8000 | QBO Connect's address (its APP_URL), without /api/v1. |
odoo_base_url | http://127.0.0.1:8069 | The Odoo origin registered as the instance's base URL (scheme, host, port). |
odoo_callback_path | /qbo_connect/webhook | Webhook path on the Odoo origin: /qbo_connect/webhook for mock Odoo, /quickbook_online_connector/webhook for the Odoo module. |
license_key | WK-TEST-LOCAL-0001 | Licence key used by Register instance and Recover instance. |
recovery_code | empty | One-time recovery code from Webkul support (Recover instance only). |
result_code | empty | result_code from the browser return after connecting. |
realm_id | empty | QuickBooks company id. List connections fills it; set it by hand to use another connection. |
allow_permanent_tax_writes | false | true runs folder 3b, which creates a tax agency and tax code that cannot be deleted. |
test_email | qboc-test@example.com | Reserved example.com address for test customers, vendors and invoice e-mails. |
start_position | 1 | Query paging: 1-based STARTPOSITION. |
max_results | 2 | Query 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 by | Variables |
|---|---|
| Pre-request script (every request) | request_id (per request); run_id when empty |
| Register instance, Rotate secret, Recover instance | instance_id, instance_secret (Recover instance also clears recovery_code) |
| List connections | connection_id, realm_id, only when they are empty |
| Show connection, Confirm resync | sync_missed_events: sync_required.missed_events, empty when there is nothing to resync |
| 1. CompanyInfo | run_id (new test run), changed_since (6 hours ago) |
| 2. Accounts | income_account_id, expense_account_id, bank_account_id, account_id, account_sync_token |
| 3. Tax | tax_code_id, sales_tax_code_id, purchase_tax_code_id, tax_rate_id |
| 3b. Tax set-up writes | tax_agency_id, new_tax_code_id |
| 4. Customers | customer_id, customer_sync_token |
| 5. Vendors | vendor_id, vendor_sync_token |
| 6. Items | item_id, item_sync_token, noninventory_item_id, inventory_item_id, product_income_account_id, asset_account_id, cogs_account_id |
| 7. Invoices | invoice_id, invoice_sync_token, invoice_total |
| 8. Payments | pay_invoice_id, pay_invoice_total, pay_invoice_sync_token, payment_id, payment_sync_token |
| 9. Credit memos | creditmemo_id, creditmemo_sync_token |
| 10. Bills | bill_id, bill_sync_token, bill_total, billpayment_id, billpayment_sync_token |
| 11. Query, CDC & batch | start_position, batch_invoice_id, batch_invoice_sync_token, batch_creditmemo_id, batch_creditmemo_sync_token |
| 12. Cleanup | cleanup_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.
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | signature_missing, invalid_signature, timestamp_out_of_range, nonce_reused | Signing problem (see above). |
| 403 | license_invalid, license_inactive, instance_suspended, recovery_failed, token_handoff_disabled | Refused. Show the message. |
| 404 | not_found | Unknown id or realm, or it belongs to another instance. |
| 405 | method_not_allowed, http_error | The proxy accepts GET and POST only. |
| 409 | connection_reauth_required, connection_disconnected, environment_mismatch, instance_limit_reached, instance_already_registered | Reconnect, connect, or contact support. |
| 413 | payload_too_large | Proxy request body over 5 MiB. |
| 415 | unsupported_media_type | Proxy POST body type not accepted. |
| 422 | validation_failed | Invalid input; details.fields names the fields. |
| 429 | rate_limited, quota_exceeded | Slow down; see Retry-After. |
| 503 | intuit_unavailable, license_service_unavailable | Retry 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.
| Limit | Default | Scope | When exceeded |
|---|---|---|---|
| Failed signature checks | 30 per minute | per IP | 429 rate_limited |
| Register instance | 10 per minute | per IP | 429 rate_limited |
| Recover instance | 5 per minute | per IP | 429 rate_limited |
| Other Instance API requests | 120 per minute | per instance | 429 rate_limited |
| QuickBooks API proxy | 1000 per minute | per instance | 429 rate_limited |
| Per QuickBooks company (Intuit's limits) | 10 per second, 500 per minute, batch 40 per minute | per company | 429 rate_limited |
After Intuit answers 429 | 60-second pause | per company | 429 rate_limited |
| Plan's monthly API quota | from 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_idpoints at. - Test names. Records are named
QBOC-TEST <run_id> …; 1. CompanyInfo starts a newrun_idfor each run. E-mails go totest_email, a reservedexample.comaddress. - 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_secretorrecovery_codefilled 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 intests/Feature/Concurrency, which run real parallel processes on MySQL and Redis. No Intuit sandbox webhook has been delivered end to end yet.