Pagination
List endpoints return a stable list envelope and paginate with an opaque cursor:
{ "object": "list", "data": [ /* … items … */ ], "has_more": true, "next_cursor": "eyJwayI6…"}Fetching the next page
Section titled “Fetching the next page”Pass limit (page size) and starting_after (the previous page’s next_cursor):
curl "https://api.sandbox.interglobe.io/v1/esims?limit=50" \ -H "Authorization: Bearer $IG_KEY"
# next pagecurl "https://api.sandbox.interglobe.io/v1/esims?limit=50&starting_after=eyJwayI6…" \ -H "Authorization: Bearer $IG_KEY"Stop when has_more is false. Cursors are opaque — don’t parse them; just pass the last next_cursor
straight back.
In the SDK
Section titled “In the SDK”let cursor: string | undefined;do { const page = await ig.esims.list({ limit: 50, starting_after: cursor }); for (const esim of page.data) { // … } cursor = page.has_more ? page.next_cursor : undefined;} while (cursor);