List all of a member's linked members
GET /api/members/{memberId}/links
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
Returns the member's link group: who they are linked to, and who may book for whom.
A link in Gladstone joins one primary member to one or more secondary members — a parent and their children, or the members of a household. A secondary can only be attached to a single primary, and only a primary can hold links. The point of the arrangement is booking: a primary can normally book activities for the members attached to them, and each member can individually block or allow being booked for.
The response is written from the point of view of the member in the path. The top-level fields (isPrimary, isJunior, manageLinkedMembers, blockLinkFromMakingBookings, inheritHomeAddress, defaultLinkingMemberIdToMakeBookingsFor) describe that member. linkedMembers holds everyone else in the same group: for a primary that is every secondary attached to them; for a secondary that is their primary plus every other secondary under the same primary, with the caller themselves excluded. The list is sorted so that primary members come first. Each entry carries two independently calculated permission flags, one for each direction of booking.
Reach for this endpoint before building a "who am I booking for?" selector, or whenever you need to know whether one member is allowed to act for another. The two permission flags are computed per request from the current settings on both members, so do not cache them across a change to either.
This endpoint only ever describes links that already exist. Invitations that have been raised but not yet accepted do not appear here at all — for those, call GET /api/members/{memberId}/link-requests/pending, and create or accept the link before expecting anyone to show up in linkedMembers. To change any of the settings reported here, use PUT /api/members/{memberId}/links.
Access is broader than most member endpoints: the member id in the path must match the member id in your access token, or belong to a member linked to the token holder — so a primary can read a secondary's view of the group.
Endpoint
GET {base_url}/api/members/{memberId}/links
{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 whose link group you want. The whole response is written from this member's point of view, and they are excluded from linkedMembers. Must match the member id in your access token, or be a member linked to the token holder. |
Sample request
curl -X GET '{base_url}/api/members/{memberId}/links' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
id | integer (int32) | The member id you asked about, echoed back. Every other top-level field on this response describes this member, not the group as a whole. |
isPrimary | boolean | Whether this member is the primary of the link group. Beware the derivation: it is true when the member is flagged as primary, and also when it has never been set at all, so a brand-new member with no links can report true here. Treat an empty linkedMembers array as the reliable signal that there is no group, not this field. |
isJunior | boolean | Whether this member is below the operator's configured age of consent, calculated from their date of birth at the moment of the request. The threshold comes from the Consent_AgeOfConsent system configuration value; when that value is missing it falls back to 0, which makes every member report false. Junior members are not allowed to remove their own link. |
manageLinkedMembers | boolean | Whether this member is permitted to book on behalf of the other members in the group — the member's stored "can book for others" setting. May be null when it has never been set. This is the raw setting; for the actual per-member outcome read linkedMembers[].bookForLinkedMember, which also accounts for the other member's block. Change it with the memberCanBookForOthers field on PUT /api/members/{memberId}/links. |
defaultLinkingMemberIdToMakeBookingsFor | integer (int32) | The member id to preselect when this member starts a booking — a convenience default, not a restriction. null when no default has been chosen. It must be one of the ids in linkedMembers; PUT /api/members/{memberId}/links rejects anything else with Id not found, and 0 or below with Cannot be the purged or non member. |
linkedMembers | array of object | The other members of the link group, primary members first. For a primary this is every secondary attached to them; for a secondary it is their primary plus every other secondary under that same primary. The member you asked about is never included. An empty array means the member has no links at all. |
linkedMembers[].id | integer (int32) | The member id of this linked member. Use it when you book on their behalf, when setting defaultLinkingMemberIdToMakeBookingsFor, or when removing the link with DELETE /api/members/{memberId}/links?linkedMemberId=. |
linkedMembers[].firstName | string | Given names held on the linked member's record — enough to identify them in a booking-for selector. |
linkedMembers[].lastName | string | Surname held on the linked member's record. |
linkedMembers[].bookForLinkedMember | boolean | Whether the member you asked about may book for this linked member. true when the member you asked about is primary or has "can book for others" set, and this linked member has not blocked linked bookings against themselves. false otherwise. This is the flag to gate your booking-for UI on. |
linkedMembers[].linkedMemberCanBook | boolean | The opposite direction: whether this linked member may book for the member you asked about. true when the linked member is primary or has "can book for others" set, and the member you asked about has not blocked linked bookings against themselves. The two flags are independent — one being true says nothing about the other. |
linkedMembers[].isPrimary | boolean | Whether this linked member is the primary of the group. Exactly one member of a group is primary, and because the list is sorted primary-first, a secondary's own primary is the first entry. |
linkedMembers[].isJunior | boolean | Whether this linked member is below the configured age of consent, calculated from their date of birth against the same Consent_AgeOfConsent threshold used for the top-level isJunior. |
linkedMembers[].priceLevel | object | The pricing tier recorded against this linked member — the operator-defined band that governs what they are charged. The object itself is always emitted, so check priceLevel.id rather than the object before relying on it. |
linkedMembers[].priceLevel.id | string | The member's price level code. It is a short string key, not a number, and it is the value other endpoints expect when they take a price level. |
linkedMembers[].priceLevel.description | string | The operator's description of the price level, in the system's base language. Show translations instead when you are rendering in another language. |
linkedMembers[].priceLevel.translations | array of object | Translated forms of description, one entry per configured culture. An empty array means no translations have been set up for this price level — fall back to description. |
linkedMembers[].priceLevel.translations[].type | string | |
linkedMembers[].priceLevel.translations[].culture | string | The culture code the translation is for, matching the codes the operator has configured — for example en-GB or cy-GB. Match it against your caller's locale and fall back to description when there is no entry. |
linkedMembers[].priceLevel.translations[].text | string | The translated price level description for that culture — display this in place of description. |
inheritHomeAddress | boolean | Whether this member's home address is inherited from the rest of the group rather than held independently. false when the setting is unset or has any value other than "inherits", so false simply means "not inheriting". |
blockLinkFromMakingBookings | boolean | Whether this member has blocked the other members of the group from booking on their behalf. This is the setting that drives linkedMembers[].linkedMemberCanBook to false. May be null when never set, which is treated as "not blocked". Change it with the blockLinkFromMakingBookings field on PUT /api/members/{memberId}/links. |
Sample response
{
"id": 12345,
"isPrimary": true,
"isJunior": true,
"manageLinkedMembers": true,
"defaultLinkingMemberIdToMakeBookingsFor": 12345,
"linkedMembers": [
{
"id": 12345,
"firstName": "string",
"lastName": "string",
"bookForLinkedMember": true,
"linkedMemberCanBook": true,
"isPrimary": true,
"isJunior": true,
"priceLevel": {
"id": "string",
"description": "string",
"translations": [
{
"type": "string",
"culture": "string",
"text": "string"
}
]
}
}
],
"inheritHomeAddress": true,
"blockLinkFromMakingBookings": true
}Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | {memberId} is an invalid member ID — the member id in the path is 0 (the reserved non-member id) or -999 (a purged member). Rejected before the member is looked up. |
404 | Not found | MemberId does not exist — no member with that id. A member who simply has no links is not an error: you get 200 with an empty linkedMembers array. |
500 | Internal server error | An unexpected server-side failure while assembling the response. The 500 has an empty body, so there is nothing to parse — retry, then escalate. |