### Dynamic Documentation Query Example Source: https://support.referralhero.com/campaign-builder/launch/two-step-conversion To get additional information not explicitly on the page, make a GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://support.referralhero.com/campaign-builder/launch/two-step-conversion.md?ask= ``` -------------------------------- ### Example URL Change Source: https://support.referralhero.com/settings/custom-domain Illustrates the transformation of a default ReferralHero URL to a custom domain URL after setup. ```text https://campaign.referralhero.com/MFe021deg0f2/dashboard ``` ```text https://referral.mywebsite.com/MFe021deg0f2/dashboard ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/integrate/platform/unbounce Perform an HTTP GET request to query the documentation dynamically. The 'ask' query parameter should contain your specific question. ```http GET https://support.referralhero.com/integrate/platform/unbounce.md?ask= ``` -------------------------------- ### Querying Documentation Dynamically Source: https://support.referralhero.com/campaign-management/subscribers/unverified-subscribers To get more information not explicitly on the page, make a GET request with an 'ask' query parameter. The response will include a direct answer and relevant excerpts. ```http GET https://support.referralhero.com/campaign-management/subscribers/unverified-subscribers.md?ask= ``` -------------------------------- ### Making a GET API Call Source: https://support.referralhero.com/integrate/mobile-sdks/react-native/how-to-call-api This example demonstrates how to make a GET request to a ReferralHero API endpoint using axios, including setting the necessary headers for authentication and content type. ```APIDOC ## Making a GET API Call ### Description This example demonstrates how to make a GET request to a ReferralHero API endpoint using axios, including setting the necessary headers for authentication and content type. ### Method GET ### Endpoint `/endpoint` (relative to base URL) ### Request Headers - `Content-Type`: `application/json` - `Accept`: `application/vnd.referralhero.v1` - `Authorization`: `Your-api-token` ### Request Example ```javascript const apiUrl = 'https://app.referralhero.com/api/sdk/v1/'; const apiToken = 'Your-api-token'; axios.get(`${apiUrl}endpoint`, { headers: { 'Content-Type': 'application/json', 'Accept': 'application/vnd.referralhero.v1', 'Authorization': apiToken } }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error making API call', error); }); ``` ### Response #### Success Response (200) - `data` (object) - The response data from the API. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/integrate/mobile-sdks/mobile-app-testing-in-development-mode Perform an HTTP GET request to the current page URL with the 'ask' query parameter to retrieve specific information. The question should be clear and self-contained. This method is useful for getting direct answers, clarifications, or related documentation sections. ```HTTP GET https://support.referralhero.com/integrate/mobile-sdks/mobile-app-testing-in-development-mode.md?ask= ``` -------------------------------- ### Example JSON Response Source: https://support.referralhero.com/integrate/mobile-sdks/android-sdk/public-methods This is an example of a JSON response structure that might be received from the SDK. ```json { "calls_left": null, "timestamp": 1684403108 } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/integrate/platform/clickfunnels Perform an HTTP GET request to the current page URL with the `ask` query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://support.referralhero.com/integrate/platform/clickfunnels.md?ask= ``` -------------------------------- ### Query Documentation via GET Request Source: https://support.referralhero.com/integrate/platform/wordpress Use this GET request format to query the documentation dynamically with a specific question. This is useful for retrieving information not explicitly present on the page. ```http GET https://support.referralhero.com/integrate/platform/wordpress.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://support.referralhero.com/campaign-management/overview Perform an HTTP GET request to the current page URL with the 'ask' query parameter to get dynamic answers and relevant documentation excerpts. The question should be specific and self-contained. ```http GET https://support.referralhero.com/campaign-management/overview.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://support.referralhero.com/integrate/platform/squarespace To get more information not present on the page, make a GET request to the documentation URL with an 'ask' query parameter. The response will include answers and relevant excerpts. ```http GET https://support.referralhero.com/integrate/platform/squarespace.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/campaign-builder/integrations/cash-payouts Perform an HTTP GET request to the current page URL with the `ask` query parameter to dynamically query the documentation. The question should be specific and in natural language. ```http GET https://support.referralhero.com/campaign-builder/integrations/cash-payouts.md?ask= ``` -------------------------------- ### Get Referrer Information Source: https://support.referralhero.com/integrate/mobile-sdks/flutter-sdk/public-methods Retrieve details about a user's referrer. Ensure mobile parameters like IP address, OS type, screen size, and device type are correctly formatted as per the Getting Started guide. ```dart final query = { "email": signup_email?.text, //Optional value, capture this from user "name": signup_name?.text, //Optional value, capture this from user "ip_address": referralHeroService.deviceInfo.getIpAddress(), //Required value "os_type": referralHeroService.deviceInfo.getOperatingSystem(), //Required value "screen_size": referralHeroService.deviceInfo.getDeviceScreenSize(), //Required value "device": referralHeroService.deviceInfo.getDeviceType(), //Required value }; final referrer = await referralHeroService.getReferrer(query); ``` ```json { "status": "ok", "data": { "id": "sub_68c9ed9e2712", "name": "test one", "email": "test1@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0.0, "code": "00598133", "position": 2, "referred": false, "referred_by": {}, "people_referred": 1, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1686310876, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com", "source": null, "device": null, "referral_link": "https://app.referralhero.com?mwr=00598133", "created_at": 1686310876, "last_updated_at": 1692824465, "os_type": null, "screen_size": null, "ip_address": null, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxxx/universal_link?mwr=00598133", "status": "", "response": "subscriber_retrieved" }, "calls_left": null, "timestamp": 1692957166 } ``` -------------------------------- ### Example SDK Initialization with Specific Values (Kotlin) Source: https://support.referralhero.com/integrate/mobile-sdks/android-sdk/getting-started Demonstrates initializing the SDK with a specific API token and Campaign UUID, typically obtained from the ReferralHero dashboard. ```kotlin val rh = RH.initRHSDK(this,"MFxxxxxxxxxx", "0e5eexxxxxxxxxxxxxxxxxxxxxcead") or val rh = RH.initRHSDK(this, null, null) ``` -------------------------------- ### Get Rewards Sample Response Source: https://support.referralhero.com/integrate/mobile-sdks/android-sdk/listeners-and-interfaces Example JSON response structure for the Get Rewards API, detailing available rewards. ```json { "status": "ok", "data": { "response": "rewards_retrieved", "rewards": [ { "id": 1795, "name": "A free Premium account for 1 year", "status": "confirmed", "referrals": null, "created_at": 1686397951, "signup_type": "organic subscriber", "referrals_type": null, "recurring_count": null, "image_url": null } ], "pagination": { "total_pages": 1, "current_page": 1, "per_page": 10, "total_objects": 1 } }, "calls_left": null, "timestamp": 1687759997 } ``` -------------------------------- ### Get Leaderboard Sample Response Source: https://support.referralhero.com/integrate/mobile-sdks/android-sdk/listeners-and-interfaces Example JSON response structure for the Get Leaderboard API, detailing referral ranking data. ```json { "status": "ok", "data": { "ranking": [ { "id": "sub_7b9be1ed8ccb", "name": "Test User 10", "email": "test15@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "2c2dbefb", "position": 1, "referred": false, "referred_by": { }, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018462, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic", "source": null, "device": null, "status": "", "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic?mwr=2c2dbefb", "created_at": 1685018462, "last_updated_at": 1685020506 }, { "id": "sub_06e2af5a2236", "name": "Test User multi1", "email": "testorganic3@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "afd54225", "position": 2, "referred": false, "referred_by": { }, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018562, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxx/analytics/traffic", "source": null, "device": null, "status": "", "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxx/analytics/traffic?mwr=afd54225", "created_at": 1685018562, "last_updated_at": 1685018562 } ], "count": 2 }, "calls_left": null, "timestamp": 1685020750 } ``` -------------------------------- ### Querying Documentation Dynamically Source: https://support.referralhero.com/integrate/mobile-sdks/react-native/how-to-call-api Perform an HTTP GET request with the `ask` query parameter to retrieve specific information or clarification from the documentation. ```http GET https://support.referralhero.com/integrate/mobile-sdks/react-native/how-to-call-api.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://support.referralhero.com/campaign-management/analytics Perform an HTTP GET request to query the documentation with a specific question using the `ask` query parameter. The response includes direct answers and relevant excerpts. ```HTTP GET https://support.referralhero.com/campaign-management/analytics.md?ask= ``` -------------------------------- ### Example Response for Get My Referrals Source: https://support.referralhero.com/integrate/mobile-sdks/flutter-sdk/public-methods This is an example of the JSON response structure when successfully retrieving subscriber referrals. It includes subscriber details, referral information, and pagination data. ```javascript { "status": "ok", "data": { "response": "subscribers_retrieved", "subscribers": [ { "id": "sub_fa49ba0d30e9", "name": "Test User 10", "email": "test125@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0.0, "code": "dededb46", "position": 18, "referred": true, "referred_by": { "id": "sub_d0cc231dce89", "name": "Test name", "email": "test26@gmail.com", "code": "0879561f", "people_referred": 1, "points": 0 }, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1684985427, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic?mwr=dededb46", "created_at": 1684985427, "last_updated_at": 1684985427, "os_type": null, "screen_size": null, "ip_address": null, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxx/universal_link?mwr=dededb46", "status": "confirmed" } ], "pagination": { "total_pages": 1, "current_page": 1, "per_page": 50, "total_objects": 1 } }, "calls_left": null, "timestamp": 1692954116 } ``` -------------------------------- ### Accepted Screen Size Formats (Kotlin) Source: https://support.referralhero.com/integrate/mobile-sdks/android-sdk/public-methods Demonstrates various accepted formats for setting the screen size. Ensure your screen size is formatted correctly for the system to automatically identify referrals. ```kotlin referralParams.setScreenSize("393*852") referralParams.setScreenSize("393 x 852") referralParams.setScreenSize("393x852") referralParams.setScreenSize("393.0 x 852.0") // in case you need to hard code values ``` -------------------------------- ### Get Referrer Response - JSON Source: https://support.referralhero.com/integrate/mobile-sdks/ios-sdk/public-methods This is an example of the JSON response structure when retrieving a referrer. ```json { "status": "ok", "data": { "id": "sub_68c9ed9e2712", "name": "test one", "email": "test1@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "00598133", "position": 3, "referred": false, "referred_by": {}, "people_referred": 1, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1686310876, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com", "source": null, "device": null, "referral_link": "https://app.referralhero.com?mwr=00598133", "created_at": 1686310876, "last_updated_at": 1686311874, "response": "subscriber_retrieved" }, "calls_left": null, "timestamp": 1686554060 } ``` -------------------------------- ### Querying Documentation API Source: https://support.referralhero.com/settings/custom-domain Demonstrates how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. ```http GET https://support.referralhero.com/settings/custom-domain.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://support.referralhero.com/campaign-builder/goal Use this GET request to query the documentation with a specific question. The response will include a direct answer and relevant excerpts. ```http GET https://support.referralhero.com/campaign-builder/goal.md?ask= ``` -------------------------------- ### Get Campaign Leaderboard Response - JSON Source: https://support.referralhero.com/integrate/mobile-sdks/ios-sdk/public-methods This is an example of the JSON response structure when retrieving a campaign leaderboard. ```json { "status": "ok", "data": { "ranking": [ { "id": "sub_7b9be1ed8ccb", "name": "Test User 10", "email": "test15@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "2c2dbefb", "position": 1, "referred": false, "referred_by": {}, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018462, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic?mwr=2c2dbefb", "created_at": 1685018462, "last_updated_at": 1685020506 }, { "id": "sub_06e2af5a2236", "name": "Test User multi1", "email": "testorganic3@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "afd54225", "position": 2, "referred": false, "referred_by": {}, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018562, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic?mwr=afd54225", "created_at": 1685018562, "last_updated_at": 1685018562 } ], "count": 2 }, "calls_left": null, "timestamp": 1685020750 } ``` -------------------------------- ### Making a GET Request to ReferralHero API Source: https://support.referralhero.com/integrate/mobile-sdks/react-native/how-to-call-api This example demonstrates how to use the axios library to make a GET request to a ReferralHero API endpoint. It includes setting the base URL, API token, and required headers. Handle responses and errors appropriately. ```jsx const apiUrl = 'https://app.referralhero.com/api/sdk/v1/'; const apiToken = 'Your-api-token'; axios.get(`${apiUrl}endpoint`, { headers: { 'Content-Type': 'application/json', 'Accept': 'application/vnd.referralhero.v1', 'Authorization': apiToken } }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error making API call', error); }); ``` -------------------------------- ### Create React App Source: https://support.referralhero.com/integrate/reactjs Use this command to create a new React application. Replace 'name_of_the_app' with your desired project name. ```bash npx create-react-app name_of_the_app ``` -------------------------------- ### Get List Leaderboard Response Source: https://support.referralhero.com/integrate/rest-api/endpoints-reference Example response for retrieving a list's leaderboard. Includes status, ranking data, remaining API calls, and timestamp. ```yaml { "status": "ok", "data": { "ranking": [ { < Subscriber object > }, { < Subscriber object > }, ... ] }, "calls_left": 1000, "timestamp": 1487659347 } ``` -------------------------------- ### Get List Rewards Response Source: https://support.referralhero.com/integrate/rest-api/endpoints-reference Example response for retrieving a list of rewards from a specific list. Includes status, reward data, remaining API calls, and timestamp. ```yaml { "status": "ok", "data": [ { < Reward object > }, { < Reward object > } ], "calls_left": 1000, "timestamp": 1487659708 } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/integrate/javascript-web-api/configuration-file Use this method to ask questions about the documentation. The question should be specific and in natural language. The response will contain a direct answer and relevant excerpts. ```http GET https://support.referralhero.com/integrate/javascript-web-api/configuration-file.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/campaign-builder/rewards/group-rewards Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. The question should be specific and self-contained. Use this for information not explicitly present, clarifications, or related documentation. ```http GET https://support.referralhero.com/campaign-builder/rewards/group-rewards.md?ask= ``` -------------------------------- ### Subscriber Object Example Source: https://support.referralhero.com/integrate/rest-api/objects An example of the Subscriber object structure. ```APIDOC ## Subscriber Object Example An example of the Subscriber object structure. ```yaml { "id": "sub_2bad325a25d7", "name": "John Doe", "email": "john.doe@gmail.com", "phone_number": "+1228374652", "crypto_wallet_address": "tb1qxyzxy", "crypto_wallet_provider": "Coinbase", "other_identifier_value": "", "extra_field": "Signup", "extra_field_2": "USA", "extra_field_3": "Item3", "extra_field_4": "Item4", "option_field": "Are you invited?", "conversion_amount": 1.0, "code": "c4fb914e", "position": 174, "referred": true, "referred_by": { "id": "sub_8a5b8df578c6", "name": "Nishchay", "email": "test123@gmail.com", "code": "1b52f1e0", "people_referred": 2, "points": 1 }, "visitors": 8, "pending_referrals": 3, "unconfirmed_referrals": 2, "people_referred": 2, "level_2_confirmed_referrals": 2, "level_3_confirmed_referrals": 2, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1738954543, "points": 1, "risk_level": 3, "host": "https://app.referralhero.com/MFxxxxxxxxxx/signup", "source": "Admin", "device": "Mobile", "referral_link": "https://app.referralhero.com/MFxxxxxxxxx/signup?mwr=c4fb914e", "referral_status": "Payment Pending", "referral_status_at": 1738954543, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxxx/universal_link?mwr=c4fb914e", "stripe_customer_id": "cus_TEST123456789", "tags": ["tag1", "tag2"], "created_at": 1738954543, "last_updated_at": 1738954701 } ``` ``` -------------------------------- ### Query Documentation via GET Request Source: https://support.referralhero.com/integrate/platform/shopify To get additional information not directly on the page, make a GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://support.referralhero.com/integrate/platform/shopify.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://support.referralhero.com/integrate/mobile-sdks/ios-sdk/getting-started Perform an HTTP GET request to the documentation URL with an 'ask' query parameter to retrieve specific information or clarifications. ```http GET https://support.referralhero.com/integrate/mobile-sdks/ios-sdk/getting-started.md?ask= ``` -------------------------------- ### Perform HTTP GET Request with 'ask' Parameter Source: https://support.referralhero.com/campaign-builder Use this method to query the documentation dynamically. The question should be specific and self-contained. The response will include a direct answer and relevant excerpts. ```http GET https://support.referralhero.com/campaign-builder.md?ask= ``` -------------------------------- ### Initialize ReferralHero SDK Source: https://support.referralhero.com/integrate/mobile-sdks/react-native/public-methods Initialize the ReferralHero SDK with your API key. This must be done before calling any other SDK methods. ```javascript import ReferralHero from '@referralhero/react-native-sdk'; ReferralHero.initialize('YOUR_API_KEY'); ``` -------------------------------- ### Example Leaderboard Response Source: https://support.referralhero.com/integrate/mobile-sdks/flutter-sdk/public-methods An example of the JSON response structure when retrieving a campaign leaderboard. ```javascript { "status": "ok", "data": { "ranking": [ { "id": "sub_7b9be1ed8ccb", "name": "Test name new", "email": "test102@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0.0, "code": "2c2dbefb", "position": 11, "referred": false, "referred_by": {}, "people_referred": 3, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018462, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic?mwr=2c2dbefb", "created_at": 1685018462, "last_updated_at": 1686575826, "os_type": null, "screen_size": null, "ip_address": null, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxx/universal_link?mwr=2c2dbefb", "status": "" }, { "id": "sub_7797d0ec272e", "name": "", "email": "test786@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0.0, "code": "9f234785", "position": 11, "referred": false, "referred_by": {}, "people_referred": 2, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1686814646, "points": 0, "risk_level": 0, "host": "http://localhost:3000/legf4edsitimate", "source": null, "device": null, "referral_link": "http://localhost:3000/legf4edsitimate?mwr=9f234785", "created_at": 1686814646, "last_updated_at": 1686815029, "os_type": null, "screen_size": null, "ip_address": null, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxx/universal_link?mwr=9f234785", "status": "" }, { "id": "sub_06e2af5a2236", "name": "Test User multi1", "email": "testorganic3@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0.0, "code": "afd54225", "position": 11, "referred": false, "referred_by": {}, "people_referred": 1, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685018562, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic?mwr=afd54225", "created_at": 1685018562, "last_updated_at": 1686138321, "os_type": null, "screen_size": null, "ip_address": null, "universal_link": "https://app.referralhero.com/MFxxxxxxxxxx/universal_link?mwr=afd54225", "status": "" }, { "id": "sub_41adff0cfc8e", "name": "Test organic User1", "email": "testorganic1@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://support.referralhero.com/integrate/rest-api/objects To get additional information not directly on the page, perform an HTTP GET request to the current page URL with the `ask` query parameter. The question should be specific and in natural language. ```http GET https://support.referralhero.com/integrate/rest-api/objects.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://support.referralhero.com/campaign-management/subscribers Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. Use this when the answer is not explicitly present, for clarification, or to retrieve related documentation sections. ```HTTP GET https://support.referralhero.com/campaign-management/subscribers.md?ask= ``` -------------------------------- ### Add Pending Referral Request Example Source: https://support.referralhero.com/integrate/mobile-sdks/react-native/public-methods This example demonstrates how to make a POST request to the pending_referral endpoint to create a referral that is in the first step of a multi-step conversion funnel. Ensure your campaign goal is set to track two or three conversion events for this logic to function correctly. ```javascript var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); myHeaders.append("Accept", "application/vnd.referralhero.v1"); myHeaders.append("Authorization", "xxxxxxxxxxxxxxxxxx"); var raw = JSON.stringify({ "name": "Pending Referral", "os_type": "IOS", "visitor_id": "sub_***********", "device": "IOS", "email": "testpending1@email.com", "Phone_nubmer": "", "Cryoto_wallet_address": "", "referrer": "8f01d5db", "hosting_url": "https://app.referralhero.com" }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("https://app.referralhero.com/api/sdk/v1/lists/:uuid/subscribers/pending_referral", requestOptions) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.log('error', error)); ``` -------------------------------- ### Example Response for Organic Referral Tracking Source: https://support.referralhero.com/integrate/mobile-sdks/flutter-sdk/public-methods This is an example of the JSON response received after successfully tracking an organic referral. ```javascript { "status": "ok", "data": { "id": "sub_41adff0cfc8e", "name": "Test organic User1", "email": "testorganic1@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "23e0fb1c", "position": 5, "referred": true, "referred_by": { "id": "sub_7b9be1ed8ccb", "name": "Test User 10", "email": "test15@gmail.com", "code": "2c2dbefb", "people_referred": 0, "points": 0 }, "people_referred": 0, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1685020506, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxxx/analytics/traffic", "source": null, "device": null, "referral_link": "https://app.referralhero.com/dashboard/lists/MFxxxxxxxxx/analytics/traffic?mwr=23e0fb1c", "created_at": 1685020506, "last_updated_at": 1685020506, "os_type": null, "screen_size": null, "ip_address": null, "response": "subscriber_created" }, "calls_left": null, "timestamp": 1685020506 } ``` -------------------------------- ### Get Referrer Source: https://support.referralhero.com/integrate/mobile-sdks/ios-sdk/public-methods Retrieves referrer information by calling the `RH.GetReferrer()` method. This method is used to get details about a specific referrer. ```APIDOC ## Get Referrer ### Description This method is used for retrieving referrer information. It will get the referrer from the Campaign specified in the Appdelegate.swift file. ### Method `RH.GetReferrer()` ### Parameters This method does not take any input parameters. ### Response Example ```json { "status": "ok", "data": { "id": "sub_68c9ed9e2712", "name": "test one", "email": "test1@gmail.com", "phone_number": "", "crypto_wallet_address": "", "crypto_wallet_provider": "", "extra_field": "", "extra_field_2": "", "option_field": "", "conversion_amount": 0, "code": "00598133", "position": 3, "referred": false, "referred_by": {}, "people_referred": 1, "promoted": false, "promoted_at": null, "verified": true, "verified_at": 1686310876, "points": 0, "risk_level": 0, "host": "https://app.referralhero.com", "source": null, "device": null, "referral_link": "https://app.referralhero.com?mwr=00598133", "created_at": 1686310876, "last_updated_at": 1686311874, "response": "subscriber_retrieved" }, "calls_left": null, "timestamp": 1686554060 } ``` ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://support.referralhero.com/integrate/platform/google-tag-manager Use this mechanism to query the documentation dynamically. Perform an HTTP GET request with the 'ask' query parameter for specific questions. ```http GET https://support.referralhero.com/integrate/platform/google-tag-manager.md?ask= ```