Diagnosing 403 and 404
Start with a test call
organization/get-all is open to every installed integration, so it checks the URL, the key and the IP in one go.
curl -i 'https://api.bito.uz/integration-api/integration/api/v2/organization/get-all' \
-H "api-key: $BITO_API_KEY"Look at code in the response body:
| Response | Meaning | Next step |
|---|---|---|
code: 0 | URL, key and IP are fine. The problem is a specific method or permission | 403 or 404 |
Non-zero code | The request reached the API and was refused | Error codes |
No code field at all | The request did not hit any API method | 404 |
404
A missing record does not give 404 in Bito — it comes back as 400 with its own code (for example 26000). 404 means there is no such method and path pair.
Check in order:
- HTTP method. A wrong method gives
404, not405. Lists arePOST, reading one record isGET, updating isPUT, deleting isDELETE. See HTTP methods. - Base URL.
https://api.bito.uz/integration-api/integration/api/v2/— you need bothintegration-apiandintegration/api/v2. Dev environment:https://api.systematicdev.uz/.... - Path, letter by letter. Words are hyphenated (
sale-order,get-by-id), no trailing/. - Id in the path.
GET /product/get-by-id/{id}— the id goes in the path itself, not in the body or the query string. Not every method works this way: check each in the reference.
403
First tell the code apart.
code: 10024 — IP not on the list
The integration has an ip_whitelist and the call came from another address. data holds the IP Bito saw.
- Add that IP (or its CIDR range) to the list. Up to 50 entries.
- The list is IPv4 only: a call over IPv6 is refused.
- If your server's IP changes, get a static outbound address or leave the list empty.
code: 10003 — missing permission
Look at data.
data | Cause | Fix |
|---|---|---|
A permission name (customer_create, sale) | The permission was not approved at install | Add it to required_permissions; it works after the merchant re-approves |
A section name (reports, sales, file, webhook) | The app declares permissions and this section has no permission key, so it is closed | See below |
boss, warehouse_id or another role key | The user in the user_id header lacks the right | User roles |
| Empty | user_id is not in this account or is blocked; or writing a source without multiple_sources switched on | Check the header and the setting |
Which method needs which permission: Permissions.
Sections without a permission key. With even one permission in required_permissions, reports, sources, files, settings, webhooks and similar sections close (except organization/get-all and get-by-id). More in Create an integration.
Webhooks
An app that declares required_permissions cannot call the webhook methods.
Changed the list? Existing installs keep working with the list approved at install until the merchant approves the new one.
User roles
A request runs as the account owner, or as the user in the user_id header when you send it.
- If that user's role, organization or warehouse access is not enough, you get
403. The app's permission does not replace it. - Only an owner-level user can manage webhook subscriptions.
- To check, send the same request without
user_id: if it passes, the user's role is the cause.
401
code | Cause | Fix |
|---|---|---|
10004, data: api-key is not provided in the header | Neither api-key nor Authorization arrived | Check the header name and that no proxy strips it |
10004 | The session was ended: the secret was rotated or the integration uninstalled | Authorize again |
10014 | The access token is invalid or expired | Refresh the token |
Two subtleties:
- When an
Authorizationheader is present, the call is treated as OAuth andapi-keyis not read. Do not put the API key inAuthorization. - A wrong API key returns
400, not401:115006or11000. An integration that is not installed returns400with115004. See Error codes.
Still stuck? Send support the method, full URL, time, HTTP status and response body — without keys or tokens.