List the places available to your integration. The token must include the place content-form scope, or the wildcard scope.
Request
curl --request GET \
--url "https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/place?limit=25" \
--header "Authorization: Bearer YOUR_API_TOKEN"const response = await fetch(
"https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/place?limit=25",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN"
}
}
);
if (!response.ok) {
throw new Error(`24Social API returned ${response.status}`);
}
const places = await response.json();Replace
YOUR_ORGANISATION_SLUGandYOUR_API_TOKENwith the values supplied for your integration.
Response
{
"data": [
{
"id": "PLACE_DOCUMENT_ID",
"fields": {
"name": "Example venue",
"default": {
"displayName": "Example venue",
"slug": "example-venue"
}
},
"sys": {
"contentForm": {
"id": "place"
},
"status": "published"
}
}
],
"pagination": {
"nextCursor": "NEXT_CURSOR"
}
}Pagination
Pass the returned pagination.nextCursor into the next request:
GET /api/v3/YOUR_ORGANISATION_SLUG/place?limit=25&cursor=NEXT_CURSORWhen nextCursor is null, there are no more places. Do not combine cursor and offset.
