REST API
API endpoints untuk sales reports, analytics, dan data exports
GET /api/v1/reports/sales?start_date=2024-01-01&end_date=2024-01-31 Authorization: Bearer {token} X-Merchant-ID: merchant_abc
{ "data": { "total_sales": 50000000, "total_transactions": 1250, "average_transaction": 40000, "top_products": [ { "product_id": "prod_123", "name": "Product A", "quantity_sold": 500, "revenue": 5000000 } ] } }
GET /api/v1/reports/inventory Authorization: Bearer {token}
POST /api/v1/reports/export Authorization: Bearer {token} { "report_type": "sales", "format": "csv", "start_date": "2024-01-01", "end_date": "2024-01-31" }
{ "data": { "download_url": "https://cdn.mstore.com/exports/sales_2024-01.csv", "expires_at": "2024-01-02T00:00:00Z" } }
Was this page helpful?