Theme
Connection
A connection links one instance to one QuickBooks Online company (its realm_id). It holds the company's Intuit tokens, which stay encrypted inside QBO Connect. Odoo sees the connection's status, never the tokens. Use realm_id in QuickBooks API proxy URLs.
Business rules
- An instance sees only its own connections. Any other id returns
404 not_found. - A connection belongs to the QuickBooks environment (sandbox or production) it was made in. The proxy refuses it in the other environment.
- Status changes:
- Active → Reauth required: QuickBooks no longer accepts the refresh token, for example after
invalid_grant. - Reauth required → Active: after a successful reconnect.
- Active or Reauth required → Disconnected: on Disconnect, or by Webkul support. The tokens are deleted.
- Active → Reauth required: QuickBooks no longer accepts the refresh token, for example after
- QBO Connect sends Odoo a signed webhook when a connection needs reauthorisation or is disconnected by someone else. It sends none for the instance's own Disconnect. See Webhooks to Odoo.
- Sometimes QBO Connect cannot forward QuickBooks changes to Odoo: while the customer is restricted, or when a webhook keeps failing. The connection then shows
sync_requireduntil Odoo resyncs and confirms the resync. Seeqbo.sync_required.
The connection object
| Attribute | Requirement | Type | Description |
|---|---|---|---|
id | String | conn_ + 26 lower-case characters. | |
realm_id | String | QuickBooks company id. Goes into proxy URLs: /api/v1/qbo/v3/company/{realm_id}/…. | |
company_name | String or null | Company name read from QuickBooks when connecting. | |
environment | String | sandbox or production. | |
status | String | active, reauth_required or disconnected. | |
status_reason | String or null | Why the status changed, for example disconnected_by_instance, revoked_by_support, purged_by_support, or the Intuit error that forced reauthorisation (such as invalid_grant). null while active. | |
connected_at | String (ISO 8601) | Last successful connect or reconnect. | |
reauth_required_at | String (ISO 8601) or null | When the connection needed reauthorisation. | |
disconnected_at | String (ISO 8601) or null | When it was disconnected. | |
refresh_token_expires_at | String (ISO 8601) or null | When the stored refresh token expires unless it is used. null when no tokens are stored. Not included in the Disconnect response. | |
refresh_token_hard_expires_at | String (ISO 8601) or null | Intuit's absolute end for the refresh token. After it, the user must reconnect. Not included in the Disconnect response. | |
sync_required | Object or null | QuickBooks changes that Odoo did not receive and must resync. null when there is nothing to resync. | |
sync_required. | String (ISO 8601) | When the earliest missed change happened. | |
sync_required. | String | Why the most recent changes were missed: instance_suspended, license_inactive, connection_reauth_required, quota_exceeded or delivery_failed. | |
sync_required. | Integer | How many changes were missed. Send it back with Confirm a resync. |
Sample object
json
{
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"refresh_token_expires_at": "2027-03-11T10:03:12Z",
"refresh_token_hard_expires_at": "2031-12-01T10:03:12Z",
"sync_required": null
}List connections
Returns every connection of the calling instance in creation order, including disconnected ones.
When connection_id and realm_id are empty, the Postman test fills them from the first active connection, or from the first connection if none is active.
Returns
200 OK with data, an array of connection objects.
Returns 200 OK
json
{
"data": [
{
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"refresh_token_expires_at": "2027-03-11T10:03:12Z",
"refresh_token_hard_expires_at": "2031-12-01T10:03:12Z",
"sync_required": null
}
]
}| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/connections |
| Accept | application/json |
| Authentication | Signed |
| Rate limit | 120 per minute per instance |
| Postman | Instance API › List connections |
| Stores | connection_id, realm_id (only when empty) |
Read a connection
Returns one connection of the calling instance.
Returns
200 OK with data, the connection object.
Returns 200 OK
json
{
"data": {
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"refresh_token_expires_at": "2027-03-11T10:03:12Z",
"refresh_token_hard_expires_at": "2031-12-01T10:03:12Z",
"sync_required": null
}
}Errors
| HTTP | error.code | When |
|---|---|---|
| 404 | not_found | No connection with this id belongs to the calling instance. |
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/connections/{{connection_id}} |
| Accept | application/json |
| Authentication | Signed |
| Postman | Instance API › Show connection |
| Stores | sync_missed_events (sync_required.missed_events; empty when there is nothing to resync) |
Read a connection with a result code
Confirms a browser return. Odoo passes the result_code it received, and QBO Connect says whether that code was issued for this connection and this instance.
meta.result_code_validistruefor 10 minutes after the browser return.- Checking does not use the code up: the request is read-only, so repeating it within the 10 minutes gives the same answer.
Query parameters
| Parameter | Requirement | Type | Description |
|---|---|---|---|
result_code | * Required for this check | String | The result_code from the browser return. |
Returns
200 OK with data, the connection object, plus meta.result_code_valid.
Returns 200 OK
json
{
"data": {
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"refresh_token_expires_at": "2027-03-11T10:03:12Z",
"refresh_token_hard_expires_at": "2031-12-01T10:03:12Z",
"sync_required": null
},
"meta": {
"result_code_valid": true
}
}A wrong or expired code still returns 200, with "result_code_valid": false.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/connections/{{connection_id}}?result_code={{result_code}} |
| Accept | application/json |
| Authentication | Signed |
| Postman | Instance API › Show connection with result code |
Confirm a resync
Tells QBO Connect that Odoo has finished resynchronising the connection after a qbo.sync_required webhook, so the resync marker can be cleared.
- Send it only after the resync (CDC or a full reconciliation) is complete.
missed_eventsis the count from the webhook you acted on, orsync_required.missed_eventsfrom Read a connection.- QBO Connect clears the marker only if
missed_eventsstill equals the current count.- If more changes were missed in the meantime, the marker stays and the response shows the new values. Resync again, then confirm the new count.
- Answering the webhook with
2xxdoes not clear the marker. Only this request does. - When there is nothing to resync, the request changes nothing and returns the connection.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
missed_events | * Required | Integer, at least 1 | The missed_events value that the resync covered. |
json
{
"missed_events": 17
}Returns
200 OK with data, the connection object. sync_required is null once the marker is cleared.
Returns 200 OK
json
{
"data": {
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"sync_required": null
}
}If two more changes were missed after Odoo read the count, the marker stays:
json
{
"data": {
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "active",
"status_reason": null,
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": null,
"sync_required": {
"since": "2026-12-01T08:14:09Z",
"reason": "delivery_failed",
"missed_events": 19
}
}
}Errors
| HTTP | error.code | When |
|---|---|---|
| 404 | not_found | No connection with this id belongs to the calling instance. |
| 422 | validation_failed | missed_events is missing, not an integer, or less than 1. |
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/connections/{{connection_id}}/sync-complete |
| Content type | application/json |
| Authentication | Signed |
| Postman | Instance API › Confirm resync (skipped while sync_missed_events is empty) |
| Stores | sync_missed_events (empty once nothing is left to resync) |
Disconnect a connection
Disconnects a QuickBooks company from the instance.
- QBO Connect revokes the tokens at Intuit (best effort), deletes them, and sets
statustodisconnectedwithstatus_reasondisconnected_by_instance. - Idempotent: disconnecting a disconnected connection returns it unchanged.
- No webhook is sent to the instance for its own disconnect.
- To use the company again, run Start a connection or Start a reconnection.
Request body
None (empty body).
Returns
200 OK with data, the connection object (without the two refresh_token_* attributes).
Returns 200 OK
json
{
"data": {
"id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
"realm_id": "9341455012345678",
"company_name": "Sandbox Company CA",
"environment": "sandbox",
"status": "disconnected",
"status_reason": "disconnected_by_instance",
"connected_at": "2026-12-01T10:03:12Z",
"reauth_required_at": null,
"disconnected_at": "2026-12-01T12:00:00Z",
"sync_required": null
}
}Errors
| HTTP | error.code | When |
|---|---|---|
| 404 | not_found | No connection with this id belongs to the calling instance. |
All signed requests can also return the signing errors (401), 403 instance_suspended and 429 rate_limited described in the overview.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/connections/{{connection_id}}/disconnect |
| Content type | application/json |
| Authentication | Signed |
| Postman | Instance API › Disconnect |