API Basics
One guard, two lanes. Both REST lanes share the same authentication, throttling and error envelope.
Authentication
Every request carries a device token issued per client
app installation, provisioned in the Odoo backend
(mobo.api.device — no self-registration
endpoint by design):
Authorization: Bearer
Tokens are stored salted and hashed (sha256(salt + token)) — the cleartext value is never kept after issuance. A token is bound to one user, expires after 90 days, and only users holding the Mobile / API User group pass the guard.
Throttling
120 requests per minute per client IP across both lanes. Over the bucket you get:
HTTP 429
{ "ok": false, "error": "throttled" }
Error envelope
Every non-2xx response has the same shape:
{ "ok": false, "error": "", "detail": "" }
| Code | Status | Meaning |
|---|---|---|
| throttled | 429 | Rate bucket exceeded |
| auth_failed | 401 | Missing/expired token or user not in the API group |
| invalid_payload | 400 | Body or query params failed validation |
| not_found | 404 | Unknown or foreign resource |
| invalid_state | 409 | State machine rejected the action |
| already_rated | 409 | Booking already has a review |
Pagination
List endpoints take limit (default 40, hard cap
100) and offset, and answer with
total, offset, limit
and the page of rows — walk pages until
offset + rows >= total.
Next: Delivery API.