# REST Retrieve Contact Referral Records

**URL:** <https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896>\
**Category:** API Q&A\
**Created:** [January 15, 2026, 8:12pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896 "2026-01-15T20:12:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_Stoker](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Todd\_Stoker](https://integration.keap.com/u/Todd_Stoker)\
**Post date:** [January 15, 2026, 8:12pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/1 "2026-01-15T20:12:37Z")

</div>

Using XML’s DataService we can query the Referral table for referrals belonging to a contact. This can be used to identify the Affiliate that referred a given contact.

The REST API exposes a way to create Referrals, but I don’t see a way to list referrals for a given contact.

Is there a way to identify the affiliate (if there is one) for a given contact with REST?

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [January 15, 2026, 8:28pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/2 "2026-01-15T20:28:50Z")

</div>

Hi Todd,

In REST API v2, this functionality isn’t implemented yet. It’s one of the gaps we identified thanks to the GitHub repo you set up, and the team is looking into it.

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [February 6, 2026, 8:10pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/3 "2026-02-06T20:10:35Z")

</div>

Hi @Todd_Stoker and @Timothy_Withers,

A new endpoint is now available in v2:

```auto
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`:

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

```

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

---

<div class="post-metadata">

**Author:** ![Todd\_Stoker](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Todd\_Stoker](https://integration.keap.com/u/Todd_Stoker)\
**Post date:** [February 6, 2026, 8:30pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/4 "2026-02-06T20:30:37Z")

</div>

@OmarAlmonte This is great, and useful in other places for us, but the query we’re reaching for is to list the referral/s for a given contact. We’d like to answer the question “who referred this contact”.

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [February 9, 2026, 1:51pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/5 "2026-02-09T13:51:18Z")

</div>

@Todd_Stoker Got it, thanks for the clarification. I’ll add this gap to the tracker.

---

<div class="post-metadata">

**Author:** ![Mark\_Joseph](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/mark_joseph/32/14946_2.png) [@Mark\_Joseph](https://integration.keap.com/u/Mark_Joseph)\
**Post date:** [February 11, 2026, 7:18am UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/6 "2026-02-11T07:18:18Z")

</div>

Hi @OmarAlmonte and team,

I am following up on this thread.

Thanks for adding GET /v2/affiliates/{id}/referrals - that’s helpful for affiliate-side reporting!

Likewise, we also need the reverse lookup: given a contact\_id, find which affiliate(s) referred them. This is crucial for commission attribution in InfusedWoo and many other integrations.

Current workaround requires XML-RPC dsFind(‘Referral’, …, ‘ContactId’, contactId) which we’re trying to fully migrate away from.

Would it be possible to add either:

- GET /v2/referrals?filter=contact\_id=={id}, or
- GET /v2/contacts/{id}/referrals

This would complete the REST v2 migration path for affiliate tracking.

Thanks for considering!

Mark

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [February 11, 2026, 1:22pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/7 "2026-02-11T13:22:46Z")

</div>

Hi @Mark_Joseph, thanks for the feedback! I’ve added this to the [known issues tracker](https://thryv.sharepoint.com/:x:/t/KeapGryffindor/IQDVNiI3rp3bTJDw0sP8qVB5ASDfArlNJJ6CFEMgLIhGw8s). I’ll keep you posted and share an update as soon as we have more information.

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [February 16, 2026, 3:47pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/8 "2026-02-16T15:47:53Z")

</div>

Hi @Todd_Stoker, @Timothy_Withers, and @Mark_Joseph. We’ve added a new filter to GET /v2/affiliates to help answer the “who referred this contact” use case directly in REST v2:

**`referral_contact_id`** – returns a list of all affiliates who referred the given contact.

Example:

```auto
GET /v2/affiliates?filter=referral_contact_id==12345

```

The documentation hasn’t been updated yet, but you can start using this filter now.

---

<div class="post-metadata">

**Author:** ![Mark\_Joseph](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/mark_joseph/32/14946_2.png) [@Mark\_Joseph](https://integration.keap.com/u/Mark_Joseph)\
**Post date:** [February 18, 2026, 12:54am UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/9 "2026-02-18T00:54:15Z")

</div>

@OmarAlmonte

I just tested `GET /v2/affiliates?filter=referral_contact_id==19` against our sandbox and it’s currently returning **400 — “Invalid filter field: referral\_contact\_id”**.

The same contacts return correct referral data via XML-RPC `dsFind('Referral', 'ContactId')`, so the data is there — it looks like the filter just hasn’t been deployed yet.

For context, our use case is: given a contact ID, find which affiliate referred them so we can attach the affiliate to the order. The XML-RPC pattern is `dsFind('Referral', 1000, 0, 'ContactId', $contactId, ['AffiliateId'])` — the new `referral_contact_id` filter on `/v2/affiliates` would be a perfect replacement.

---

<div class="post-metadata">

**Author:** ![OmarAlmonte](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/omaralmonte/32/15105_2.png) [@OmarAlmonte](https://integration.keap.com/u/OmarAlmonte)\
**Post date:** [February 18, 2026, 4:04pm UTC](https://integration.keap.com/t/rest-retrieve-contact-referral-records/93896/10 "2026-02-18T16:04:30Z")

</div>

@Mark_Joseph,

That new filter should cover your use case perfectly, it’s designed exactly for “given a contact ID, find which affiliate(s) referred them.”

I’m not certain why it’s returning 400 in your sandbox, but here’s an example `cURL` you can use to see the affiliate(s) that referred the contact ID sent in the `referral_contact_id` query param:

```auto
curl -X GET "https://api.infusionsoft.com/crm/rest/v2/affiliates?filter=referral_contact_id==4109" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

```

Just replace `YOUR_ACCESS_TOKEN` with a valid token, see if that works, and let me know.
