Theme
Instance
An instance is one Odoo installation, identified by its base URL and registered under a licence key. Registering it returns the instance's id and its secret. The secret is the HMAC key that signs every later request (see request signing). QBO Connect stores the secret encrypted and never shows it again. A lost secret is replaced only by rotating it or with a recovery code from Webkul support (ADR-008, ADR-020).
Business rules
- One instance per licence and base URL (compared after normalisation). Registering the same pair again returns
409 instance_already_registered; nothing changes and the existing secret keeps working. - A different base URL on the same licence creates another instance, up to the licence's instance limit: the plan's limit, or 5 for licences without a plan limit.
- The licence must be active to register.
- URLs follow the URL policy (ADR-026):
httpson a public host (a DNS name or a public IP).localhost, and private, loopback, link-local and reserved IP literals are refused.- No credentials, query or fragment.
- In local development only (
APP_ENV=local, sandbox keys), plainhttpon any port is also accepted forlocalhost,127.0.0.0/8,::1, and the private IPs listed inQBO_DEV_ALLOWED_PRIVATE_IPS.
- A suspended instance cannot make signed requests:
403 instance_suspended.
The instance object
| Attribute | Requirement | Type | Description |
|---|---|---|---|
instance_id | String | inst_ + 26 lower-case characters. Sent in X-QBO-Instance on every signed request. | |
instance_secret | String | qbos_ + 48 characters. Shown once, in this response only. Store it encrypted on the Odoo side. | |
secret_fingerprint | String (16) | First 16 hex characters of the secret's SHA-256 hash. Webkul support can see it, so the two sides can compare secrets without revealing them. | |
license. | String | Licence state at registration. Always active in a successful response (expired, cancelled, suspended and revoked are refused). | |
license. | String or null | Plan of the licence: the plan's slug for QBO Connect subscriptions, standard for mock licences. | |
license. | String (ISO 8601) or null | When the licence stops allowing QuickBooks access unless it is renewed. | |
api_version | String | v1. Register only. | |
rotated_at | String (ISO 8601) | When the current secret was issued. Rotate and recover only. |
Sample object (register response)
json
{
"instance_id": "inst_01kbx6s0f6m3w9c2r7t4yq8h5n",
"instance_secret": "qbos_…",
"secret_fingerprint": "9f2c41d07ab3e65c",
"license": {
"status": "active",
"plan": "standard",
"expires_at": "2027-12-01T10:00:00Z"
},
"api_version": "v1"
}Register an instance
Registers an Odoo base URL under a licence key and issues the instance secret.
- Unsigned. Limited to 10 requests per minute per IP.
- Unknown body fields (for example
odoo_db_uuid) are ignored and not stored. - The Postman test stores
instance_idandinstance_secretin the collection variables.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
license_key | * Required | String | A QBOC-… key from the customer panel, or a WK-… key with the mock licence driver (local development). |
base_url | * Required | String (URL) | The Odoo address: scheme, host, optional port and path. It must pass the URL rules above. It is stored normalised: lower-case scheme and host, no default port, no trailing slash. |
callback_url | Optional | String (URL) | Where QBO Connect sends webhooks. Same scheme, host and port as base_url. |
odoo_version | Optional | String | Odoo version, for support. |
module_version | Optional | String | Connector module version, for support. |
Returns
201 Created with the instance object, including the secret.
Returns 201 Created
json
{
"instance_id": "inst_01kbx6s0f6m3w9c2r7t4yq8h5n",
"instance_secret": "qbos_…",
"secret_fingerprint": "9f2c41d07ab3e65c",
"license": {
"status": "active",
"plan": "standard",
"expires_at": "2027-12-01T10:00:00Z"
},
"api_version": "v1"
}Errors
| HTTP | error.code | When |
|---|---|---|
| 422 | validation_failed | A field is missing or too long, or a URL breaks the rules. details.fields.base_url / details.fields.callback_url says which. |
| 403 | license_invalid | The licence key is not recognised. |
| 403 | license_inactive | The licence is expired, cancelled, suspended or revoked. |
| 409 | instance_already_registered | This licence already has this base URL. details.instance_id names it. Use Rotate secret or Recover instance. |
| 409 | instance_limit_reached | The licence already has its maximum number of instances. |
| 429 | rate_limited | More than 10 registrations per minute from this IP. |
| 503 | license_service_unavailable | The licence authority could not be reached. Retry shortly. |
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/instances/register |
| Content type | application/json |
| Authentication | None (unsigned) |
| Rate limit | 10 per minute per IP |
| Postman | Instance API › Register instance |
| Stores | instance_id, instance_secret |
Request body
json
{
"license_key": "{{license_key}}",
"base_url": "{{odoo_base_url}}",
"callback_url": "{{odoo_base_url}}{{odoo_callback_path}}",
"odoo_version": "18.0",
"module_version": "0.1.0-mock"
}Rotate the secret
Issues a new secret for the calling instance. Use it while the current secret still works, for example after the secret may have been exposed.
- Signed with the current secret. The old secret stops working at once (
401 invalid_signature), so save the new one before you send anything else. - Send one rotation at a time. If two arrive together, only the first returns a secret; the other gets
401 invalid_signature, like any request signed with the replaced secret. Keep the secret from the200. - Cancels any pending recovery code.
- The Postman test stores the new
instance_secret.
Request body
None (empty body).
Returns
200 OK with the instance object (instance_id, instance_secret, secret_fingerprint, rotated_at).
Returns 200 OK
json
{
"instance_id": "inst_01kbx6s0f6m3w9c2r7t4yq8h5n",
"instance_secret": "qbos_…",
"secret_fingerprint": "4b7e09c2d15fa836",
"rotated_at": "2026-12-01T10:05:00Z"
}Errors
| HTTP | error.code | When |
|---|---|---|
| 401 | signature_missing, invalid_signature, timestamp_out_of_range, nonce_reused | Signing failed. If the secret is lost, use Recover instance. |
| 403 | instance_suspended | The instance is suspended. |
| 429 | rate_limited | Too many requests. |
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/instances/rotate-secret |
| Content type | application/json |
| Authentication | Signed |
| Rate limit | 120 per minute per instance |
| Postman | Instance API › Rotate secret |
| Stores | instance_id, instance_secret |
Recover an instance
Replaces a lost secret with a one-time recovery code. Webkul support issues the code from the admin panel after verifying the customer. The code is valid for 24 hours, allows 5 attempts and works once.
- Unsigned, because the caller no longer has the secret. Limited to 5 requests per minute per IP.
- Every failure returns the same
403 recovery_failedbody, so a caller cannot tell which part was wrong. - Failed attempts against a pending code count. The fifth failed attempt cancels the code, and support has to issue a new one.
- The Postman test stores the new
instance_secretand clearsrecovery_code.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
instance_id | * Required | String | The instance to recover: inst_ + 26 lower-case characters. |
license_key | * Required | String | The licence key the instance was registered with. |
recovery_code | * Required | String | 24 characters of Crockford base32, usually written as 6 groups of 4 (XXXX-XXXX-XXXX-XXXX-XXXX-XXXX). Case, spaces, dashes and underscores are ignored; O reads as 0, and I and L read as 1. |
Returns
200 OK with the same body as Rotate the secret. The code is then used up.
Returns 200 OK
json
{
"instance_id": "inst_01kbx6s0f6m3w9c2r7t4yq8h5n",
"instance_secret": "qbos_…",
"secret_fingerprint": "c83a5e10f7b2d946",
"rotated_at": "2026-12-01T11:00:00Z"
}Errors
| HTTP | error.code | When |
|---|---|---|
| 422 | validation_failed | A field is missing or malformed, for example a code that is not 24 base32 characters. This does not count as an attempt. |
| 403 | recovery_failed | Unknown instance, no pending code, wrong licence key, or a wrong, expired or used-up code. |
| 429 | rate_limited | More than 5 requests per minute from this IP. |
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/instances/recover |
| Content type | application/json |
| Authentication | None (unsigned) |
| Rate limit | 5 per minute per IP |
| Postman | Instance API › Recover instance |
| Stores | instance_id, instance_secret; clears recovery_code |
Request body
json
{
"instance_id": "{{instance_id}}",
"license_key": "{{license_key}}",
"recovery_code": "{{recovery_code}}"
}