Klu Docs

GET analytics staff

Read staff revenue, discount, and observed shift analytics.

Endpoint

GET /public-api/v1/analytics/staff

Purpose

Returns staff ranked by revenue with discount and observed shift metrics for paid sales in the selected date range.

Authentication

Required.

Parameters

  • storeIds: optional branch filter.
  • from: optional ISO timestamp.
  • to: optional ISO timestamp.
  • limit: optional row limit, default 100, maximum 100.

Response fields

Each row includes safe staff profile fields, revenue, txCount, avgOrderValue, discountAmount, discountedTxCount, discountRate, observed shift counts, observed working minutes/hours, observed work days, last clock-in/out timestamps, and drawer shift counts.

discountAmount includes sale-level discounts and line-item promotion, price-profile, and item discounts. discountRate is discountAmount / (revenue + discountAmount) * 100.

Example request

curl "https://api.klupos.com/public-api/v1/analytics/staff?from=2026-06-01T00:00:00.000Z&to=2026-06-24T23:59:59.999Z" \
  -H "Authorization: Bearer klu_live_replace_me"

Example response

{
  "data": [
    {
      "id": "staff-id",
      "name": "Narin",
      "role": "STAFF",
      "store": { "id": "store-id", "name": "Main Branch", "branchNo": "001" },
      "revenue": 18500,
      "txCount": 42,
      "avgOrderValue": 440.48,
      "discountAmount": 950,
      "discountedTxCount": 8,
      "discountRate": 4.88,
      "observedWorkingHours": 83.5,
      "observedWorkDays": 12
    }
  ]
}

Common errors

  • 400: invalid date range, limit, or store UUID.
  • 401: invalid key.
  • 403: requested storeIds are outside the organization.
  • 429: rate limit exceeded.

AI-agent notes

Use this endpoint for questions like "who generated the most revenue?" and "who gives customers the biggest discounts?"

On this page