Fetch a single place when you already know its document ID.
Request
curl --request GET \
--url "https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/place/PLACE_DOCUMENT_ID" \
--header "Authorization: Bearer YOUR_API_TOKEN"const response = await fetch(
"https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/place/PLACE_DOCUMENT_ID",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN"
}
}
);
if (response.status === 404) {
throw new Error("Place not found");
}
if (!response.ok) {
throw new Error(`24Social API returned ${response.status}`);
}
const place = await response.json();
PLACE_DOCUMENT_IDis the stable 24Social document ID, not the venue name or URL slug.
Response
{
"id": "PLACE_DOCUMENT_ID",
"fields": {
"name": "Example venue",
"default": {
"displayName": "Example venue",
"slug": "example-venue",
"contact": {
"phoneNumber": "+44 0000 000000",
"emailAddress": "[email protected]"
}
}
},
"sys": {
"contentForm": {
"id": "place"
},
"status": "published"
}
}Available fields depend on the organisation's place schema. Use the select query parameter when you only need particular fields, for example ?select=id,fields.name,fields.default.slug.
