API guide
Stater's REST API: tokens, conventions, common tasks, stock adjustments, accounting exports and where each feature's API is documented.
On this page
Stater has one REST API. The web app uses it, so anything a person can do, an integration can do.
- Reference:
/api/docson any Stater server. - OpenAPI 3.1:
/api/openapi.json(or.yaml), generated from the code, ready for code generators.stater openapiprints it offline. - Base path:
/api/v1.
Authenticate#
Create a token in Admin › Integrations › API tokens (Growth plan and up). Choose the smallest role the integration needs, read or write access, and optionally one store. The token is shown once.
curl https://stater.example.com/api/v1/products?view=needs_reorder \
-H "Authorization: Bearer stk_…"
A token can never do more than the person who created it. Revoking it stops it immediately.
Conventions#
- Money is integer cents. Prices include tax; responses give the tax contained in a total.
- References like
SO-1042,PO-1007,C-1188address records in paths; numeric ids work too. - Lists take
limit(default 50, max 500) andoffset, and return{ "items": [...], "total": n }. Most lists also takeview(the saved views shown in the app),qandstore_id. - Store scope: omit
store_idto get the caller's store, or every store when their role covers all stores. - Errors are RFC 9457 problems.
detailis a sentence that says what to do, written to be shown to a person:
{ "status": 422, "title": "Unprocessable Entity", "detail": "Use 0 or more. 0 means never reorder." }
- Manager PINs (
manager_pinon a sale, return or cash-up, orPOST /auth/verify-pin) are checked one at a time per caller, so parallel approvals with the right PIN all go through, a little slower. Wrong PINs are limited to 5 in 15 minutes and 25 a day per caller; past that the answer is429until the window passes, even with the right PIN (Architecture). - Times are RFC 3339 in UTC. Business dates (
business_date) are the store's local date.
Common tasks#
| Task | Call |
|---|---|
| Look up stock across stores | GET /products/{id} |
| Products to reorder | GET /products?view=needs_reorder |
| Draft purchase orders for them | POST /purchase-orders/draft-reorder |
| Push an online order | POST /orders with channel: "online" |
| Move an order on | POST /orders/{ref}/advance |
| Find or create a customer | GET /customers?q= then POST /customers |
| Daily journals for accounting software | GET /accounting/export?target=xero&from=…&to=… |
| Everything that needs a person | GET /today/needs |
Webhooks#
Webhooks (Business plan and up) post signed JSON to your systems when something changes. Webhooks has the payload, the signature, retries and every topic.
Adjusting stock#
POST /stock/adjustments takes a store_id and lines. Give each line either delta (the change, such as -2 for two broken) or on_hand (what is on the shelf now; Stater works out the change from the live figure when it saves, so a sale in the meantime is not lost), never both, and each product once. A line can also carry a reason (adjust or damage) and a note. The response lists what was applied in lines (product_id, delta, on_hand after) and the stock movement ids; undo by posting the opposite deltas.
Accounting#
The Accounting operations (Growth plan and up) serve Money › Accounting: daily summary journals per store, supplier bills and customer invoices for Xero, QuickBooks, MYOB, Dynamics 365, Sage and a generic double-entry CSV. With a token whose role has insight.export and money.view, download files for a range of up to 92 days (STATER_ACCOUNTING_EXPORT_MAX_DAYS); bills and invoices also need money.approve across every store:
curl -o november.zip "https://stater.example.com/api/v1/accounting/export?target=xero&from=2026-11-01&to=2026-11-30&kinds=journals,bills" \
-H "Authorization: Bearer stk_…"
The answer is the file itself, or a zip when there is more than one; nothing is recorded. POST /accounting/exports records an export so later changes come as corrections. Connections to accounting software, their client secrets and connecting need an owner in a browser, never a token. accounting.updated says a day's or a document's status changed (software, store, day or reference, status; never amounts). See the accounting reference for every call and the daily journal for what each journal line means.
Feature APIs#
Each feature page ends with its own API section:
- Counter layouts: layouts, tile pictures and open-price lines.
- Offline counter: the till's own endpoints and managing tills.
- Email: email settings, the outbox and sending.
- Directory sign-in: directories and how each person signs in.
- Plans and licences: checking and installing a licence.
- AI assistant: settings, documents and chats.
- Finance: the overview, periods and finance reports.
- SIEM and threat intelligence: security settings, and Stater's TAXII server.
- Accounting: every accounting call.
- Monitoring: background jobs and running one now.
Live updates#
Signed-in browsers receive change hints on GET /api/v1/stream (server-sent events). Integrations should use webhooks instead.