Facebook Pixel
Fit'DistanceDocumentation
Open the app
On this page

Connect Make

Read your students in Make with the HTTP Make a request module, split them with an Iterator and read the next page with a second module.

You will read your students in a Make scenario with the HTTP module, then split them with an Iterator to handle one student at a time.

You need a key that can read students, with Students › Read (students:read) ticked. If you do not have one, create it in the app, under Settings › Integrations › API keys: it is shown only once.

1. Set up the Make a request module

Add the HTTP › Make a request module to your scenario and fill in:

FieldValue
URLhttps://api.fitdistance.io/api/partner/v1/students
MethodGET
HeadersAuthorization: Bearer fd_live_xxxxxxxx
Query parameterslimit: 50
Parse responseYes

Make offers two versions of this module: this page follows version 4, and the old one, "HTTP (legacy)" or version 3, names some fields differently, such as Query String for Query parameters.

For Headers, add a header named Authorization whose value is Bearer fd_live_xxxxxxxx. Replace fd_live_xxxxxxxx with your key, keeping the word Bearer, a space, then your whole key. For Query parameters, add a parameter named limit with the value 50.

Set Parse response to Yes: without it, Make hands you the response as one block of text, and you cannot pick data afterwards. The key is written in the module: do not share this scenario with anyone who must not see it.

2. Run the scenario once

Run the scenario once, then open the result of the module. It needs the scope students:read and costs one credit, debited before the call. It has three fields to know:

  • data: the students of this page, 50 at most.
  • has_more: true when more pages remain.
  • next_cursor: the marker of the next page, which you pass as cursor.

A 401 UNAUTHORIZED means the key is missing, copied wrongly or revoked: check the word Bearer. A 403 SCOPE_MISSING means a scope is missing, and details.scope names it. Neither costs a credit. A refused parameter, such as limit=500, gives a 400 VALIDATION and costs a credit.

3. Split the students with an Iterator

Add an Iterator module after the first. In its list field, pick data, the list from the response of the HTTP module. Make then runs the rest of the scenario once per student, with its fields, such as id, first_name and last_name.

4. Read the next page

An HTTP module reads one page. A page costs one credit, whatever its number of students. When has_more is true, a second module reads the rest.

Add a Router after the first module: one branch keeps the Iterator from step 3. On the other branch, set a filter that only lets through the cases where has_more is true, then add a second HTTP › Make a request module, set up like the first with one more parameter:

FieldValue
URLhttps://api.fitdistance.io/api/partner/v1/students
MethodGET
HeadersAuthorization: Bearer fd_live_xxxxxxxx
Query parameterslimit: 50, cursor: the next_cursor of the first module
Parse responseYes

End this branch with a second Iterator on the data of this module. If you add a filter such as since, keep it identical from one module to the next: the marker only holds with the same filters. To spend less, set limit to 200, the maximum, in both HTTP modules. Each extra page is one more module. To read every page without counting them, the loop in n8n or a script is more direct.

Your key accepts 10 calls per second and 300 per minute. A 429 carries Retry-After, the number of seconds to wait, and costs nothing.

What next

For a complete automation, work through a use case: an email for each new student, a reminder for students without a check-in, a reminder for inactive students or another use case from the home page. The use cases that write say so at the top of the page: their key must be able to write. The student fields are described in the reference.

Next pageConnect ZapierRead one page of your students in a zap with Webhooks by Zapier and a custom request, your key in the Authorization header.