Xe Analytics API
Base URL: https://api.xeboki.com/v1/analytics
The Xe Analytics API exposes cross-product business reports — sales summaries, subscription metrics, usage trends, and more. Pull data into your own BI tools, build custom dashboards, or schedule automated CSV/PDF exports.
pos.sales_summary requires an active Xe POS subscription. Reports for unsubscribed products return 403 Forbidden.Authentication
All requests require a valid API key. Create keys at account.xeboki.com .
Authorization: Bearer xbk_live_your_key_hereRequired scopes
analytics:reports:read | List and read report data |
analytics:reports:export | Create CSV/PDF export jobs |
Reports
Pre-built report templates covering all subscribed products.
/v1/analytics/reportsList available reports
Returns the catalog of reports available for your subscription.
curl https://api.xeboki.com/v1/analytics/reports \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"data": [
{
"id": "pos.sales_summary",
"name": "POS Sales Summary",
"product": "pos",
"description": "Daily/weekly/monthly revenue, order counts, and average order value.",
"supports_date_range": true,
"supports_export": true
},
{
"id": "launchpad.mrr_overview",
"name": "Launchpad MRR Overview",
"product": "launchpad",
"description": "Monthly recurring revenue, churn rate, and new subscriptions.",
"supports_date_range": true,
"supports_export": true
}
]
}/v1/analytics/reports/{id}Get report data
Fetch the data for a specific report. Use the report ID from the list endpoint.
Query parameters
| Parameter | Type | Description |
|---|---|---|
start_date | YYYY-MM-DD | Start of the date range (default: 30 days ago). |
end_date | YYYY-MM-DD | End of the date range (default: today). |
granularity | string | "day" | "week" | "month" (default: "day"). |
curl "https://api.xeboki.com/v1/analytics/reports/pos.sales_summary?start_date=2026-03-01&end_date=2026-03-31&granularity=day" \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"report_id": "pos.sales_summary",
"start_date": "2026-03-01",
"end_date": "2026-03-31",
"granularity": "day",
"summary": {
"total_revenue": 48320.50,
"total_orders": 1247,
"average_order_value": 38.75
},
"series": [
{ "date": "2026-03-01", "revenue": 1540.00, "orders": 42 },
{ "date": "2026-03-02", "revenue": 1820.50, "orders": 51 }
]
}Export
Export report data as a downloadable CSV or PDF file.
/v1/analytics/reports/exportCreate an export
Generates a file export for a report. Returns a download URL valid for 1 hour.
Request body
| Parameter | Type | Description |
|---|---|---|
report_idrequired | string | The report ID to export (from the list endpoint). |
formatrequired | string | "csv" | "pdf". |
start_date | YYYY-MM-DD | Start of the date range. |
end_date | YYYY-MM-DD | End of the date range. |
granularity | string | "day" | "week" | "month". |
curl -X POST https://api.xeboki.com/v1/analytics/reports/export \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"report_id": "pos.sales_summary",
"format": "csv",
"start_date": "2026-03-01",
"end_date": "2026-03-31"
}'Response 200
{
"report_id": "pos.sales_summary",
"format": "csv",
"download_url": "https://cdn.xeboki.com/exports/abc123.csv",
"expires_at": "2026-03-31T13:00:00Z",
"file_size_bytes": 24576
}Error codes
| Code | Error | Cause |
|---|---|---|
| 401 | Unauthorized | Missing or expired API key. |
| 403 | Forbidden | No active subscription for the requested report's product. |
| 404 | Not Found | Report ID does not exist. |
| 422 | Validation Error | Invalid date range or granularity value. |
| 429 | Too Many Requests | Rate limit exceeded. |
| 500 | Internal Server Error | Contact support with your request ID. |