Skip to main content

Order & Commission Reporting

The analytics endpoints provide partner-scoped session, order, commission, and cart-progression data. Analytics requests are limited to 60 requests per minute per IP.

List Sessions

GET /analytics/sessions returns 50 sessions per page. Use the page parameter and meta.pages to traverse pages; meta.count is the total number of matching sessions. Available filters:
  • start_date and end_date: Limit sessions by creation time.
  • updated_since: Return sessions whose session or order changed on or after the supplied time, ordered by most recent change first.
  • token_ids[]: Restrict results to API tokens owned by your account. A token you do not own returns HTTP 403.
  • with_clicks: When true, return only sessions with click activity.
cURL
curl --get https://api-sandbox.letshum.com/analytics/sessions \
  -H "Authorization: Bearer hum_sandbox_XXXXXXXXXXXXXXXXXXXXXXXXXX" \
  --data-urlencode "updated_since=2026-07-13T12:00:00Z" \
  --data-urlencode "page=1"
See List Sessions for the response schema and all parameters.

Get Session Detail

GET /analytics/sessions/{id} returns one session and adds:
  • order: The associated order, or null when no order was placed.
  • cart_progression: The full checkout-step timeline ordered by timestamp.
See Get Session Detail.

Order Fields

The order object includes:
  • order_number: Unique order identifier.
  • status: draft, submitted, processing, confirmed, complete, or cancelled.
  • ordered_at: When the order was submitted.
  • installed: Whether service has been installed.
  • installed_at: Installation timestamp, or null when not installed.
  • commission_cents: Locked commission amount in cents, or null when no commission is recorded.
The normal progression is draftsubmittedprocessingconfirmedcomplete. cancelled is final. For cancelled orders, installed is always false, while installed_at and commission_cents are null.

Keep a Local Copy Current

The API does not send server-side webhooks for analytics changes. Poll with updated_since set to the time of your last successful sync and page through all results. A session is returned whenever the session or its order changed, including installs, cancellations, and commission updates on older sessions. Treat each returned row as authoritative and overwrite your stored copy. Do not use start_date as a sync cursor: it filters by session creation time, so later status changes to older sessions do not appear.
Sync loop
cursor = last_successful_sync_time

repeat:
  sync_started_at = current_time()
  page = 1

  do:
    response = GET /analytics/sessions?updated_since=cursor&page=page
    overwrite_local_rows(response.data)
    page = page + 1
  while page <= response.meta.pages

  cursor = sync_started_at
  save_last_successful_sync_time(cursor)