The article provides instructions for retrieving guest data from an organisation's marketing system using a GET request to the URL "https://global.stampede.ai/v1/guests". Authentication requires a Bearer token, and the data can be paginated using a "cursor" query parameter. The response includes guest details such as ID, organisation ID, profile information, and opt-in dates for data, SMS, and email. Pagination is managed through "links" in the response, allowing navigation through pages of 25 records each. Examples illustrate how to use these links to access subsequent or previous pages of data.
Guests are where all the marketing data for the organisation lives. With this request, you will be able to list out all guests in the system that belong to the organisation you are authorised to access
Request
Method: GET
URL: https://global.stampede.ai/v1/guests
Auth: Bearer token
The following values may be sent as query parameters.
Name | Type | Required | Description |
---|---|---|---|
cursor | String | No | Used for pagination, see the example below |
Response
{ data: { id: string; organization_id: string; profile_id: number; last_interacted_at: string; created_at: string; data_opt_in_at: string; sms_opt_in_at: string; email_opt_in_at: string; user_profile: { email: string; first: string; id: number; phone: string; last: string; }; organization_profile_tags: { id: string; organization_registration_id: string; tag_id: string; }[]; }[]; links: { first: string | null; last: string | null; next: string | null; prev: string | null; }; }
Examples
To retrieve all guests in one response:
https://global.stampede.ai/v1/guests
Paging through results
If you wish to page through results then this can be done by sending the links value as a variable for the name cursor. Guests are displayed 25 records per page. You will receive a links result at the bottom of the data response like so:
"links": { "first": null, "last": null, "next": "c25502f3-xxxx-xxxx-a736-27be8f5d46e5", "prev": null }
To obtain the next page of results you would then send the value returned for the next string e.g.
https://global.stampede.ai/v1/guests?cursor=c25502f3-xxxx-xxxx-a736-27be8f5d46e5
This will then return the next page of 25 results. The same principle can be used for the previous page.
Comments
0 comments
Please sign in to leave a comment.