organization

Referral Graph Data

Get graph data for referral program metrics over time.

Supports the following report types:

  • TOTAL_REFERRAL_ORDERS: Count of orders with referral codes over time
  • TOTAL_REFERRAL_COMMISSION: Total commission earned over time
  • TOTAL_REFERRAL_TICKETS: Number of tickets sold through referrals over time
  • TOTAL_REFERRAL_REVENUE: Total revenue from referrals over time (without service fees)

Supports the following filter types:

  • MONTHLY: Filter by a specific month (requires 'month' parameter, e.g., "January")
  • CUSTOM: Filter by custom date range (requires 'start_date' and 'end_date' in YYYY-MM-DD format)
  • YEARLY: Group by months for a specific year (requires 'year' parameter, e.g., "2024")

Query Parameters:

  • report_type: Type of report (default: "TOTAL REFERRAL ORDERS")
  • filter_type: Filter type (MONTHLY, CUSTOM, YEARLY)
  • start_date: Start date for CUSTOM filter (YYYY-MM-DD)
  • end_date: End date for CUSTOM filter (YYYY-MM-DD)
  • month: Month name for MONTHLY filter (e.g., "January", "February")
  • year: Year for YEARLY filter (e.g., "2024")

Returns: Dictionary with dates as keys and counts/amounts as values. For MONTHLY and CUSTOM: {"01 January, 2024": 5, "02 January, 2024": 3, ...} For YEARLY: {"January, 2024": 25, "February, 2024": 30, ...}

get/organization/referral-graph-data/{organization_id}/

Path parameters

organization_idinteger required

Query parameters

report_typestring nullable
filter_typestring nullable
start_datestring nullable
end_datestring nullable
monthstring nullable
yearstring nullable

Response

Successful Response

{"stackTrail":"paths:/organization/referral-graph-data/{organization_id}/:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.