Get site defaults

GET /api/configuration/sites/{siteId}/defaults

Success: 200 OK

Overview

Returns the two site-level defaults an operator has nominated for a site: its default pricing time band and its default membership type group. Both are system-configuration values held against the site, and this endpoint reads exactly those two settings — nothing else in the site's configuration is exposed here.

Reach for this when you are about to build a screen or a request that needs a starting point the operator has already chosen, rather than making the caller pick from a full list. The typical pattern is to call this first, then feed timebandId into Get pricing time band by ID and membershipTypeGroupId into Get membership type group by ID or Get membership types by membership type groups to resolve the records themselves.

Treat both values as hints an operator can change at any time, not as constants. Read them per site — they are configured per site and two sites in the same estate routinely differ.

A site created through the platform's own create-site endpoint is seeded with both settings (STAND for the time band and MISC for the membership type group), so a 404 from this call usually means the site ID is wrong or the site was provisioned by some other route — not that the operator has deliberately left the defaults blank.

Endpoint

GET {base_url}/api/configuration/sites/{siteId}/defaults

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
siteIdstringYesThe site whose defaults you want. Take it from the id of a site returned by Get site by ID or the list-sites call. Note that this endpoint does not check the site exists — it only looks for the site's default settings, so an unknown site ID and a real site with no defaults configured both return the same 404.

Sample request

cURL
curl -X GET '{base_url}/api/configuration/sites/{siteId}/defaults' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
timebandIdstringThe pricing time band the operator has nominated as this site's default, held in the site's DefaultTimeBand system-configuration setting, which is seeded to STAND when a site is created. Use it as the pre-selected time band when a call or a screen needs one and the user has not chosen otherwise; resolve it with Get pricing time band by ID. Null when the site has a default membership type group configured but no default time band — a 200 with this field null is a normal response, not an error.
membershipTypeGroupIdstringThe membership type group the operator has nominated as this site's default, held in the site's DefaultSubTypeGroup system-configuration setting, which is seeded to MISC when a site is created. Use it as the starting group when presenting joining options; resolve it with Get membership type group by ID, or list its members with Get membership types by membership type groups. Null when the site has a default time band configured but no default membership type group.

Sample response

200 OK
{
  "timebandId": "string",
  "membershipTypeGroupId": "string"
}

Errors

StatusMeaningWhen
404Not foundNeither default setting exists for that site ID — the operator has configured neither a default time band nor a default membership type group, or the site ID does not exist at all. The two cases are indistinguishable from the response. The body is the plain-text string Get Defaults For Site SiteDefaultsResponse could not find the id {siteId}. If only one of the two settings is missing you get 200 with that field null instead.
500Internal server errorAn unexpected server-side failure while reading the site's configuration. The response has an empty body; the detail is not returned to you.

This page as markdown · All pages · llms.txt