API documentation for the Android POS app. No login or authentication required.
Call once when opening the POS screen. Returns warehouses, clients, categories, brands, payment methods, and default warehouse/client.
GET https://gmexperteng.com/pos_data.php Try →
Response (example):
{
"stripe_key": "",
"brands": [{"id": 1, "name": "Brand A"}],
"defaultWarehouse": 1,
"defaultClient": 2,
"default_client_name": "Walk-in",
"clients": [{"id": 1, "name": "Customer A"}, {"id": 2, "name": "Walk-in"}],
"warehouses": [{"id": 1, "name": "Main Store"}],
"categories": [{"id": 1, "name": "Category A"}],
"accounts": [{"id": 1, "account_name": "Cash Account"}],
"payment_methods": [{"id": 1, "name": "Cash"}, {"id": 2, "name": "Credit Card"}],
"products_per_page": 28
}
Products available for sale in a warehouse (paginated).
GET https://gmexperteng.com/products.php?warehouse_id=1&page=1 Try →
| Parameter | Required | Description |
|---|---|---|
| warehouse_id | Yes | Warehouse ID (from pos_data) |
| page | No | Page number (default 1) |
| category_id | No | Filter by category |
| brand_id | No | Filter by brand |
| stock | No | 1 = only in-stock |
| product_combo | No | 1 = include combos |
| product_service | No | 1 = include services |
Response (example):
{
"products": [
{
"id": 10,
"product_variant_id": null,
"code": "PRD-001",
"name": "Product Name",
"barcode": "PRD-001",
"image": "products/image.jpg",
"qte_sale": 100,
"qte": 100,
"unitSale": "pcs",
"product_type": "is_single",
"Net_price": 25.50
}
],
"totalRows": 42
}
GET https://gmexperteng.com/clients.php Try →
Returns [{"id": 1, "name": "Customer A"}, ...]
POST https://gmexperteng.com/clients.php
Headers: Content-Type: application/json
Body (JSON): Only name is required. Others optional: phone, email, adresse, country, city, tax_number.
{
"name": "New Customer Name",
"phone": "+220 123 4567",
"email": "customer@example.com"
}
Response: {"success": true}
POST https://gmexperteng.com/create_sale.php
Headers: Content-Type: application/json
Body (JSON): client_id, warehouse_id, details[], payments[], GrandTotal are required.
{
"client_id": 2,
"warehouse_id": 1,
"tax_rate": 0,
"TaxNet": 0,
"discount": 0,
"shipping": 0,
"GrandTotal": 150.00,
"notes": "",
"po_number": "",
"account_id": null,
"payment_note": null,
"details": [
{
"product_id": 10,
"product_variant_id": null,
"sale_unit_id": 1,
"quantity": 2,
"Unit_price": 25.50,
"subtotal": 51.00,
"tax_percent": 0,
"tax_method": "1",
"discount": 0,
"discount_Method": "2",
"imei_number": null,
"name": "Product Name"
}
],
"payments": [
{ "payment_method_id": 1, "amount": 150.00 }
]
}
Response: {"success": true, "id": 123} — id is the new sale ID.
amount > GrandTotal, change is calculated automatically. With multiple payments, total paid must not exceed GrandTotal.GET https://gmexperteng.com/drafts.php?limit=10&page=1 Try →
Query: limit, page. Response: {"totalRows": N, "draft_sales": [...]}
GET https://gmexperteng.com/drafts.php?id=5
Returns full draft with details, clients, warehouses, payment_methods, etc.
POST https://gmexperteng.com/drafts.php
Same body as create sale but without payments. Response: {"success": true}
POST https://gmexperteng.com/drafts.php
{
"draft_sale_id": 5,
"amount": 85.50,
"payment": {
"payment_method_id": 1,
"amount": 85.50,
"change": 0,
"notes": null,
"account_id": null
}
}
Response: {"success": true, "id": 124}. Draft is deleted on the server.
DELETE https://gmexperteng.com/drafts.php?id=5
Response: {"success": true}
GET https://gmexperteng.com/sales.php?limit=10&page=1 Try →
Query: limit, page, search, SortField (id, date, Ref, GrandTotal, etc.), SortType (asc, desc).
GET https://gmexperteng.com/sales.php?today=1 Try →
Response: today, total_sales_amount, total_amount_paid, total_cash, total_credit_card, total_cheque.
GET https://gmexperteng.com/sales.php?products=123
Replace 123 with sale ID. Returns sale + details[].
GET https://gmexperteng.com/sales.php?payments=123
Replace 123 with sale ID. Returns sale + payments[].
| What | Method | Endpoint |
|---|---|---|
| POS setup data | GET | pos_data.php |
| Products | GET | products.php?warehouse_id=1&page=1 |
| List clients | GET | clients.php |
| Create client | POST | clients.php |
| Create sale | POST | create_sale.php |
| List drafts | GET | drafts.php?limit=10&page=1 |
| Get draft | GET | drafts.php?id=5 |
| Create draft | POST | drafts.php |
| Submit draft | POST | drafts.php (body: draft_sale_id, payment, amount) |
| Delete draft | DELETE | drafts.php?id=5 |
| List sales | GET | sales.php?limit=10&page=1 |
| Today summary | GET | sales.php?today=1 |
| Sale line items | GET | sales.php?products=123 |
| Sale payments | GET | sales.php?payments=123 |
Authorization header needed. For POST/DELETE, set Content-Type: application/json and send JSON body where required.