Does list segment endpoint contain page object?

#1

Hi,

Will following endpoint https://developers.intercom.com/intercom-api-reference/reference#list-segments contain page object in response ? The sample response in the docs doesn’t say so and while testing it in postman, I didn’t find the page object either.

Even if I send the per_page parameter to really small value like 2 or 3, it doesn’t include page object (I have 4 segments under my account)

Thanks,
Ankur

0 Likes

#2

Hey Ankur,
The List Segment endpoint should only return a pages object if there are extra pages to fetch. When you include the per_page parameter, does this successfully limit the number of segments in the response?

0 Likes

#3

Hey Jack,

unfortunately it doesn’t limit the number of segments when including per_page parameter

0 Likes

#4

Gotcha, cheers for confirming that. This is the expected behaviour for now but I’d love to know what you’re hoping to do here? Is there a specific reason you wanted to page through your segments?

0 Likes

#5

I was testing the API and wanted to check on how to handle the scenario when there are more than 50 segments (since 50 is the default limit). So I was testing with smaller per_page number and see how the output looks like.

So is it safe to assume that when there are more than 50 segments, page object will be returned ?

0 Likes

#6

You got it! :+1:t5: It’ll be there.

1 Like