Skip to main content

How it works

The two list endpoints return one page at a time:
  • GET /offers
  • GET /offers/{id}/events
Each list response contains next_cursor:
If next_cursor is not null, there is another page. Pass the value as the cursor query parameter to get it. On the last page next_cursor is null. A list without items returns "data": [] and "next_cursor": null. The cursor is an opaque string. Pass it back unchanged and do not build or edit it. Use a cursor only with the list it came from. A cursor that the API cannot read returns 400.

Parameters

integer
Page size. A whole number from 1 to 100 for offers and from 1 to 200 for events.
string
The next_cursor of the previous page. 1 to 512 characters.
limit takes digits only (up to four). Values such as 0, -1, 1e2 or abc return 400 with "param": "limit". A value above the maximum also returns 400. The API does not reduce it to the maximum. Unknown query parameters are ignored. If you send a parameter twice, the first value is used.

Ordering

Filters

GET /offers accepts one filter:
string
Only offers with this status. One of draft, sent, accepted, declined, expired, withdrawn.
The filter uses the same value as the status field of an offer. A sent offer whose expires_at has passed has the status expired, so status=sent does not return it. Send the same status on every page of a walk. GET /offers/{id}/events has no filter. An unknown status value returns 400 with "param": "status".

Invalid cursor

A cursor that the API cannot read, an empty cursor and a cursor longer than 512 characters return 400:

Walk through all pages

This script reads every offer with the status sent, 100 per page. It needs jq.
For events, use /offers/{id}/events and the parameters limit and cursor in the same way. Each request counts against your rate limits.