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 email@example.com.
All calls to Referral Rock's API require SSL. Ensure all requests are pointed to https://api.referralrock.com and not http://api.referralrock.com or your request will fail with a 404 error.
Referral Rock API requests are rate limited to prevent excessive requests. If you are hitting the rate limit or need your limit increased please reach out to Referral Rock's support team.
The Referral Rock API uses Basic Authentication using the credentials of your API Keys. 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.
Navigate to your API Keys page on Referral Rock. Then click on "Basic Auth Key" button on the Actions column next to your API Key. That's it!
Retrieve your Basic Auth Key directly from the API page on the Admin dashboard by clicking the "Basic Auth Key" button on the Actions column next to your API Key.
If your API Public Key was "abc123" and your API Private Key was "xyz456", this string would be:
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:
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.
GET /api/programs?offset=0&count=30 HTTP/1.1 Host: api.referralrock.com Authorization: Basic Y29udGFjdEByZWZlcnJhbHJvY2suY29tOklMdXZSM2ZlcnJhbHoh