Skip to main content
All CollectionsManaging Your ProgramAdvanced Use
Building a "Track My Invitations" Dashboard
Building a "Track My Invitations" Dashboard
Britain Southwick avatar
Written by Britain Southwick
Updated over a week ago

⚠️️ This feature is reserved for Enterprise level accounts.  If this is something you're interested in building, please contact us for more information.

Using Friendbuy’s API, you can build a dashboard for customers to track their invitations. This allows customers (Advocates) to see who they've invited and whether those Friends have completed a referral purchase.

In the following example, Dollar Shave Club takes advantage of our API to create a seamless dashboard within their customers' account page.

Here are the high level steps necessary to build your dashboard

  1. Get the necessary access to data

  2. Determine your customer’s Friendbuy ID

  3. Query Friendbuy for the customer’s invited Friends

  4. Query your system for Friends’ membership status

  5. Display invited Friends’ membership statuses

Before you get started with this guide, make sure you have access to Friendbuy’s REST API.

Step 1 - Get access to Friendbuy’s data

Contact your Friendbuy Account Manager to get access to recipient email addresses (the email addresses of the Friends who were invited by the Advocate).

Step 2 - Determine your customer’s Friendbuy ID

In order to fetch your customer's invitation activity data, you must first know their Friendbuy ID. We recommend you store this identifier as soon as you first receive it through Friendbuy APIs or Webhooks, alongside other data you store about your customers.

You may also query Friendbuy at any time for your customer's Friendbuy ID by calling the Customers endpoint with your system’s Customer ID or email address.

  • GET /customers?account_id=<Customer-ID>  or GET /customers?email=<customer-email>
    Don't forget to url encode your query string parameters!

  • Use the id value provided in the JSON response as the Friendbuy ID  in future API calls.

Step 3 - Query Friendbuy for the customer’s invited friends

Friendbuy provides a summary of your customer's email invitations via the Customers Recipients resource.

  • GET /customers/<Friendbuy-ID>/email-recipients

  • The response has the form:

[{
      "email": "referred.friend1@example.com",
      "invitation_dates": [
        "2016-03-22T22:15:06.207947",
        "2016-03-28T22:15:06.207947"
] },
  {
      "email": "referred.friend2@example.com",
      "invitation_dates": [
        "2016-03-23T06:49:18.490487"
] }]

Note that the invitation_dates list all times at which a specific email address has been referred by the customer.

Displaying the invitation date as illustrated in the example above is a matter of preference. Many clients choose to omit this field.

Step 4 - Query your system for friends’ membership status

To determine the membership status of each invited friend, first query your system for friends' membership status. You'll then need to cross-reference the invited email addresses in Friendbuy's Recipients response with your system's customer data.

Step 5 - Display friends' invitation status

Friends' invitation status is determined by the following:

  • If the owner of the email address is a customer attributable to the advocate, then “Invited, Joined”

  • If the owner of the email address is a customer but not attributable to the advocate, then “Already a customer”

  • If the email address does not belong to an existing customer, then “Invited, Not yet joined”


Now that you've gathered all the necessary data via our API and your system, you can start designing your "Track My Invitations" dashboard.

Did this answer your question?