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.

Scope of data: Analytics reports aggregate data across all products you are subscribed to. A report for 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_here

Required scopes

analytics:reports:readList and read report data
analytics:reports:exportCreate CSV/PDF export jobs

Reports

Pre-built report templates covering all subscribed products.

GET/v1/analytics/reports

List 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
    }
  ]
}
GET/v1/analytics/reports/{id}

Get report data

Fetch the data for a specific report. Use the report ID from the list endpoint.

Query parameters

ParameterTypeDescription
start_dateYYYY-MM-DDStart of the date range (default: 30 days ago).
end_dateYYYY-MM-DDEnd of the date range (default: today).
granularitystring"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.

POST/v1/analytics/reports/export

Create an export

Generates a file export for a report. Returns a download URL valid for 1 hour.

Request body

ParameterTypeDescription
report_idrequiredstringThe report ID to export (from the list endpoint).
formatrequiredstring"csv" | "pdf".
start_dateYYYY-MM-DDStart of the date range.
end_dateYYYY-MM-DDEnd of the date range.
granularitystring"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
}
Export download URLs expire after 1 hour. Download and store the file immediately. Re-request an export if the URL expires.

Error codes

CodeErrorCause
401UnauthorizedMissing or expired API key.
403ForbiddenNo active subscription for the requested report's product.
404Not FoundReport ID does not exist.
422Validation ErrorInvalid date range or granularity value.
429Too Many RequestsRate limit exceeded.
500Internal Server ErrorContact support with your request ID.