Catalog with your prices and stock and, if enabled, orders. Full field and response reference: the openapi.yaml specification file (OpenAPI 3.0; opens in Swagger Editor, Postman, Insomnia), attached to this guide. Error message texts are in Russian; rely on code.
1. Quick start
Open the bot's mini app → Profile → API and create a token: name, expiry, access ("catalog only" or "catalog and orders"), and a channel when offered (warehouse + currency, same as bot directions). The section is visible only if a manager has enabled API access for you.
A general token covers every channel the manager allowed. A narrow token is limited to one channel: catalog and orders use only that warehouse and currency.
The token is shown once. Keep it in a secrets store; never put it in a repository or client-side code. If it leaks, revoke it there and issue a new one.
Send the token with every request: Authorization: Bearer fcp_….
API base URL: https://api.unimtrn.com/api/partner. The API is server-to-server: browser requests (CORS) are not supported, call it from your backend.
2. General rules
Price is what you see in the bot (price type, markup, currency from your client card). You never send a price: the server sets it, including quantity tiers.
Warehouses and currency come from the token's channels (client card ∩ manager policy ∩ issue choice). With a single warehouse you may omit warehouse. A narrow single-currency token returns prices only in that currency.
Working hours. The bot has a schedule: it accepts orders only during working hours. You can get today's hours with GET /schedule (it always answers, including when the bot is closed); your manager will also tell you the hours.
Order changes (add an item, change quantity, remove a line, cancel the order) are not accepted outside working hours: the response is 423 bot_closed. This always applies.
The catalog (/catalog, /brands, /categories) is closed outside working hours only if your manager has enabled schedule compliance for you; then it also returns 423 bot_closed. If it is not enabled, the catalog is available around the clock.
423 bot_closed is not a request error. Retry it during working hours; use the same Idempotency-Key on the retry: a schedule rejection is not stored, and the action will be executed afresh.
When today's working time is known, it comes right in the response, in error.details: the opening and closing times and the time zone they are given in. If it is only known that the bot is not accepting requests right now, the response has no details field. Example:
HTTP 423
{
"error": {
"code": "bot_closed",
"message": "Бот закрыт. Сегодня работает с 10:00 до 18:00 (Asia/Dubai)",
"details": { "opensAt": "10:00", "closesAt": "18:00", "timezone": "Asia/Dubai" }
}
}
Rate limits are set by your manager. Exceeding them returns 429 rate_limited: wait and retry. Many invalid tokens in a row from one IP also lead to 429.
There is no version in the path. Incompatible changes are shipped as new fields and endpoints: ignore unknown response fields.
Request understood but not accepted; reason in message
423
bot_closed
Bot is closed by schedule; retry during working hours
429
rate_limited
Slow down and retry
503
order_busy, onec_unavailable
Temporary failure; retry with the same Idempotency-Key
4. Catalog
Request
Returns
GET /schedule
Whether the bot is open now and today's working hours
GET /brands
Brands in stock
GET /categories?brand=…
Categories of a brand
GET /catalog
Items with prices. Filters: brand, category, warehouse; paging: limit (up to 1000, default 200) and cursor
GET /catalog/{itemCode}
One item, including the quantity price tiers (tiers)
Storefront data refreshes every 30–60 seconds; polling more often is pointless. In the examples on the right the base URL is already filled in; send the token in the Authorization header.
Filters and paging are listed under Query params on «Item list». Pass names with spaces via --data-urlencode.
GEThttps://api.unimtrn.com/api/partner/schedule
Today's working hours
Always answers, including when the bot is closed. Only a valid token is required.
Field
Meaning
open
true if the bot is accepting requests now
timezone
Time zone for the working hours
today.opensAt, today.closesAt
Today's open and close times as HH:MM
today
null if there are no hours today (day off) or they are unset. Then rely on open.
Hours for other days are not returned by this request.
GEThttps://api.unimtrn.com/api/partner/brands
Brands
Brands available to you on the storefront.
GEThttps://api.unimtrn.com/api/partner/categories
Brand categories
Without brand — 400 bad_request.
Query params
Param
Required
Type
Description
brand
yes
string
Brand from the brands list. Case-insensitive
GEThttps://api.unimtrn.com/api/partner/catalog
Item list
List items carry a single price; tiers only on the item card. Non-null nextCursor means another page. The cursor is opaque.
Query params
Param
Required
Type
Description
brand
no
string
Filter by brand (one value, case-insensitive)
category
no
string
Filter by category (one value). Multiple categories — separate requests
warehouse
no
string
Warehouse code; default is all your warehouses
limit
no
integer
Page size: 1–1000, default 200
cursor
no
string
nextCursor from the previous response. Opaque string
items is an array. tiers reads as: “from qty units the unit price is price”. Steps above available stock are hidden. Markdown items have no tiers. Missing/unavailable item → 404 not_found.
Stock comes in the available field of GET /catalog and GET /catalog/{itemCode}. There is no separate stock endpoint.
Showing stock is enabled by your manager. If it is not enabled, available is absent; catalog and orders still work.
Stock changes with every order. On add, the server re-checks quantity: if stock was short, the response includes addedQty and capped: true.
Catalog item fields
Field
Meaning
itemCode
Item code (sent when ordering)
name, brand, category
Name, brand, category
warehouse
Warehouse code
currency, price
Currency and your unit price
available
Stock. Absent if stock is not shown to you
tiers
Price scale: only on the card and only when enabled
markdown, serial, comment
Markdown: flag, serial, comment
warehouseName
Warehouse name (only if allowed)
5. Orders
Available only if your manager enabled orders and the token was issued with “catalog and orders” access. An order is the same document as the bot / mini-app cart.
Request
Action
POST /orders/lines
Add an item to the order
GET /orders/current
Open order in the current trading session
GET /orders, GET /orders/{id}
History and one order with status
PATCH /orders/{id}/lines/{lineId}
Change line quantity
DELETE /orders/{id}/lines/{lineId}
Remove a line
POST /orders/{id}/cancel
Cancel the order
Your manager may disable individual actions (change qty, remove line, cancel) — then the API returns 403 forbidden.
If stock or per-customer limit was short: "capped": true and actual addedQty. If nothing can be added — 422 order_rejected. Same item, serial and price — quantities merge; otherwise a new line. Success is always 200; created means a new order was opened.
Headers
Header
Required
Description
Authorization
yes
Bearer <token>
Idempotency-Key
yes
Unique action key (8–128 chars A-Za-z0-9_.:-). Retry with the same key
Content-Type
yes
application/json
Body (JSON)
Field
Required
Type
Description
itemCode
yes
string
Item code from the catalog
qty
yes
integer
Quantity, integer ≥ 1. With serial (markdown) — must be 1
warehouse
conditional
string
Warehouse code. Required if several warehouses; otherwise the only one is used
HTTP 403
{ "error": { "code": "forbidden", "message": "Удаление строк заказа через API отключено для этого клиента" } }
Numbers, item codes, prices and ids in examples are illustrative.
6. Shipments
Delivery notes for your orders. Available when orders are enabled for you. The list only includes orders that have a delivery note number (deliveryNumber).
Request
Returns
GET /shipments
Shipment list (paging: limit up to 100, cursor)
GET /shipments/{deliveryNumber}
Note by number: JSON (default) or PDF (format=pdf)
GET /orders/{id}/shipment
Same note, by order id
JSON lines include price/sum (your unit price from the order) and serials from the note. Order total is total. Missing/unavailable note → 404 / 422 shipment_unavailable.
GEThttps://api.unimtrn.com/api/partner/shipments
Shipment list
Only orders that have a delivery note number. Paged via nextCursor.
These are outgoing notifications: we POST to your HTTPS URL when an order status changes. This is not a Partner API endpoint — the URL is set in the policy (manager in admin, or you in the mini app → Profile → API if self-issue is allowed).
Notifications cover all of the client's orders (bot, mini app, API), except test and referral ones. The same status for one order is not sent twice.
Why. If the response is lost, a blind retry is unsafe. The key guarantees a retry with the same key returns the first response instead of running the action twice.
Where. All mutating order requests: POST /orders/lines, PATCH, DELETE, POST …/cancel. Without it — 400 idempotency_key_required. Not needed for GET.
Who creates it. Your system, before the request (e.g. UUID v4). New action — new key. Keep the key until you get a response.
KEY=$(uuidgen)
curl -sS -X PATCH "https://api.unimtrn.com/api/partner/orders/$ORDER/lines/$LINE" \
-H "Authorization: Bearer $FC_TOKEN" \
-H "Idempotency-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{"qty": 5}'
# no response — retry with the same $KEY
# → 200 and Idempotent-Replay: true
One key — one action. 8–128 chars: A-Za-z0-9_.:-.
Same key with a different request — 422 idempotency_key_reused.
While the first request is still running — 409 request_in_progress; wait and retry.
Business failures (409, 422) are stored. Temporary ones (423, 429, 503) are not.
9. FAQ
403 api_disabled / orders_disabled. API or orders are not enabled for you by the manager.
422 order_rejected. No stock, quota exhausted, or item unavailable — reason in message.
422 onec_error. The accounting system rejected the change. Contact your manager if it repeats.
Token stopped working. Check expiry and revocation in Profile → API; the 401 code says what happened.