Public API
Read-only access to your business numbers, plus creating draft transactions.
Base URL https://oydin.sayfi.uz/api/v1. Auth: bearer token.
| Method & path | Scope | Returns |
|---|---|---|
GET /v1/business/ | read | Business profile. |
GET /v1/accounts/ | read | {"items": [...]} accounts with balances. |
GET /v1/transactions/ | read | Paged transactions. |
POST /v1/transactions/ | write | Creates a transaction (draft by default). |
GET /v1/pulse/ | read | Money pulse: balance, runway, key metrics. |
GET /v1/forecast/?days=30 | read | {"points": [...]}, up to 90 days. |
List transactions
Query: from, to (YYYY-MM-DD), limit (default 100, max 500), cursor.
curl "https://oydin.sayfi.uz/api/v1/transactions/?from=2026-11-01&limit=50" \
-H "Authorization: Bearer $OYDIN_TOKEN"
{"items": [{"id": 412, "amount": 150000, "direction": "in", ...}],
"next_cursor": "389"}
Pass next_cursor as cursor until it is null.
Create a transaction
curl -X POST https://oydin.sayfi.uz/api/v1/transactions/ \
-H "Authorization: Bearer $OYDIN_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-7781" \
-d '{"account": 3, "amount": 150000, "direction": "in", "category": "sales", "date": "2026-11-18"}'
New records are saved as draft for the owner to review; pass "status": "confirmed" to confirm directly. Amounts are integers in soʻm.
Idempotency. Repeat a request within 24 hours with the same
Idempotency-Key and body to get the first response. The same key with a different body returns 409 idempotency_conflict.The full contract is in docs/openapi.yaml of the Oydin repository.