API & Postman Collection
POSVelo's backend is a clean REST API. Everything the web app does, you can do through the API — handy for integrations, custom front-ends, or automation.
Base URL & versioning
http://localhost:5000/api/v1/... ← core POS modules
http://localhost:5000/api/v2/... ← HR, Payroll, ESS and newer modules
POSVelo serves two active, side-by-side API namespaces — there is no unversioned
/api/... alias, so always include the version segment:
/api/v1hosts the core POS platform: auth, setup, tenants, billing, stores, users, products, inventory, sales, POS, payments, customers, suppliers, purchases, expenses, reports, super-admin, audit, receipts and RBAC./api/v2hosts the HR/Payroll suite, Employee Self-Service, and the newer v2 modules (stores v2, brands, reports v2, notifications). HR endpoints live under/api/v2/hr/...and ESS under/api/v2/me.
Both namespaces are current; v1 is not deprecated. See Updating & Upgrading.
In production replace localhost:5000 with your API domain (e.g.
https://api.yourdomain.com).
Authentication
The API uses JWT with access + refresh tokens.
- Log in to receive an
access_token(short-lived) and arefresh_token. - Send the access token on every protected request:
Authorization: Bearer <access_token> - When the access token expires, call the refresh endpoint with the refresh token to get a new pair. Refresh tokens rotate; reuse of an old one triggers a full session revocation (theft protection).
The business (tenant) is derived from your token automatically — you never pass a tenant id.
Using the Postman collection
A complete Postman collection is included in the Postman folder of your
package:
POSVelo-API.postman_collection.json— every endpoint (v1 + v2), grouped by module and versionPOSVelo-Development.postman_environment.json— matching environment
To use it:
- Open Postman → Import → select the collection file.
- Import the environment file and select it (top-right).
- Set the environment's
base_urltohttp://localhost:5000(or your server). - Run Login / Register first — the test scripts automatically save your
access_tokenandrefresh_tokeninto the environment. - All other requests inherit the bearer token automatically. Create endpoints
save returned IDs (e.g.
employee_id,brand_id) so you can chain calls.
Endpoint groups
The API mirrors the modules in this documentation.
Core (/api/v1):
auth · setup · tenants · billing · stores · users · rbac ·
products (includes categories) · inventory · suppliers · purchases ·
sales · pos · payments · customers · expenses · reports ·
super-admin · audit · receipts
HR / Payroll / newer (/api/v2):
hr/departments · hr/designations · hr/employees · hr/attendance ·
hr/shifts · hr/leave · hr/holidays · hr/payroll · me (ESS) ·
stores · brands · reports · notifications
Response shape & contract notes
- Responses are JSON with a consistent success/error envelope.
- Clients must tolerate unknown enum values — new enum values can be added in a minor release and are not considered breaking.
- Adding a new field or endpoint is non-breaking. Removing/renaming fields only happens across a major version, with a deprecation window.
The included Postman collection is the full endpoint catalogue — every path, method and example request/response, grouped by module and version.