Get member favourite by ID
GET /api/members/{memberId}/favourites/{favouriteId}
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
Retrieves one favourite belonging to a member — its type and the value that was favourited. Reach for it when you already hold a favourite id and want to confirm it still exists, or to read it back after writing it; if you are rendering a member's preferences, Get member favourites gets you the lot in one call.
Unlike the grouped list endpoint, this returns a flat object: one favourite, with its type inlined rather than wrapped in a values array.
The favourite must belong to the member in the path. A favourite id that exists but belongs to somebody else gives the same 404 as one that does not exist at all, so you cannot use this to probe other members' records.
Endpoint
GET {base_url}/api/members/{memberId}/favourites/{favouriteId}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
memberId | integer (int32) | Yes | The member the favourite belongs to. Must be greater than 0; 0 and -999 are rejected with 400. With a member-scoped token this must be the token's own member — linked members are not accepted, so a primary member cannot read a linked member's favourite. |
favouriteId | integer (int32) | Yes | The favourite record's own id, as returned in [].values[].id by Get member favourites. Not the favourite type id, and not the favourited value. It must belong to memberId, or you get 404. |
Sample request
curl -X GET '{base_url}/api/members/{memberId}/favourites/{favouriteId}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
id | integer (int32) | The favourite record's own id. Always equal to the favouriteId you asked for; it is also the id you pass to the delete endpoint. |
typeId | integer (int32) | The kind of favourite this is, matching an id from Get all favourite types. Operator-defined, so do not hard-code it. |
typeName | string | The operator's label for that type, such as SITE. Included so you do not need a second call to render it. |
value | string | What was favourited, as free text whose meaning depends on the type — a site reference for a site favourite, an activity reference for an activity favourite. The platform does not expand it into a name; resolve it against the relevant configuration endpoint if you need to display one. |
Sample response
{
"id": 12345,
"typeId": 12345,
"typeName": "string",
"value": "string"
}Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | memberId is 0 or negative. The body is {memberId} is an invalid member ID. |
403 | Forbidden | The token belongs to a different member. Linked members are not accepted by this endpoint. The body is The given member ID of {memberId} does not belong to the logged in member. |
404 | Not found | memberId does not exist. The body is The member does not exist. |
404 | Not found | The member exists but has no favourite with that id — including when the id belongs to another member. The body is The favourite does not exist for the member with ID {memberId}. and does not name the favourite id. |
500 | Internal server error | An unexpected server-side failure while reading the favourite. |