Settings
Create, Test and Revoke Scoped API Tokens
An API token is a standing machine credential. Its module permissions and the creating administrator's shop and branch context determine what the external system can reach.
- Menu path
- Manage -> Integrations -> API Tokens
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
Live demo API Tokens tab and New Token scope matrix audited 2026-09-04, frontend/modules/settings_write.html int-sub-tokens and int_mint_modal, frontend/static/script/js/modules/js/settings.js PosnicPro.integrations, api/src/utils/api-tokens.js, api/src/middleware/auth.js scoped token resolution
Before Creating a Credential
- Identify the external system owner, purpose, required branches and exact records it must read or change.
- Create one token per integration. Never share a general token between accounting, ecommerce and custom scripts.
- Prefer Read only. Add Write or Delete only when the integration has a tested operational need.
- Choose who will store, rotate and revoke the secret before minting it.
Create the Token
- Open Manage -> Integrations -> API Tokens and click New Token.
- Enter a recognizable name such as Accounting sync - read only.
- In the scope matrix, tick only the required Read, Write or Delete cells.
- Select at least one permission; Posnic refuses an empty token.
- Click Create Token.
- Copy the plaintext token from the reveal box immediately. It is displayed once and cannot be recovered from the list.
- Store it in the receiving system's secret manager, not in email, chat, source code or a shared document.
Available Scope Modules
| Module | Typical use | High-risk permission |
|---|---|---|
| sales, receiving | Accounting or order synchronization | Write/Delete can alter transaction evidence. |
| item, category | Catalog and stock integrations | Write/Delete can change what cashiers sell. |
| customer, supplier | CRM or purchasing integration | Contains business and personal contact data. |
| expense | Bookkeeping synchronization | Write/Delete affects cash-book evidence. |
| branch, user | Administrative lookup | Grant only when branch or staff data is essential. |
| report, dashboard | Read-only reporting | Financial visibility may exceed ordinary cashier access. |
Security Boundaries
- Token scopes cannot grant till-action approvals, settings access or plan controls.
- The token inherits the creating administrator's licence and branch access; it is not a cross-shop master key.
- Posnic stores a SHA-256 hash and a short hint, not the plaintext secret.
- The list shows Name, token hint, scopes, Last Used and Action. Last Used is updated on active use and may be throttled for several minutes.
Test and Revoke
- Test the smallest permitted read against a non-production or low-risk record.
- Confirm an ungranted action is rejected; this proves the scope boundary as well as connectivity.
- Return to API Tokens and confirm Last Used updates.
- When replacing or retiring an integration, create and test the replacement first, then revoke the old token.
- Treat a lost or exposed token as compromised and revoke it immediately. Revocation marks it inactive; future authentication fails closed.