To access a list of venues using a bearer token, send a GET request to `https://global.stampede.ai/v1/venues`. The venues visible will depend on the organisation linked to your `client_id`. Query parameters like `cursor` and `limit` can be used for pagination, allowing you to specify the number of records per page and navigate through results. The response provides venue data and pagination links for easy navigation. For example, to limit responses to 5 venues per page, use the URL `https://global.stampede.ai/v1/venues?limit=5`. Use the `next` link in the response to access subsequent pages.
Once a bearer token has been generated, you may use this auth token to obtain a list of venues. You will only be able to view venues that are listed in the organisation that your client_id is assigned to. If your auth key is assigned to a sub-organisation then only the venues in that sub-organisation will be shown.
Request
Method: GET
URL: https://global.stampede.ai/v1/venues
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 |
limit | Numeric | No | Records to be displayed per page |
Response
{ "data": [ { "id": string, "name": string | null, "organization_id": string, "branding_settings": { "headerImage": string, "headerColor": string, "interfaceColor": string, "background": string, "backgroundImage": string | null } } ], "links": { "first": string | null, "last": string | null, "next": string | null, "prev": string | null } }
Examples
To retrieve all venues on one response:
https://global.stampede.ai/v1/venues
Limit the responses to 5 per page:
https://global.stampede.ai/v1/venues?limit=5
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. Say for example your total results are 25 venues and you are showing 5 per page. You will receive a links result at the bottom of the data response like so:
"links": { "first": null, "last": null, "next": "YRZOXXXASSKG", "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/venues?limit=5&cursor=YRZOXXXASSKG
This will then return the next page of 5 results. The same principle can be used for the previous page.
Comments
0 comments
Please sign in to leave a comment.