Skip to main content

API clients — keys for outside systems

An API client is an outside system — a point-of-sale such as IgnitePOS, your webstore — that calls this company's API with a key you issue. Today a key can do one thing: ask what a basket would be taxed (POST /api/v1/tax/quote), the same answer an order of those lines would get. The API clients tab of Settings → Integrations does all of it on screen — issue, list, revoke — with a Try the quote tab beside it (API clients); the old address /settings/api-clients opens that tab; the three calls below are what that screen makes.

Permissions​

PermissionWhat it allowsGranted to
api_client.manageIssue keys, see which exist, revoke themAdministrator only
tax.quoteAsk what lines would be taxed, as an order would charge themSales (and a client's role)

Only a person can issue or revoke a key. A client never can, whatever its role.

Issuing a key​

POST /api/v1/api-clients with a name, a role and, usually, scopes:

{"name": "IgnitePOS — Allentown", "role": "sales", "scopes": ["tax.quote"]}
  • Role is one of the seeded roles, never administrator. The client holds what the role holds and no more.
  • Scopes narrow the role. A till needs ["tax.quote"] and nothing else; give it that, so a key that leaks can price a basket and do nothing more.
  • The answer carries the key, erpapi.<company>.<client>.<secret>. It is shown this once. Copy it into the other system now. Only the first six characters of the secret (shown as erpapi.…abc123, so you can tell keys apart) and a fingerprint of it are kept; nobody — support included — can show it again.
  • A retried create (the same Idempotency-Key) makes a second client rather than handing the same key out twice. Revoke the one you do not use.

Seeing them​

GET /api/v1/api-clients lists every client — live first — with its role, scopes, the start of its key, who issued it and when, when it was last used (to the minute), and, for a revoked one, when and why. Never a key.

Revoking, and rotating​

POST /api/v1/api-clients/{id}/revoke with a reason. The key stops working at once: the next call gets 401. The client stays on the list with the day and the reason, because the audit log names it on everything it did.

To rotate a key, revoke the old client and issue a new one. There is no "rotate in place": that way the old key's last day is on the record, with why.

What a key can and cannot do​

  • It is sent as Authorization: Bearer <key>.
  • It reaches only the routes written for it — today, the tax quote. Everywhere else it is refused with 401: it is never mistaken for a person.
  • Everything it does is audited as An API client, with the client's id — never a person's. It can never override a refusal: an override is a person's decision.
  • It is limited to api.client_requests_per_minute requests a minute (default 120; Settings → All settings → Integrations). Over it, the client is told 429 and how many seconds to wait (Retry-After). Raise it for a busy webstore; a till rarely needs more than the default.
  • A key belongs to one company. Used against another, it is not valid.

Query parameters​

  • A public route refuses a parameter it does not take. GET /api/v1/public/customers?search=… answers 422 with "Search is not something this request takes. Leave it out." — the parameter is q. A body already refused a field it does not take; a query string now does too, so a misspelt filter is never silently a list of everything.
  • An as-at date answers to all its names. Reports have called the one date they are "as at" on, as_of, as_at or, over a period, to_date. as_at is the canonical name; a route that takes one of these accepts any of the others for it, so GET /ledger/trial-balance?as_of=2026-06-30 is the trial balance to 30 June, not today's. Send one name only: two is refused, since which was meant is not something to guess.
  • The internal /api/v1 routes (the ones the screens use, outside the public reference) still ignore a parameter they do not take. Build on the public routes.

Deprecated quote fields​

record_type and record_id on POST /api/v1/tax/quote are deprecated (24 October 2026) and will be removed. Name the buyer with customer_id (and ship_to_id) instead, or describe a buyer with no account with buyer. Until they are removed they still work, and every answer to a request that sends them carries a Deprecation header and a Link back to this section, so an integration can find out before it breaks.

Settings​

SettingDefaultWhat it does
api.client_requests_per_minute120The most requests one client may make in a minute.

How it interacts with other parts​

  • Tax quote — what a client asks. The request and the answer are in the API reference under POST /tax/quote: the lines, how the goods go (delivery, counter or web), and the buyer — an account on file, or the licences the caller states for a buyer with no account, which the answer marks as resting on what the caller said. A person with no account is priced as a sale to a person; the answer says so, and what your own licences would stop at the sale, which is where the age and licence checks are made.
  • Machines are the warehouse's own principals, with their own Device keys; an API client is for a system outside the building.