Start with a scoped session.
Authenticate with a phone number in E.164 format. Send the returned access token as a Bearer token. Refresh tokens rotate and should never be exposed to third-party scripts.
curl -X POST https://api.ocro.uz/api/auth/login \
-H "Content-Type: application/json" \
-d '{"phone":"+998…","password":"…"}'Make every mutation traceable.
Use a unique idempotency key for sales and payment commands. Tenant identity comes from the verified token, never from a request body.
Use HTTPS, short-lived access tokens and a server-side secret store.
Authorization is enforced twice.
The interface hides unavailable actions for clarity. The API independently validates role permissions and store or warehouse scope for security.
Resource map.
Endpoints below are tenant-scoped unless marked public or platform. Every protected route also applies its declared permission.
Authentication & access
/auth/loginCreate an access and rotating refresh session/auth/refreshRotate the refresh token family/auth/sessionsList active account sessions/auth/sessions/:idRevoke one device session/permissionsRead the permission catalog/rolesList tenant roles/rolesCreate a custom permission role/usersCreate a worker with roles and location scopeCatalog & files
/productsPaginate and filter products/productsCreate a product and sellable variants/products/:idUpdate product, variants and images/products/:id/duplicateDuplicate a catalog item/products/variants/:id/barcodesAssign a barcode/products/labelsGenerate barcode and QR label jobs/filesUpload a tenant-scoped file/files/:id/contentDownload protected file contentInventory & purchasing
/inventoryRead balances by location and variant/inventory/movementsRead the stock movement ledger/inventory/adjustmentsCreate an audited adjustment/inventory/reservationsReserve available stock/transfersCreate a warehouse transfer/stock-countsStart a physical stock count/purchasesList purchase orders/purchases/:id/receiveReceive items into stockSales, shifts & finance
/salesComplete an idempotent sale/sales/historyRead sales history/sales/:id/returnsCreate a controlled return/cash-shifts/currentRead the active cashier shift/cash-shifts/openOpen a cashier shift/cash-shifts/:id/closeClose and reconcile a shift/financeRead accounts, entries and debts/finance/debts/:id/payRecord a debt paymentWork, sites & channels
/work/projectsList projects with assigned tasks/work/tasksCreate and assign a task/work/tasks/:idMove or update a task/bookingsRead scheduled bookings/sitesCreate a website, taplink or bot project/sites/:id/publishPublish a validated channel/telegramVerify and connect a Telegram bot token/instagram/messagesSend through a verified Meta connectionAutomation, AI & physical operations
/reportsList report definitions/reports/:id/runExecute a report export/ai/assistantAsk the operational assistant/ai/product-imageGenerate a product image through OpenRouter/biometrics/enrollEnroll a face in connected CompreFace/biometrics/recognizeRecognize against enrolled profiles/hikvision/people-countRead the configured Hikvision counter/warehouses/:id/layoutPersist the interactive warehouse modelVerify before processing.
Compare the signature against the raw request body, reject stale timestamps and store provider event IDs to prevent replay.
Keep the request ID.
Error responses include a request identifier. Record it with the failed command so operations teams can correlate the API response with structured logs.
Open protected OpenAPI JSONThe live OpenAPI document is intentionally protected and requires the operations documentation token. Customer integrations should use a dedicated server-side account and only the permissions they need.