PoSTrack REST API — v1.0
Base URL: http://<host>:8080
Content-Type: application/json
Runtime: Python 2.7 CGI-style BaseHTTPServer — No framework, no Swagger library available.
Base URL: http://<host>:8080
Content-Type: application/json
Runtime: Python 2.7 CGI-style BaseHTTPServer — No framework, no Swagger library available.
📄 Available Endpoints
| Method | Endpoint | Description | Query Parameters | Sample Response |
|---|---|---|---|---|
| GET | / | HTML Web Dashboard (this page) | - | HTML page |
| GET | /health | System health check and uptime | - | {"status":"HEALTHY","uptime_seconds":120,...} |
| GET | /stores | List all retail store locations | - | {"count":4,"stores":{...}} |
| GET | /inventory | List all inventory items with stock levels | category=Apparel | low_stock=1 | {"total_items":8,"inventory":[...]} |
| GET | /transactions | List recent transactions (last 50) | store_id=STORE-01 | {"count":12,"transactions":[...]} |
| GET | /summary | Daily sales summary per store | - | {"date":"2026-09-07","store_summary":[...]} |
| GET | /docs | This API documentation page | - | HTML page |
| GET | /swagger | Alias for /docs | - | HTML page |
| POST | /transaction | Record a new POS transaction | - | {"success":true,"transaction":{...}} |
📄 POST /transaction — Request Body
{
"store_id": "STORE-01",
"register": "REG-02",
"cashier": "Amit K",
"payment_method": "UPI",
"items": [
{ "sku": "SKU-E001", "qty": 1, "unit_price": 1999.00 },
{ "sku": "SKU-A001", "qty": 2, "unit_price": 599.00 }
]
}⚠ Legacy Notice
This server runs on Python 2.7 (End-of-Life: January 2020) using a raw BaseHTTPServer.
No Swagger/OpenAPI library is available for this runtime. This page serves as a static API reference.
Migration Target: Azure App Service (Re-Platform) or AKS (Containerize) for Swagger/OpenAPI support.
No Swagger/OpenAPI library is available for this runtime. This page serves as a static API reference.
Migration Target: Azure App Service (Re-Platform) or AKS (Containerize) for Swagger/OpenAPI support.