Sites
Sites are the locations and programs your organisation operates. Use the sites endpoint to list the active sites your access token can read. Listing sites requires the read:sites scope.
The site model
The site model contains the core reference details of a site in your organisation. Like every Diversity Sync resource, a site carries an object discriminator and a livemode flag. Nullable scalars are always present and set to null when unset.
Properties
- Name
object- Type
- string
- Description
The string
site. Identifies the type of this object.
- Name
id- Type
- integer
- Description
Unique identifier for the site within your organisation.
- Name
name- Type
- string
- Description
The site's name.
- Name
address- Type
- string
- Description
The site's address.
nullwhen no address is set.
- Name
type- Type
- string
- Description
The site's program or type.
nullwhen no type is set.
- Name
status- Type
- string
- Description
Either
activeorarchived.
- Name
livemode- Type
- boolean
- Description
truewhen the object was created with a live (ds_live_…) key,falsefor test mode.
List sites
Returns a paginated list of the active sites in your organisation, ordered by name. The response is the standard list envelope: an object with object: "list", the request url, a has_more boolean, and the data array of site objects. Requires the read:sites scope.
Optional attributes
- Name
limit- Type
- integer
- Description
The number of objects to return, between 1 and 100. Defaults to 25.
- Name
starting_after- Type
- integer
- Description
A cursor for pagination. Pass the
idof the last site from the previous page to fetch the next page of results.
Every response includes a Request-Id header (quote it when contacting support), a Diversity-Sync-Version: v1 header, and the RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers. The /v1 API is limited to 120 requests per minute per API key.
Request
curl -G https://api.diversitysync.com/v1/sites \
-H "Authorization: Bearer {access_token}" \
-d limit=25
Response
{
"object": "list",
"url": "/v1/sites",
"has_more": true,
"data": [
{
"object": "site",
"id": 37,
"name": "Riverside House",
"address": "12 Riverside Drive, Brisbane QLD 4000",
"type": "Supported Independent Living",
"status": "active",
"livemode": true
}
]
}