Skip to content

Postman docs › Instance API › Instance

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):
    • https on 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), plain http on any port is also accepted for localhost, 127.0.0.0/8, ::1, and the private IPs listed in QBO_DEV_ALLOWED_PRIVATE_IPS.
  • A suspended instance cannot make signed requests: 403 instance_suspended.

The instance object ​

AttributeRequirementTypeDescription
instance_idread onlysystem definedStringinst_ + 26 lower-case characters. Sent in X-QBO-Instance on every signed request.
instance_secretread onlysystem definedStringqbos_ + 48 characters. Shown once, in this response only. Store it encrypted on the Odoo side.
secret_fingerprintread onlysystem definedString (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.statusread onlyStringLicence state at registration. Always active in a successful response (expired, cancelled, suspended and revoked are refused).
license.planread onlyString or nullPlan of the licence: the plan's slug for QBO Connect subscriptions, standard for mock licences.
license.expires_atread onlyString (ISO 8601) or nullWhen the licence stops allowing QuickBooks access unless it is renewed.
api_versionread onlyStringv1. Register only.
rotated_atread onlyString (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_id and instance_secret in the collection variables.

Request body ​

AttributeRequirementTypeDescription
license_key* Requiredmax 128 charactersStringA QBOC-… key from the customer panel, or a WK-… key with the mock licence driver (local development).
base_url* Requiredmax 255 charactersString (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_urlOptionalmax 255 charactersString (URL)Where QBO Connect sends webhooks. Same scheme, host and port as base_url.
odoo_versionOptionalmax 32 charactersStringOdoo version, for support.
module_versionOptionalmax 32 charactersStringConnector 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

HTTPerror.codeWhen
422validation_failedA field is missing or too long, or a URL breaks the rules. details.fields.base_url / details.fields.callback_url says which.
403license_invalidThe licence key is not recognised.
403license_inactiveThe licence is expired, cancelled, suspended or revoked.
409instance_already_registeredThis licence already has this base URL. details.instance_id names it. Use Rotate secret or Recover instance.
409instance_limit_reachedThe licence already has its maximum number of instances.
429rate_limitedMore than 10 registrations per minute from this IP.
503license_service_unavailableThe licence authority could not be reached. Retry shortly.
Request
Request URLPOST{{base_url}}/api/v1/instances/register
Content typeapplication/json
AuthenticationNone (unsigned)
Rate limit10 per minute per IP
PostmanInstance API › Register instance
Storesinstance_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 the 200.
  • 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

HTTPerror.codeWhen
401signature_missing, invalid_signature, timestamp_out_of_range, nonce_reusedSigning failed. If the secret is lost, use Recover instance.
403instance_suspendedThe instance is suspended.
429rate_limitedToo many requests.
Request
Request URLPOST{{base_url}}/api/v1/instances/rotate-secret
Content typeapplication/json
AuthenticationSigned
Rate limit120 per minute per instance
PostmanInstance API › Rotate secret
Storesinstance_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_failed body, 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_secret and clears recovery_code.

Request body ​

AttributeRequirementTypeDescription
instance_id* RequiredStringThe instance to recover: inst_ + 26 lower-case characters.
license_key* Requiredmax 128 charactersStringThe licence key the instance was registered with.
recovery_code* Requiredmax 64 charactersString24 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

HTTPerror.codeWhen
422validation_failedA field is missing or malformed, for example a code that is not 24 base32 characters. This does not count as an attempt.
403recovery_failedUnknown instance, no pending code, wrong licence key, or a wrong, expired or used-up code.
429rate_limitedMore than 5 requests per minute from this IP.
Request
Request URLPOST{{base_url}}/api/v1/instances/recover
Content typeapplication/json
AuthenticationNone (unsigned)
Rate limit5 per minute per IP
PostmanInstance API › Recover instance
Storesinstance_id, instance_secret; clears recovery_code

Request body

json
{
  "instance_id": "{{instance_id}}",
  "license_key": "{{license_key}}",
  "recovery_code": "{{recovery_code}}"
}