Get all favourite types
GET /api/members/favourite-types
Success: 200 OK
- Products: Operator (
FOH), Consumer (CONSUMER) (any one of these products, not all) - Features: Online Bookings (
ONLINEBOOK), Online Joining (ONLINEJOIN), Front of House Generic Access (FOHGENERIC) (any one of these features, not all)
Overview
Lists the kinds of thing a member is allowed to mark as a favourite — for example a site or an activity. This is tenant reference data, not member data: the list is the same for every member, and it is defined by the operator, so do not hard-code the ids or the names.
Read this first if you are building anything that shows or sets favourites. The id values here are what appear as typeId on a member's favourites and what you pass to the favouriteTypeIds filter on Get member favourites.
The endpoint takes no parameters and needs no member context. It returns 200 with an array; if the operator has configured no favourite types at all, that array is empty rather than an error. Note that not every configured type is necessarily accepted when creating a favourite — the create endpoint refuses types it does not support, with The favourite type {name} is not currently supported.
Endpoint
GET {base_url}/api/members/favourite-types
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Sample request
curl -X GET '{base_url}/api/members/favourite-types' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
[].id | integer (int32) | The favourite type's id. This is the value that comes back as typeId on a member's favourites, and the value you put in the favouriteTypeIds query filter. Operator-defined, so it differs between tenants and between environments — resolve it by name at runtime rather than baking a number into your code. |
[].name | string | The operator's label for the type, such as SITE. Used by the create-favourite endpoint to decide whether the type is supported, and it is what appears as typeName on a member's favourites. It is display text set by the operator, so treat it as changeable. |
Sample response
[
{
"id": 12345,
"name": "string"
}
]Errors
| Status | Meaning | When |
|---|---|---|
500 | Internal server error | An unexpected server-side failure while reading the type list. There is nothing about the request that can cause this — the endpoint takes no input. |