---
title: "Referral Graph Data"
method: GET
path: "/organization/referral-graph-data/{organization_id}/"
tags: ["organization"]
---

# Referral Graph Data

`GET /organization/referral-graph-data/{organization_id}/`

## Request

- Base URL: `https://api.myticketpartner.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myticketpartner.com/organization/referral-graph-data/{organization_id}/`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login/access/token`

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, ...}

## Path parameters

- `organization_id` integer, required

## Query parameters

- `report_type` string, nullable
- `filter_type` string, nullable
- `start_date` string, nullable
- `end_date` string, nullable
- `month` string, nullable
- `year` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `404`: Not found
- `422`: Validation Error

## Changes

- **2026-09-03** `43ba83e1f2fe`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Operation history](https://skmtc.dev/myticketpartner/apis/white-labelling-booking-api/changes/organization/referral-graph-data/:organization_id/get.md)

---

[API](https://skmtc.dev/myticketpartner/apis/white-labelling-booking-api.md) - [All operations](https://skmtc.dev/myticketpartner/apis/white-labelling-booking-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myticketpartner/apis/white-labelling-booking-api/revisions/338d5dfbdf4c?raw)
