referral

Referral deep link handler

Handles referral link clicks with backend device detection. This endpoint: - Detects user's device OS from User-Agent header (Android/iOS/Desktop) - If app installed: Opens app with member ID via Universal Links (iOS) or App Links (Android) - If not installed: Redirects to App Store/Play Store based on detected OS - Supports deferred deep linking via Universal Links/App Links (opens app after installation)

**Flow:**
1. User clicks referral link: https://api.tonewow.com/ref/TWE-123456 or https://api.tonewow.com/ref/TWP-123456
2. Backend detects device OS from User-Agent
3. Serves appropriate HTML page that attempts to open app via deep link
4. Falls back to store if app not installed
5. After installation, Universal Links/App Links automatically open app with referral code
get/ref/{memberID}

Path parameters

memberIDstring required
Example:TWE-123456

Member ID of the referrer (e.g., TWE-123456 or TWP-123456)

Query parameters

utm_sourcestring

Optional UTM source parameter

utm_mediumstring

Optional UTM medium parameter

utm_campaignstring

Optional UTM campaign parameter

Changes

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