Referral Rock API


Reference »   Web Hooks »   Run in Postman » Zapier » About Referral Rock »

Introduction

The Referral Rock API provides programmatic access to the data within your account. Using the api, previously created referral programs created can be retrieved for internal use or integrating into other systems. Members of a program can be added and listed. The referrals of members can be added, listed, and update. We also provide a web hook api. This is used as the basis of our Zapier app, but can be used by your systems to receive updates of when events occur within your account. If you need help, please contact us at support@referralrock.com.

Authentication

The Referral Rock API uses Basic Authentication using the credentials of your API Keys or your Referral Rock user account. With each request made, you will need to include an Authorization header. Here is how you to create the value for the Authorization Header. Create a string that follows this format.

Option 1: Using your Referral Rock API Key

Sample:
Basic apiPublicKey:apiPrivateKey

If your API Public Key was "abc123" and your API Private Key was "xyz456", this string would be:

Sample:
Basic abc123:zyx456

Now we’ll need to Base64 Encode the apiPublicKey:apiPrivateKey portion of the string. Most programming languages have functionality to take care of this for you. If not, there are tools online like this one. Use our example API keys we’d end up with the following encoded string:

Sample:
Basic YWJjMTIzOnp5eDQ1Ng==

Option 2: Using your Referral Rock User Account

Sample:
Basic userName:password

If your account were contact@referralrock.com and your password were ILuvR3ferralz!, this string would be:

Sample:
Basic contact@referralrock.com:ILuvR3ferralz!

Now we’ll need to Base64 Encode the userName:password portion of the string. Most programming languages have functionality to take care of this for you. If not, there are tools online like this one. Use our example account (contact@referralrock.com), we’d end up with the following encoded string:

Sample:
Basic Y29udGFjdEByZWZlcnJhbHJvY2suY29tOklMdXZSM2ZlcnJhbHoh

Making Calls

The Reference page lists all available endpoints within the Referral Rock API, as well as documentation on usage and data.

Now let’s put this all together and make our first call. Using a tool like postman, here is what a call to the programs endpoint looks like.

Sample:
GET /api/programs?offset=0&count=30 HTTP/1.1
Host: api.referralrock.com
Authorization: Basic Y29udGFjdEByZWZlcnJhbHJvY2suY29tOklMdXZSM2ZlcnJhbHoh