API Documentation
Getting started
Create an API key in the Developer Portal, then call read-only Public API endpoints under /api/public/v1. Always use the words sale / sales (never ticket).
Authentication
Send your key with the X-API-KEY header. Authorization: Bearer … still works.
X-API-KEY: philo_live_YOUR_KEY
Sorting & filters
List endpoints accept shared query params (same style as the office API):
search=tea category_id=01EXAMPLECAT sort_by=name sort_dir=asc page=1 per_page=20
Allowed sort_by columns and extra filters are listed under each endpoint below.
Webhooks
Webhooks unlock with the API requests add-on pack (api-requests-10k — +API quota + Webhooks). Configure endpoints in Webhooks.
Events: sale.created, sale.updated, sale.refunded, product.created, product.updated, product.deleted, stock.updated, stock.low.
X-Philo-Event: sale.created X-Philo-Delivery-Id: 01EXAMPLEDELIVERY X-Philo-Timestamp: 1730000000 X-Philo-Signature: t=1730000000,v1=HMAC_SHA256(secret, timestamp + "." + rawBody)
{
"id": "01EXAMPLEDELIVERY",
"event": "sale.created",
"created_at": "2026-11-28 00:00:00",
"data": { }
}Errors
Public API errors use { "error": "...", "message": "..." }.
| Status | error | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing, invalid, revoked, or expired key |
| 402 | plan_required | Paid subscription required |
| 402 | addon_required | API requests pack required for webhooks |
| 403 | forbidden / branch_forbidden | Not allowed or branch out of scope |
| 403 | api_banned | Organization or API key is banned |
| 404 | not_found | Resource not found |
| 422 | validation_error | Invalid query/body |
| 429 | rate_limited | Per-minute burst limit exceeded |
| 429 | quota_exceeded | Billing-period request quota exceeded |
Pagination
List endpoints return data plus meta.current_page, per_page, total, last_page. Use page and per_page query params.
Rate limits
Requests are throttled per API key (throttle:public-api). When exceeded, the API returns 429 with rate_limited.
Quotas
Each paid plan includes a small Public API allotment for the organization subscription billing period. Add-ons increase that period maximum. When usage reaches the limit, the API returns 429 with quota_exceeded. A banned organization or key returns 403 with api_banned. A null plan limit means unlimited and add-ons are not required.
Endpoints
Organization
/api/public/v1/organizationCurrent organization profile for the API key.
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/organization"Example response
{
"data": {
"id": "01EXAMPLEORG",
"name": "Demo Store",
"currency_symbol": "Ks",
"plan": {
"id": "01EXAMPLEPLAN",
"name": "Pro",
"code": "pro",
"plan_type": 2
},
"subscription_expires_at": "2026-12-31T00:00:00+00:00"
}
}/api/public/v1/branchesList branches visible to the API key.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
search | string | no | Search by name, address, or phone. |
is_active | boolean | no | Filter by active flag (`true` / `false`). |
is_main | boolean | no | Filter main branch only. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: name, created_at, updated_at, is_main. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/branches"Example response
{
"data": [
{
"id": "01EXAMPLEBRANCH",
"name": "Main",
"address": null,
"phone": null,
"is_main": true,
"is_active": true,
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}Catalog
/api/public/v1/categoriesPaginated product categories.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
search | string | no | Search by category name. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: name, created_at, updated_at. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/categories"Example response
{
"data": [
{
"id": "01EXAMPLECAT",
"name": "Beverages",
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/brandsPaginated brands.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
search | string | no | Search by brand name. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: name, created_at, updated_at. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/brands"Example response
{
"data": [
{
"id": "01EXAMPLEBRAND",
"name": "Acme",
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/productsPaginated products (catalog).
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
search | string | no | Search by name, SKU, or barcode. |
category_id | string | no | Filter by category ULID. |
brand_id | string | no | Filter by brand ULID. |
is_active | boolean | no | Filter by active flag (`true` / `false`). |
type | string | no | Filter by product type. |
branch_id | string | no | Limit results to a branch id (ULID). |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: name, sku, barcode, created_at, updated_at. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/products"Example response
{
"data": [
{
"id": "01EXAMPLEPRODUCT",
"name": "Green Tea",
"sku": "GT-001",
"barcode": null,
"image": "https://cdn.example.com/products/green-tea.png",
"type": "standard",
"is_active": true,
"track_stock": true,
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/products/{id}Single product by id.
| Param | Type | Required | Description |
|---|---|---|---|
id | string | yes | Product ULID (path). |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/products/01EXAMPLEID"Example response
{
"data": {
"id": "01EXAMPLEPRODUCT",
"name": "Green Tea",
"sku": "GT-001",
"barcode": null,
"image": "https://cdn.example.com/products/green-tea.png",
"type": "standard",
"is_active": true,
"track_stock": true,
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-01-01 00:00:00"
}
}Stock
/api/public/v1/stockStock levels by product / branch.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
product_id | string | no | Filter by product ULID. |
search | string | no | Search by product name or SKU. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: name, sku, in_stock, updated_at. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/stock"Example response
{
"data": [
{
"id": "01EXAMPLESTOCK",
"branch_id": "01EXAMPLEBRANCH",
"branch_name": "Main",
"product_id": "01EXAMPLEPRODUCT",
"product_name": "Green Tea",
"sku": "GT-001",
"product_variant_id": null,
"in_stock": 12,
"low_stock": 5,
"sale_price": "1500.00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/stock/lowProducts at or below low-stock threshold.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
product_id | string | no | Filter by product ULID. |
search | string | no | Search by product name or SKU. |
sort_by | string | no | Sort column: name, sku, in_stock, updated_at. Default `name`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `asc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/stock/low"Example response
{
"data": [
{
"id": "01EXAMPLESTOCK",
"branch_id": "01EXAMPLEBRANCH",
"branch_name": "Main",
"product_id": "01EXAMPLEPRODUCT",
"product_name": "Green Tea",
"sku": "GT-001",
"product_variant_id": null,
"in_stock": 2,
"low_stock": 5,
"sale_price": "1500.00",
"updated_at": "2026-01-01 00:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}Sales
/api/public/v1/salesPaginated sales.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
search | string | no | Search by invoice number. |
status | integer | no | Filter by sale status code. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: sale_date, invoice_number, grand_total, created_at, updated_at. Default `sale_date`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `desc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/sales"Example response
{
"data": [
{
"id": "01EXAMPLESALE",
"branch_id": "01EXAMPLEBRANCH",
"invoice_number": "INV-1001",
"status": 1,
"sale_date": "2026-01-15 10:00:00",
"total_amount": "1500.00",
"tax_amount": "0.00",
"discount_amount": "0.00",
"grand_total": "1500.00",
"paid_amount": "1500.00",
"credit_amount": "0.00",
"settlement_currency": "MMK",
"created_at": "2026-01-15 10:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/sales/{id}Single sale by id.
| Param | Type | Required | Description |
|---|---|---|---|
id | string | yes | Sale ULID (path). |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/sales/01EXAMPLEID"Example response
{
"data": {
"id": "01EXAMPLESALE",
"branch_id": "01EXAMPLEBRANCH",
"invoice_number": "INV-1001",
"status": 1,
"sale_date": "2026-01-15 10:00:00",
"grand_total": "1500.00"
}
}Payments & Refunds
/api/public/v1/paymentsSale payments.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
sale_id | string | no | Filter by sale ULID. |
payment_method_id | string | no | Filter by payment method ULID. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: created_at, updated_at, amount. Default `created_at`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `desc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/payments"Example response
{
"data": [
{
"id": "01EXAMPLEPAYMENT",
"sale_id": "01EXAMPLESALE",
"payment_method_id": "01EXAMPLEPM",
"amount": "1500.00",
"currency_code": "MMK",
"amount_in_currency": "1500.00",
"base_amount": "1500.00",
"created_at": "2026-01-15 10:00:00",
"updated_at": "2026-01-15 10:00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}/api/public/v1/refundsSale refunds / returns.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
search | string | no | Search by return number. |
sale_id | string | no | Filter by sale ULID. |
updated_since | string | no | Return records updated at/after this timestamp. |
sort_by | string | no | Sort column: return_date, refund_amount, created_at, updated_at, return_number. Default `return_date`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `desc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/refunds"Example response
{
"data": [
{
"id": "01EXAMPLEREFUND",
"sale_id": "01EXAMPLESALE",
"branch_id": "01EXAMPLEBRANCH",
"return_number": "RET-1",
"return_date": "2026-01-16 10:00:00",
"status": 1,
"total_amount": "500.00",
"tax_amount": "0.00",
"discount_amount": "0.00",
"refund_amount": "500.00",
"reason": null
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"last_page": 1
}
}Reports
/api/public/v1/reports/sales/summarySales summary totals for a date range.
| Param | Type | Required | Description |
|---|---|---|---|
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/summary"Example response
{
"data": {
"sales_count": 12,
"gross_sales": "15000.00",
"discounts": "500.00",
"refunds": "0.00",
"net_sales": "14500.00"
}
}/api/public/v1/reports/sales/by-productSales aggregated by product.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
sort_by | string | no | Sort column: amount, quantity, product_name, sku. Default `amount`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `desc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/by-product"Example response
{
"data": [],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 0,
"last_page": 1
}
}/api/public/v1/reports/sales/by-categorySales aggregated by category.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Items per page (max 100). |
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
sort_by | string | no | Sort column: amount, quantity, category_name. Default `amount`. |
sort_dir | string | no | Sort direction: `asc` or `desc`. Default `desc`. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/by-category"Example response
{
"data": [],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 0,
"last_page": 1
}
}/api/public/v1/reports/sales/by-branchSales aggregated by branch.
| Param | Type | Required | Description |
|---|---|---|---|
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/by-branch"Example response
{
"data": []
}/api/public/v1/reports/sales/by-payment-methodSales aggregated by payment method.
| Param | Type | Required | Description |
|---|---|---|---|
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/by-payment-method"Example response
{
"data": []
}/api/public/v1/reports/sales/by-employeeSales aggregated by employee.
| Param | Type | Required | Description |
|---|---|---|---|
branch_id | string | no | Limit results to a branch id (ULID). |
date_from | string | no | Start date (inclusive), ISO or Y-m-d. |
date_to | string | no | End date (inclusive), ISO or Y-m-d. |
Request
curl -X GET \
-H "X-API-KEY: $PHILO_API_KEY" \
-H "Accept: application/json" \
"https://api.philo.asia/api/public/v1/reports/sales/by-employee"Example response
{
"data": []
}