Skip to content
View as Markdown

Calling the API ​

The Integration API is the surface your integration reads and writes merchant data through. It is one base URL, one envelope and 464 endpoints.

EnvironmentBase URL
Productionhttps://api.bito.uz/integration-api/integration/api/v2/
Devhttps://api.systematicdev.uz/integration-api/integration/api/v2/

The full endpoint list, with request and response schemas for each, is the API reference.

Two ways to authenticate ​

Both reach the same endpoints and the same data. Pick by how many merchants you serve.

API keyOAuth 2.0
Headerapi-key: <username>:<secret>Authorization: Bearer <access_token>
ServesOne account — yoursMany accounts
ExpiresNeverAccess token 24h, refresh 90d
SetupCopy it from the integrationMerchant installs and approves
Use forYour own back office, scripts, one-merchant integrationsMarketplace integrations

API key ​

Send your api_key in the api-key header. No token exchange, no expiry.

http
POST https://api.bito.uz/integration-api/integration/api/v2/product/get-paging
api-key: mycompany:9ad41c0e7b3f28d5610ac94e7f1b26d8
Content-Type: application/json

{ "page": 1, "limit": 20 }

OAuth 2.0 ​

Each merchant's install produces its own token pair, and the token carries the account context — so every call is automatically scoped to that merchant's data and you never pass an account id.

http
POST https://api.bito.uz/integration-api/integration/api/v2/product/get-paging
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{ "page": 1, "limit": 20 }

Getting that token is its own chapter: OAuth 2.0 overview.

Conventions you have to know ​

HTTP methods ​

The method is part of each endpoint's contract:

MethodUsed forExample
POSTCreate a record, and every list or filter queryPOST /product/create, POST /product/get-paging
PUTUpdate a record, or change its statePUT /product/update, PUT /production-operation/set-state
GETRead one record by id, and id-only readsGET /product/get-by-id/{id}, GET /product/get-deleted
DELETEDelete a recordDELETE /product/delete/{id}

Lists are POST because their filters are a JSON body, not a query string. Every endpoint page in the API reference states its own method.

WARNING

The Bito admin API — the one the web panel talks to — is POST-only. The Integration API is not. Do not carry that assumption across.

Request headers ​

HeaderRequiredDescription
api-key or AuthorizationYesOne of the two auth methods above
Content-TypeYesapplication/json
Accept-LanguageNouz, uz_cyrillic, ru, en, kk, tg, ky. Default uz. Sets the language of message.
organization_idNoTarget organization inside the account. Used only when the integration's settings (fields) include the organization_id field — otherwise the header is ignored. When the header is absent, that field's value is used.
warehouse_idNoTarget warehouse. Used only when the integration's settings (fields) include the warehouse_id field — otherwise the header is ignored. When the header is absent, that field's value is used.
price_idNoPrice list to read prices from. Used only when the integration's settings (fields) include the price_id field — otherwise the header is ignored. When the header is absent, that field's value is used.
role_idNoValue for the role_id setting. Used only when the integration's settings (fields) include the role_id field — otherwise the header is ignored. When the header is absent, that field's value is used. Access to API methods is set by required_permissions.
user_idNoRun the request as this user. The user must belong to this account and not be blocked, otherwise the request is refused with 403. When absent, the request runs as the account owner.
source_idNoCreate calls only: attribute the new record to another source of your integration. The source must belong to your integration. Without the header, records get the source assigned at install.

Most methods expect the organization and price list in the request body — check each one in the API reference.

The response envelope ​

Every response, success or failure, has the same shape.

json
{
    "code": 0,
    "message": "Success",
    "status_code": 200,
    "messages": { "uz": "Muvaffaqiyatli", "ru": "Успешно", "en": "Successful" },
    "data": { },
    "time": "2025-05-01T12:00:00Z"
}
FieldMeaning
code0 on success, an error code otherwise. Branch on this.
messageHuman text in the Accept-Language language. Do not parse it.
messagesThe same text in uz, ru and en.
status_codeHTTP status.
dataThe payload on success. Errors carry no payload; some put a detail here, such as the missing permission.
timeServer time, ISO 8601.

Pagination ​

Every get-paging endpoint takes page and limit and returns a total alongside the rows.

Request

json
{ "page": 1, "limit": 50 }
FieldTypeDefaultLimits
pagenumber1≥ 1
limitnumber201 – 200

Response

json
{
    "code": 0,
    "message": "Success",
    "status_code": 200,
    "data": {
        "total": 1043,
        "data": [ { "_id": "6712f0a9c4d1e87b3a0f9911", "name": "Espresso" } ]
    },
    "time": "2025-05-01T12:00:00Z"
}

Note the nesting: the rows are at data.data, the count at data.total. Page until page * limit >= total.

TIP

Most get-paging endpoints also accept filters next to page/limit — updated_at in particular lets you pull only what changed since your last sync. Check the endpoint in the API reference.

Deletion is always soft ​

Bito never physically deletes a record; a delete call marks it deleted. This matters for you in two ways: a get-deleted endpoint exists for most resources, and an id you cached can come back as deleted rather than disappearing.

Identifiers ​

Every _id is a 24-character MongoDB ObjectId, for example 6712f0a9c4d1e87b3a0f9911. Treat it as an opaque string.

Errors ​

An error response carries a non-zero code. When there is more detail, it is in data.

json
{
    "code": 10004,
    "message": "Unauthorized user",
    "status_code": 401,
    "messages": { "uz": "...", "ru": "...", "en": "Unauthorized user" },
    "time": "2025-05-01T12:00:00Z"
}
HTTPWhat went wrongWhat to do
400Validation failed, a referenced record does not exist, or the API key is wrong (115006, 11000)Read code, message and data — Error codes
401Missing, malformed or expired credentialsRe-check the header; refresh the token
403, code: 10003The permission for this action was not approved at install; data names the permission keyAdd it to required_permissions; it works once the merchant approves the new list
403, code: 10024The request came from an address outside ip_whitelistAdd your server's address to the list — see Create an integration
404No such endpointCheck the path against the API reference
400, code: 10021Rate limited — Too Many RequestsBack off and retry
503, code: 10032, or 400, code: 10000Bito-side failure or an unexpected errorRetry with backoff; if it persists, contact support

The common codes: Error codes.

WARNING

Do not retry a 400 unchanged and do not retry a write blindly — Bito write endpoints are not idempotent, so a repeated create creates a second record.

Next ​

Bito 2.0 Integration API