Skip to content

Postman docs › Instance API › Connection

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.
  • 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_required until Odoo resyncs and confirms the resync. See qbo.sync_required.

The connection object ​

AttributeRequirementTypeDescription
idread onlysystem definedStringconn_ + 26 lower-case characters.
realm_idread onlyStringQuickBooks company id. Goes into proxy URLs: /api/v1/qbo/v3/company/{realm_id}/….
company_nameread onlyString or nullCompany name read from QuickBooks when connecting.
environmentread onlyStringsandbox or production.
statusread onlyStringactive, reauth_required or disconnected.
status_reasonread onlyString or nullWhy 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_atread onlyString (ISO 8601)Last successful connect or reconnect.
reauth_required_atread onlyString (ISO 8601) or nullWhen the connection needed reauthorisation.
disconnected_atread onlyString (ISO 8601) or nullWhen it was disconnected.
refresh_token_expires_atread onlyString (ISO 8601) or nullWhen 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_atread onlyString (ISO 8601) or nullIntuit's absolute end for the refresh token. After it, the user must reconnect. Not included in the Disconnect response.
sync_requiredread onlyObject or nullQuickBooks changes that Odoo did not receive and must resync. null when there is nothing to resync.
sync_required.sinceread onlyString (ISO 8601)When the earliest missed change happened.
sync_required.reasonread onlyStringWhy the most recent changes were missed: instance_suspended, license_inactive, connection_reauth_required, quota_exceeded or delivery_failed.
sync_required.missed_eventsread onlyIntegerHow 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 URLGET{{base_url}}/api/v1/connections
Acceptapplication/json
AuthenticationSigned
Rate limit120 per minute per instance
PostmanInstance API › List connections
Storesconnection_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

HTTPerror.codeWhen
404not_foundNo connection with this id belongs to the calling instance.
Request
Request URLGET{{base_url}}/api/v1/connections/{{connection_id}}
Acceptapplication/json
AuthenticationSigned
PostmanInstance API › Show connection
Storessync_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_valid is true for 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 ​

ParameterRequirementTypeDescription
result_code* Required for this checkStringThe 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 URLGET{{base_url}}/api/v1/connections/{{connection_id}}?result_code={{result_code}}
Acceptapplication/json
AuthenticationSigned
PostmanInstance 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_events is the count from the webhook you acted on, or sync_required.missed_events from Read a connection.
  • QBO Connect clears the marker only if missed_events still 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 2xx does not clear the marker. Only this request does.
  • When there is nothing to resync, the request changes nothing and returns the connection.

Request body ​

AttributeRequirementTypeDescription
missed_events* RequiredInteger, at least 1The 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

HTTPerror.codeWhen
404not_foundNo connection with this id belongs to the calling instance.
422validation_failedmissed_events is missing, not an integer, or less than 1.
Request
Request URLPOST{{base_url}}/api/v1/connections/{{connection_id}}/sync-complete
Content typeapplication/json
AuthenticationSigned
PostmanInstance API › Confirm resync (skipped while sync_missed_events is empty)
Storessync_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 status to disconnected with status_reason disconnected_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

HTTPerror.codeWhen
404not_foundNo 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 URLPOST{{base_url}}/api/v1/connections/{{connection_id}}/disconnect
Content typeapplication/json
AuthenticationSigned
PostmanInstance API › Disconnect