Referrals 2.0 Using the Referrals API
You can use the Referrals API to create referrals and award points for a referral, even if the event occurs somewhere outside of Influitive. For instance, for a purchase made on your e-commerce website, a sign-up action on your site, or even an offline transaction!
Using our API
We have a JSON REST API that can be used to fetch, create and advance referrals. Our full API documentation for referrals can be found here.
To set up your account for access to the Influitive API, consult this document. It will also show you how to get your X_ORG_ID and Authorization Token to use on API calls.
You can use services like Zapier or Postman to create API calls, or work with a developer as well.
A sample call to create a Referral might look like this:
POST /referrals HTTP/1.1 Host: api.influitive.com Content-Type: application/json Accept: application/json Authorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30 X_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3 {"referral": {"prospect":{ "first_name":"Some", "last_name":"Prospect", "email":"some@prospect.com", "title":"CMO" }, "contact":{ "first_name":"Johnny", "last_name":"Advocate", "email":"johnny@advocate.com" }, "campaign_id":"98160557-5a70-4306-949e-ee8d2ea7f4b4"} }<br>
Create a Referral
This allows you to create a referral in the system, at whatever milestone you would like.
Create Referral API Specification
Input: The name/email of the referral, and the name/e-mail of the person being referred
Output: A confirmation of the referral, including the referral ID
Creating a Referral via an E-Commerce System
Sometimes you may want to create a referral in Influitive every time a purchase is made on an e-commerce site. Influitive will add unique parameters to the landing page you specified in your referral campaign called a share_token and campaign_id. These can be used to make an API call back to AdvocateHub to close the loop on the referral process.
For more details on creating a referral via an E-Commerce System look at our full article on this topic:
Referrals 2.0: Using E-commerce/B2C Referrals
A sample call to create a Referral via a share token might look like this:
POST /referrals HTTP/1.1 Host: api.influitive.com Content-Type: application/json Accept: application/json Authorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30 X_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3 { "referral": { "prospect": { "first_name":"Tom", "last_name":"Jones", "email":"some@prospect.com" }, "contact": { "share_token": "hhh4ca59-50f8-42dd-91d9-eff7fa4565b0" }, "campaign_id":"98160557-5a70-4306-949e-ee8d2ea7f4b4", "status": "won" } }
Advance a referral
This allows you to advance an existing referral in the system, to a further milestone.
Advance a Referral API Specification
Returning a list of Referrals
This allows you to return a list of all referrals across all campaign in the system, including the person who referred them and the milestone reach.
List Referrals API Specification
Returning a specific Referral
Given as input a specific referral ID, return the current milestone, the information on who the referral was and who referred them.