Is there a way to see the referral partners/affiliates attached to a contact via REST API?

Good day all, I have a few questions regarding the REST api feature. Were currently building a web application that connects to keap accounts. I have a question regarding referral partners (or affiliates?).

Is there any REST API endpoint or field that allows us to retrieve/see the referral partner(s) associated/attatched to a contacts? image below:

the /referral endpoint only contains a POST request to create a referral to a user and thats it. The List Contacts endpoint also does not have any ‘affiliates’ field or sorts.

I read in the forums, The legacy XML-RPC API, it was possible to see this data, but we haven’t been able to find an equivalent in the REST API. We just started working with Keap today and as I believe, The XML api is already gonna be sunset this year and the Key generation is already disabled.

We’d like to know if does this functionality currently exists in the REST API? or if there are any recommended workarounds for tracking referral partners programmatically via REST.

Hi @Millenne_Noel, this is not currently available via REST, but the team is looking into it. I’ll provide an update as soon as I have more information.

1 Like

We have customers as well that this is critical for

1 Like

Thanks for confirming, @OmarAlmonte, appreciate the clarification.

Just to confirm for planning purposes. for now, is the expectation that New developers integrating via REST will just have to wait for this functionality to be added/until it’s available?

@Millenne_Noel Yes, that is correct. For this particular gap, the team has decided to implement the functionality, and it will become available. I’ll let you know once it’s released.

@OmarAlmonte We should be able to set a refferal on a contact via the api. Right now it can only be done via XML. A must have for rest.

@Rick_Nielsen Thanks for reporting this. I’ll bring it up internally with the team and get back to you once I have more details or an update.

Hi @Rick_Nielsen, quick update on this. We do have a REST endpoint that allows creating referrals.

You can use:
https://developer.infusionsoft.com/docs/restv2/#tag/Referral/operation/createReferralUsingPOST

In this endpoint, referral_partner_id is the same as affiliate_id.

This should let you set the referral via REST v2 instead of XMLRPC. Let me know if you run into any issues with it and I’m happy to help.

Hi @Millenne_Noel @David_Bullock @Rick_Nielsen,

A new endpoint is now available in v2:

GET /affiliates/{id}/referrals

This endpoint allows you to retrieve all referrals for a given affiliate. The documentation hasn’t been updated yet, but we’ll share it soon. In the meantime, here’s an example using curl:

curl -X GET "https://api.infusionsoft.com/crm/rest/v2/affiliates/123/referrals" \
  -H "Authorization: Bearer <redacted>" \
  -H "Content-Type: application/json"

We’ve also added a new filter to GET /v2/affiliates: referral_contact_id, which returns a list of all affiliates who referred a given contact.

Thank you for your patience, and please let us know if you have any questions.

@Pav Thought you might be interested.