Skip to content

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_idNoThe role the request runs with. 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.
user_idNoRun the request as this user. The user must belong to this account and not be blocked, otherwise the request is refused. When absent, the request runs as the account owner.

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. Absent on errors.
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 and no data.

json
{
    "code": 401,
    "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, or a referenced record does not existRead message; fix the body
401Missing, malformed or expired credentialsRe-check the header; refresh the token
403The integration lacks the permission for this actionThe message names the permission key it wanted; add it to required_permissions
404No such endpointCheck the path against the API reference
429Rate limitedBack off and retry
500Bito-side failureRetry with backoff; if it persists, contact support

WARNING

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

Next ​

Bito 2.0 Integration API