Affiliate_redirects API

I’m hitting the [/affiliates/redirectlinks] API and was hoping to retrieve a list of ALL affiliate API redirects. According to the docs, the affiliate_id is optional, so I expected a return of all redirects. It seems to only respond with 931 results. Any ideas on how to get ALL redirects in a response?

“count”: 931,
“next”: "https://api.infusionsoft.com/crm/rest/v1/affiliates/redirectlinks?limit=931&offset=1000&order=id&order_direction=ascending

“count”: 931,
“next”: "https://api.infusionsoft.com/crm/rest/v1/affiliates/redirectlinks?limit=931&offset=1000&order=id&order_direction=ascending

“count”: 931,
“next”: "https://api.infusionsoft.com/crm/rest/v1/affiliates/redirectlinks?limit=931&offset=1000&order=id&order_direction=ascending

Thanks!

You are receiving 931 due to the limit path parameter in the url being set to 931.

There is a max limit of up to 1000 results at a time. Utilizing the path parameters called limit and offset are how you page through all your results.

First 1000 results: /redirectlinks?limit=1000
Second 1000 results: /redirectlinks?limit=1000&offset=1000
Third 1000 results /redirectlinks?limit=1000&offset=2000

@JustinGourley Thanks! But the issue happens with adding a limit of 1000 as well. We have 90k+ redirects but when I apply a 1000 limit, it still spits out 931 results for the affiliates/redirect endpoint. I think it might be a bug.

I’m also noticing via the /affiliates endpoint - when you get to the last result - the api continues to send a ‘next’ url which is strange. I’ve tested the /orders endpoint and the logic there works just fine. Hoping you can double check the. affiliates, and affiliates/redirects endpoints and QA this. (It would be great to have a date range for the redirects api as well)

Anyways, would love to work with this data more but having trouble with the api.

Thanks!

@JustinGourley Do you have any thoughts on this? Thanks :slight_smile:

Hey @Rick_Nielsen ,

Do you mind DMing me your application name so we can take a look at the data on your app for troubleshooting? Also, if you can populate the URL below with your app name and navigate to it, it grants our tech support crew access into your data. I will work alongside them and should be able to get to the bottom of this

https://[appname].infusionsoft.com/app/stealth/supportAccess

Thank you!

Justin

This makes me believe you are looking for the data around the use (a customers click) of a redirect. This endpoint does not do that, but provides you the redirects that you have made available to your affiliates.

For example:
Let’s say I configure 2 different URLs that affiliates may send people to. One for my main web page and one for a special offer page. I might have 1500 different affiliates, and each of the 2 various links can be clicked by tens of thousands of prospects. This endpoint will always return a max result of 2. The 2 different redirects you have made available to said affiliates.

Ok, thanks. This makes sense then. @JustinGourley is there a way to pass the affiliateId to the redirected URL? I’m trying to get data on affiliate redirects as its good data to keep track of but having a hard time automating this. Any ideas? It would be great if we could somehow get the affiliateId or code passed to the landing page URL so we can grab it. For instance “Adds the referring partner’s ID number as a parameter in the URL” via this doc: Track referral activity via the API | Max Classic but we’d like to continue using the infusionsoft redirect links.

Thanks!

Within your application, modify the tracking links so that instead of going directly to your site, e.g. http://www.example.com, they go to the URL mentioned in the doc you linked. https://appName.infusionsoft.com/aff.html?to=http://www.example.com

The order of events that occurs when someone hits a redirect will now be:

Note the redirects occur so quickly its not typically noticeable that a second redirect has occurred.