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": "..." }.

StatuserrorMeaning
401invalid_api_keyMissing, invalid, revoked, or expired key
402plan_requiredPaid subscription required
402addon_requiredAPI requests pack required for webhooks
403forbidden / branch_forbiddenNot allowed or branch out of scope
403api_bannedOrganization or API key is banned
404not_foundResource not found
422validation_errorInvalid query/body
429rate_limitedPer-minute burst limit exceeded
429quota_exceededBilling-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

GET/api/public/v1/organization

Current organization profile for the API key.

Request

CodeTry it
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"
  }
}
GET/api/public/v1/branches

List branches visible to the API key.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
searchstringnoSearch by name, address, or phone.
is_activebooleannoFilter by active flag (`true` / `false`).
is_mainbooleannoFilter main branch only.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: name, created_at, updated_at, is_main. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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

GET/api/public/v1/categories

Paginated product categories.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
searchstringnoSearch by category name.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: name, created_at, updated_at. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/brands

Paginated brands.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
searchstringnoSearch by brand name.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: name, created_at, updated_at. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/products

Paginated products (catalog).

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
searchstringnoSearch by name, SKU, or barcode.
category_idstringnoFilter by category ULID.
brand_idstringnoFilter by brand ULID.
is_activebooleannoFilter by active flag (`true` / `false`).
typestringnoFilter by product type.
branch_idstringnoLimit results to a branch id (ULID).
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: name, sku, barcode, created_at, updated_at. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/products/{id}

Single product by id.

ParamTypeRequiredDescription
idstringyesProduct ULID (path).

Request

CodeTry it
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

GET/api/public/v1/stock

Stock levels by product / branch.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
product_idstringnoFilter by product ULID.
searchstringnoSearch by product name or SKU.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: name, sku, in_stock, updated_at. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/stock/low

Products at or below low-stock threshold.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
product_idstringnoFilter by product ULID.
searchstringnoSearch by product name or SKU.
sort_bystringnoSort column: name, sku, in_stock, updated_at. Default `name`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `asc`.

Request

CodeTry it
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

GET/api/public/v1/sales

Paginated sales.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.
searchstringnoSearch by invoice number.
statusintegernoFilter by sale status code.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: sale_date, invoice_number, grand_total, created_at, updated_at. Default `sale_date`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `desc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/sales/{id}

Single sale by id.

ParamTypeRequiredDescription
idstringyesSale ULID (path).

Request

CodeTry it
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

GET/api/public/v1/payments

Sale payments.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.
sale_idstringnoFilter by sale ULID.
payment_method_idstringnoFilter by payment method ULID.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: created_at, updated_at, amount. Default `created_at`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `desc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/refunds

Sale refunds / returns.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.
searchstringnoSearch by return number.
sale_idstringnoFilter by sale ULID.
updated_sincestringnoReturn records updated at/after this timestamp.
sort_bystringnoSort column: return_date, refund_amount, created_at, updated_at, return_number. Default `return_date`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `desc`.

Request

CodeTry it
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

GET/api/public/v1/reports/sales/summary

Sales summary totals for a date range.

ParamTypeRequiredDescription
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.

Request

CodeTry it
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"
  }
}
GET/api/public/v1/reports/sales/by-product

Sales aggregated by product.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.
sort_bystringnoSort column: amount, quantity, product_name, sku. Default `amount`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `desc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/reports/sales/by-category

Sales aggregated by category.

ParamTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoItems per page (max 100).
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.
sort_bystringnoSort column: amount, quantity, category_name. Default `amount`.
sort_dirstringnoSort direction: `asc` or `desc`. Default `desc`.

Request

CodeTry it
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
  }
}
GET/api/public/v1/reports/sales/by-branch

Sales aggregated by branch.

ParamTypeRequiredDescription
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.

Request

CodeTry it
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": []
}
GET/api/public/v1/reports/sales/by-payment-method

Sales aggregated by payment method.

ParamTypeRequiredDescription
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.

Request

CodeTry it
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": []
}
GET/api/public/v1/reports/sales/by-employee

Sales aggregated by employee.

ParamTypeRequiredDescription
branch_idstringnoLimit results to a branch id (ULID).
date_fromstringnoStart date (inclusive), ISO or Y-m-d.
date_tostringnoEnd date (inclusive), ISO or Y-m-d.

Request

CodeTry it
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": []
}