apskel-pos-backend/postman.json

1703 lines
42 KiB
JSON
Raw Normal View History

2025-08-03 00:34:25 +07:00
{
"info": {
"_postman_id": "apskel-pos-api-collection",
"name": "APSkel POS API",
"description": "Complete API collection for APSkel POS Backend System",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "base_url",
"value": "http://localhost:4000",
"type": "string"
},
{
"key": "auth_token",
"value": "",
"type": "string"
},
{
"key": "organization_id",
"value": "",
"type": "string"
},
{
"key": "outlet_id",
"value": "",
"type": "string"
},
{
"key": "user_id",
"value": "",
"type": "string"
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{auth_token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"item": [
{
"name": "Health Check",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/health",
"host": ["{{base_url}}"],
"path": ["health"]
}
}
},
{
"name": "Authentication",
"item": [
{
"name": "Login",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"admin@example.com\",\n \"password\": \"password123\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/auth/login",
"host": ["{{base_url}}"],
"path": ["api", "v1", "auth", "login"]
}
}
},
{
"name": "Logout",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/auth/logout",
"host": ["{{base_url}}"],
"path": ["api", "v1", "auth", "logout"]
}
}
},
{
"name": "Refresh Token",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/auth/refresh",
"host": ["{{base_url}}"],
"path": ["api", "v1", "auth", "refresh"]
}
}
},
{
"name": "Validate Token",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/auth/validate",
"host": ["{{base_url}}"],
"path": ["api", "v1", "auth", "validate"]
}
}
},
{
"name": "Get Profile",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/auth/profile",
"host": ["{{base_url}}"],
"path": ["api", "v1", "auth", "profile"]
}
}
}
]
},
{
"name": "Organizations",
"item": [
{
"name": "Create Organization (Public)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Sample Restaurant\",\n \"address\": \"123 Main Street, City\",\n \"phone\": \"+1234567890\",\n \"email\": \"contact@samplerestaurant.com\",\n \"tax_number\": \"TAX123456789\",\n \"currency\": \"USD\",\n \"timezone\": \"UTC\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/organizations",
"host": ["{{base_url}}"],
"path": ["api", "v1", "organizations"]
}
}
},
{
"name": "List Organizations (Super Admin)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/organizations?page=1&limit=10",
"host": ["{{base_url}}"],
"path": ["api", "v1", "organizations"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
}
]
}
}
},
{
"name": "Get Organization (Super Admin)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/organizations/{{organization_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "organizations", "{{organization_id}}"]
}
}
},
{
"name": "Update Organization (Super Admin)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Updated Restaurant Name\",\n \"address\": \"456 New Street, City\",\n \"phone\": \"+1987654321\",\n \"email\": \"newcontact@restaurant.com\",\n \"tax_number\": \"TAX987654321\",\n \"currency\": \"EUR\",\n \"timezone\": \"Europe/London\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/organizations/{{organization_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "organizations", "{{organization_id}}"]
}
}
},
{
"name": "Delete Organization (Super Admin)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/organizations/{{organization_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "organizations", "{{organization_id}}"]
}
}
}
]
},
{
"name": "Users",
"item": [
{
"name": "Create User (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"organization_id\": \"{{organization_id}}\",\n \"outlet_id\": \"{{outlet_id}}\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"password\": \"password123\",\n \"role\": \"cashier\",\n \"permissions\": {\n \"can_create_orders\": true,\n \"can_void_orders\": false\n }\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/users",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users"]
}
}
},
{
"name": "List Users (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/users?page=1&limit=10&role=cashier&outlet_id={{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "role",
"value": "cashier"
},
{
"key": "outlet_id",
"value": "{{outlet_id}}"
}
]
}
}
},
{
"name": "Get User (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}"]
}
}
},
{
"name": "Update User (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"John Updated Doe\",\n \"email\": \"john.updated@example.com\",\n \"role\": \"manager\",\n \"outlet_id\": \"{{outlet_id}}\",\n \"is_active\": true,\n \"permissions\": {\n \"can_create_orders\": true,\n \"can_void_orders\": true,\n \"can_manage_inventory\": true\n }\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}"]
}
}
},
{
"name": "Delete User (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}"]
}
}
},
{
"name": "Activate User (Admin/Manager)",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}/activate",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}", "activate"]
}
}
},
{
"name": "Deactivate User (Admin/Manager)",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}/deactivate",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}", "deactivate"]
}
}
},
{
"name": "Change Password",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"current_password\": \"oldpassword123\",\n \"new_password\": \"newpassword123\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/users/{{user_id}}/password",
"host": ["{{base_url}}"],
"path": ["api", "v1", "users", "{{user_id}}", "password"]
}
}
}
]
},
{
"name": "Categories",
"item": [
{
"name": "Create Category (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Beverages\",\n \"description\": \"All types of drinks and beverages\",\n \"color\": \"#FF6B6B\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/categories",
"host": ["{{base_url}}"],
"path": ["api", "v1", "categories"]
}
}
},
{
"name": "List Categories (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/categories?page=1&limit=10&is_active=true",
"host": ["{{base_url}}"],
"path": ["api", "v1", "categories"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "is_active",
"value": "true"
}
]
}
}
},
{
"name": "Get Category (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/categories/{{category_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "categories", "{{category_id}}"]
}
}
},
{
"name": "Update Category (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Hot Beverages\",\n \"description\": \"Hot drinks like coffee and tea\",\n \"color\": \"#4ECDC4\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/categories/{{category_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "categories", "{{category_id}}"]
}
}
},
{
"name": "Delete Category (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/categories/{{category_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "categories", "{{category_id}}"]
}
}
}
]
},
{
"name": "Products",
"item": [
{
"name": "Create Product (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Cappuccino\",\n \"description\": \"Classic Italian coffee drink\",\n \"category_id\": \"{{category_id}}\",\n \"sku\": \"CAP001\",\n \"barcode\": \"1234567890123\",\n \"price\": 4.50,\n \"cost\": 1.20,\n \"is_active\": true,\n \"has_variants\": false,\n \"image_url\": \"https://example.com/cappuccino.jpg\",\n \"printer_type\": \"kitchen\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/products",
"host": ["{{base_url}}"],
"path": ["api", "v1", "products"]
}
}
},
{
"name": "List Products (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/products?page=1&limit=10&category_id={{category_id}}&is_active=true",
"host": ["{{base_url}}"],
"path": ["api", "v1", "products"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "category_id",
"value": "{{category_id}}"
},
{
"key": "is_active",
"value": "true"
}
]
}
}
},
{
"name": "Get Product (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/products/{{product_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "products", "{{product_id}}"]
}
}
},
{
"name": "Update Product (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Premium Cappuccino\",\n \"description\": \"Premium Italian coffee drink with extra foam\",\n \"price\": 5.50,\n \"cost\": 1.50,\n \"is_active\": true,\n \"image_url\": \"https://example.com/premium-cappuccino.jpg\",\n \"printer_type\": \"kitchen\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/products/{{product_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "products", "{{product_id}}"]
}
}
},
{
"name": "Delete Product (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/products/{{product_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "products", "{{product_id}}"]
}
}
}
]
},
{
"name": "Inventory",
"item": [
{
"name": "Create Inventory (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"product_id\": \"{{product_id}}\",\n \"outlet_id\": \"{{outlet_id}}\",\n \"quantity\": 100,\n \"min_stock_level\": 10,\n \"max_stock_level\": 200\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/inventory",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory"]
}
}
},
{
"name": "List Inventory (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/inventory?page=1&limit=10&outlet_id={{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "outlet_id",
"value": "{{outlet_id}}"
}
]
}
}
},
{
"name": "Get Inventory (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/inventory/{{inventory_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "{{inventory_id}}"]
}
}
},
{
"name": "Update Inventory (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"quantity\": 150,\n \"min_stock_level\": 15,\n \"max_stock_level\": 250\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/inventory/{{inventory_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "{{inventory_id}}"]
}
}
},
{
"name": "Delete Inventory (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/inventory/{{inventory_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "{{inventory_id}}"]
}
}
},
{
"name": "Adjust Inventory (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"product_id\": \"{{product_id}}\",\n \"outlet_id\": \"{{outlet_id}}\",\n \"quantity_change\": -5,\n \"reason\": \"Sales transaction\",\n \"movement_type\": \"sale\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/inventory/adjust",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "adjust"]
}
}
},
{
"name": "Get Low Stock Items (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/inventory/low-stock/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "low-stock", "{{outlet_id}}"]
}
}
},
{
"name": "Get Zero Stock Items (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/inventory/zero-stock/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "inventory", "zero-stock", "{{outlet_id}}"]
}
}
}
]
},
{
"name": "Orders",
"item": [
{
"name": "Create Order (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"outlet_id\": \"{{outlet_id}}\",\n \"user_id\": \"{{user_id}}\",\n \"table_number\": \"A1\",\n \"order_type\": \"dine_in\",\n \"notes\": \"Extra hot please\",\n \"order_items\": [\n {\n \"product_id\": \"{{product_id}}\",\n \"quantity\": 2,\n \"unit_price\": 4.50,\n \"notes\": \"One with extra shot\"\n }\n ],\n \"customer_name\": \"John Doe\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders"]
}
}
},
{
"name": "List Orders (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/orders?page=1&limit=10&outlet_id={{outlet_id}}&status=completed",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "status",
"value": "completed"
}
]
}
}
},
{
"name": "Get Order by ID (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/orders/{{order_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "{{order_id}}"]
}
}
},
{
"name": "Update Order (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"status\": \"ready\",\n \"discount_amount\": 2.00,\n \"notes\": \"Ready for pickup\",\n \"metadata\": {\n \"preparation_time\": \"5 minutes\"\n }\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders/{{order_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "{{order_id}}"]
}
}
},
{
"name": "Add Items to Order (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"order_items\": [\n {\n \"product_id\": \"{{product_id}}\",\n \"quantity\": 1,\n \"unit_price\": 3.50,\n \"notes\": \"Extra sugar\"\n }\n ],\n \"notes\": \"Additional items added\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders/{{order_id}}/add-items",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "{{order_id}}", "add-items"]
}
}
},
{
"name": "Set Order Customer (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"customer_id\": \"{{customer_id}}\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders/{{order_id}}/customer",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "{{order_id}}", "customer"]
}
}
},
{
"name": "Void Order (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"order_id\": \"{{order_id}}\",\n \"reason\": \"Customer cancelled order\",\n \"type\": \"ALL\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders/void",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "void"]
}
}
},
{
"name": "Refund Order (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"reason\": \"Wrong order delivered\",\n \"refund_amount\": 10.00,\n \"order_items\": [\n {\n \"order_item_id\": \"{{order_item_id}}\",\n \"refund_quantity\": 1,\n \"refund_amount\": 4.50,\n \"reason\": \"Item was cold\"\n }\n ]\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/orders/{{order_id}}/refund",
"host": ["{{base_url}}"],
"path": ["api", "v1", "orders", "{{order_id}}", "refund"]
}
}
}
]
},
{
"name": "Payments",
"item": [
{
"name": "Create Payment (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"order_id\": \"{{order_id}}\",\n \"payment_method_id\": \"{{payment_method_id}}\",\n \"amount\": 15.50,\n \"transaction_id\": \"TXN123456789\",\n \"split_number\": 1,\n \"split_total\": 2,\n \"split_description\": \"Split payment 1 of 2\",\n \"payment_order_items\": [\n {\n \"order_item_id\": \"{{order_item_id}}\",\n \"amount\": 15.50\n }\n ]\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/payments",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payments"]
}
}
},
{
"name": "Refund Payment (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"refund_amount\": 5.00,\n \"reason\": \"Customer requested refund\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/payments/{{payment_id}}/refund",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payments", "{{payment_id}}", "refund"]
}
}
}
]
},
{
"name": "Payment Methods",
"item": [
{
"name": "Create Payment Method (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Credit Card\",\n \"description\": \"Visa, MasterCard, American Express\",\n \"is_active\": true,\n \"requires_receipt\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/payment-methods",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods"]
}
}
},
{
"name": "List Payment Methods (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/payment-methods?page=1&limit=10&is_active=true",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "is_active",
"value": "true"
}
]
}
}
},
{
"name": "Get Payment Method (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/payment-methods/{{payment_method_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods", "{{payment_method_id}}"]
}
}
},
{
"name": "Update Payment Method (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Digital Wallet\",\n \"description\": \"Apple Pay, Google Pay, Samsung Pay\",\n \"is_active\": true,\n \"requires_receipt\": false\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/payment-methods/{{payment_method_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods", "{{payment_method_id}}"]
}
}
},
{
"name": "Delete Payment Method (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/payment-methods/{{payment_method_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods", "{{payment_method_id}}"]
}
}
},
{
"name": "Get Active Payment Methods by Organization (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/payment-methods/organization/{{organization_id}}/active",
"host": ["{{base_url}}"],
"path": ["api", "v1", "payment-methods", "organization", "{{organization_id}}", "active"]
}
}
}
]
},
{
"name": "Customers",
"item": [
{
"name": "Create Customer (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Jane Smith\",\n \"email\": \"jane.smith@email.com\",\n \"phone\": \"+1234567890\",\n \"address\": \"456 Oak Street, City\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/customers",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers"]
}
}
},
{
"name": "List Customers (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/customers?page=1&limit=10&is_active=true",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "is_active",
"value": "true"
}
]
}
}
},
{
"name": "Get Customer (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/customers/{{customer_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers", "{{customer_id}}"]
}
}
},
{
"name": "Update Customer (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Jane Updated Smith\",\n \"email\": \"jane.updated@email.com\",\n \"phone\": \"+1987654321\",\n \"address\": \"789 Pine Street, City\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/customers/{{customer_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers", "{{customer_id}}"]
}
}
},
{
"name": "Delete Customer (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/customers/{{customer_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers", "{{customer_id}}"]
}
}
},
{
"name": "Set Default Customer (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"customer_id\": \"{{customer_id}}\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/customers/set-default",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers", "set-default"]
}
}
},
{
"name": "Get Default Customer (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/customers/default",
"host": ["{{base_url}}"],
"path": ["api", "v1", "customers", "default"]
}
}
}
]
},
{
"name": "Files",
"item": [
{
"name": "Upload File (Admin/Manager)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": []
},
{
"key": "file_type",
"value": "image",
"type": "text"
},
{
"key": "description",
"value": "Product image",
"type": "text"
}
]
},
"url": {
"raw": "{{base_url}}/api/v1/files/upload",
"host": ["{{base_url}}"],
"path": ["api", "v1", "files", "upload"]
}
}
},
{
"name": "Get Files by Organization (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/files/organization?page=1&limit=10",
"host": ["{{base_url}}"],
"path": ["api", "v1", "files", "organization"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
}
]
}
}
},
{
"name": "Get Files by User (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/files/user?page=1&limit=10",
"host": ["{{base_url}}"],
"path": ["api", "v1", "files", "user"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
}
]
}
}
},
{
"name": "Get File by ID (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/files/{{file_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "files", "{{file_id}}"]
}
}
},
{
"name": "Update File (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"description\": \"Updated product image\",\n \"metadata\": {\n \"alt_text\": \"Cappuccino product image\"\n }\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/files/{{file_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "files", "{{file_id}}"]
}
}
}
]
},
{
"name": "Analytics",
"item": [
{
"name": "Get Payment Method Analytics (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/analytics/payment-methods?outlet_id={{outlet_id}}&date_from=2024-01-01&date_to=2024-12-31",
"host": ["{{base_url}}"],
"path": ["api", "v1", "analytics", "payment-methods"],
"query": [
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "date_from",
"value": "2024-01-01"
},
{
"key": "date_to",
"value": "2024-12-31"
}
]
}
}
},
{
"name": "Get Sales Analytics (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/analytics/sales?outlet_id={{outlet_id}}&date_from=2024-01-01&date_to=2024-12-31&group_by=day",
"host": ["{{base_url}}"],
"path": ["api", "v1", "analytics", "sales"],
"query": [
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "date_from",
"value": "2024-01-01"
},
{
"key": "date_to",
"value": "2024-12-31"
},
{
"key": "group_by",
"value": "day"
}
]
}
}
},
{
"name": "Get Product Analytics (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/analytics/products?outlet_id={{outlet_id}}&date_from=2024-01-01&date_to=2024-12-31&limit=10",
"host": ["{{base_url}}"],
"path": ["api", "v1", "analytics", "products"],
"query": [
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "date_from",
"value": "2024-01-01"
},
{
"key": "date_to",
"value": "2024-12-31"
},
{
"key": "limit",
"value": "10"
}
]
}
}
},
{
"name": "Get Dashboard Analytics (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/analytics/dashboard?outlet_id={{outlet_id}}&date_from=2024-01-01&date_to=2024-12-31",
"host": ["{{base_url}}"],
"path": ["api", "v1", "analytics", "dashboard"],
"query": [
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "date_from",
"value": "2024-01-01"
},
{
"key": "date_to",
"value": "2024-12-31"
}
]
}
}
},
{
"name": "Get Profit Loss Analytics (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/analytics/profit-loss?outlet_id={{outlet_id}}&date_from=2024-01-01&date_to=2024-12-31",
"host": ["{{base_url}}"],
"path": ["api", "v1", "analytics", "profit-loss"],
"query": [
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "date_from",
"value": "2024-01-01"
},
{
"key": "date_to",
"value": "2024-12-31"
}
]
}
}
}
]
},
{
"name": "Tables",
"item": [
{
"name": "Create Table (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"outlet_id\": \"{{outlet_id}}\",\n \"table_number\": \"A1\",\n \"capacity\": 4,\n \"status\": \"available\",\n \"location\": \"Window area\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/tables",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables"]
}
}
},
{
"name": "List Tables (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/tables?page=1&limit=10&outlet_id={{outlet_id}}&status=available",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "outlet_id",
"value": "{{outlet_id}}"
},
{
"key": "status",
"value": "available"
}
]
}
}
},
{
"name": "Get Table by ID (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/tables/{{table_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables", "{{table_id}}"]
}
}
},
{
"name": "Update Table (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"table_number\": \"A2\",\n \"capacity\": 6,\n \"location\": \"Garden area\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/tables/{{table_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables", "{{table_id}}"]
}
}
},
{
"name": "Delete Table (Admin/Manager)",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/tables/{{table_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables", "{{table_id}}"]
}
}
},
{
"name": "Occupy Table (Admin/Manager)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"order_id\": \"{{order_id}}\"\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/tables/{{table_id}}/occupy",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables", "{{table_id}}", "occupy"]
}
}
},
{
"name": "Release Table (Admin/Manager)",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/tables/{{table_id}}/release",
"host": ["{{base_url}}"],
"path": ["api", "v1", "tables", "{{table_id}}", "release"]
}
}
},
{
"name": "Get Available Tables by Outlet (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/outlets/{{outlet_id}}/tables/available",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "{{outlet_id}}", "tables", "available"]
}
}
},
{
"name": "Get Occupied Tables by Outlet (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/outlets/{{outlet_id}}/tables/occupied",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "{{outlet_id}}", "tables", "occupied"]
}
}
}
]
},
{
"name": "Outlets",
"item": [
{
"name": "List Outlets (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/outlets/list?page=1&limit=10&organization_id={{organization_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "list"],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "limit",
"value": "10"
},
{
"key": "organization_id",
"value": "{{organization_id}}"
}
]
}
}
},
{
"name": "Get Outlet (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/outlets/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "{{outlet_id}}"]
}
}
},
{
"name": "Update Outlet (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Updated Outlet Name\",\n \"address\": \"789 New Street, City\",\n \"phone\": \"+1987654321\",\n \"email\": \"outlet@example.com\",\n \"is_active\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/outlets/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "{{outlet_id}}"]
}
}
},
{
"name": "Get Printer Settings (Admin/Manager)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/v1/outlets/printer-setting/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "printer-setting", "{{outlet_id}}"]
}
}
},
{
"name": "Update Printer Settings (Admin/Manager)",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"kitchen_printer_ip\": \"192.168.1.100\",\n \"kitchen_printer_port\": 9100,\n \"receipt_printer_ip\": \"192.168.1.101\",\n \"receipt_printer_port\": 9100,\n \"auto_print_receipt\": true,\n \"auto_print_kitchen\": true\n}"
},
"url": {
"raw": "{{base_url}}/api/v1/outlets/printer-setting/{{outlet_id}}",
"host": ["{{base_url}}"],
"path": ["api", "v1", "outlets", "printer-setting", "{{outlet_id}}"]
}
}
}
]
}
]
}