POSuna API Documentation
The POSuna API is REST-based, multi-tenant, and returns JSON. It is designed to let developers integrate POSuna with other systems (ERP, accounting, ecommerce, etc.).
Authentication
Every request requires a valid SessionToken
in the Authorization
header.
Authorization: SESSION_TOKEN_VALUE
General Rules
- Base URL:
https://www.posuna-dashboard.co.uk/api/
- All endpoints accept
GET
and/orPOST
. - Responses are JSON with a
status
field: success or error. - Multi-tenant scope: Always pass
business_id
for tenant-specific data.
Endpoints
Login
POST /login.php
{
"email": "demo@posuna.com",
"pincode": "1234"
}
Response
{
"status": "success",
"session_token": "abc123",
"business_id": 32,
"permissions": ["view_products","add_products"]
}
Products
GET /products_mod.php?action=list&business_id=32
POST /products_mod.php
to create/update products.
{
"business_id": 32,
"name": "Latte",
"category_id": 5,
"price": 2.95,
"sku": "LAT-32-5678"
}
Categories
GET /categories.php?action=list&business_id=32
{
"status":"success",
"categories":[
{"CategoryID":5,"CategoryName":"Hot Drinks"},
{"CategoryID":6,"CategoryName":"Desserts"}
]
}
Permissions
GET /permissions.php
Manage role permissions, assign to employees.
Error Handling
{
"status": "error",
"message": "Unauthorized"
}
Best Practices
- Cache lookup data (categories, base units) locally to reduce API calls.
- Always check for
status
in responses before using data. - Use HTTPS only.