Update member link details

PUT /api/members/{memberId}/links

Overview

Changes how a member participates in a family or group link: whether they are the primary member, whether they may book on behalf of the members linked to them, whom they book for by default, and whether linked members may book on their behalf.

This endpoint does not create or remove links. It only adjusts settings on a member who is already part of a link, and every rule it enforces depends on the links the member currently has.

Every field is optional and omitted fields are left alone — a boolean setting you omit keeps its current value. But memberIsPrimary is not a simple setter, it is a request that is validated against the member's links, and it can fail the whole call:

Nothing is written if any check fails.

Linked members are permitted — a token issued for a member linked to {memberId} may call this endpoint.

Endpoint

PUT {base_url}/api/members/{memberId}/links

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

Path parameters

NameTypeRequiredDescription
memberIdinteger (int32)YesThe member whose link settings change. Must match the member id in your access token, or be a member linked to it.

Request body

FieldTypeRequiredDescription
memberIsPrimarybooleanNoMakes this member the primary of their link group. true requires the member to have at least one link, and also clears the record of whom they are linked to, since a primary is linked to by others rather than linking to someone. false is rejected outright if the member is currently the primary and still has links. Omit the field to leave the primary status alone — though see the Overview for the unlinked-member case, which can fail regardless.
memberCanBookForOthersbooleanNoWhether this member may make bookings on behalf of the members linked to them — for example a parent booking for a child. Omit or send null to leave the current setting unchanged.
defaultLinkingMemberIdToMakeBookingsForinteger (int32)NoThe linked member this member books for by default, so booking journeys can preselect them. Must be 1 or greater, and must be one of the members currently linked to {memberId} — an id outside that list is rejected with 400 Id not found. Omit or send null to leave the current default in place; there is no way to clear the default through this endpoint, since a value of 0 or less fails validation.
blockLinkFromMakingBookingsbooleanNoWhether linked members are blocked from booking on this member's behalf — the opposite direction to memberCanBookForOthers. Set it to stop, for example, a teenager's account being booked for by the rest of the family. Omit or send null to leave the current setting unchanged.

Sample request

cURL
curl -X PUT '{base_url}/api/members/{memberId}/links' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "memberIsPrimary": true,
  "memberCanBookForOthers": true,
  "defaultLinkingMemberIdToMakeBookingsFor": 12345,
  "blockLinkFromMakingBookings": true
}'

Errors

A successful call returns 204 No Content.

StatusMeaningWhen
400Bad requestdefaultLinkingMemberIdToMakeBookingsFor is not one of the member's linked members: Id not found
400Bad requestdefaultLinkingMemberIdToMakeBookingsFor is 0 or negative: Member Id for default linking member is not valid. Returned as a model-state object rather than a plain string.
400Bad requestmemberIsPrimary is false for a member who is currently primary and still linked: Cannot remove member as primary while they are linked to other members
400Bad requestThe member has no links and either memberIsPrimary is true or their work address is flagged as primary: Cannot make member a primary while they have no links
404Not foundNo member exists with that id: Member does not exist
500Internal server errorSaving the change failed, or another unexpected server-side failure occurred. No detail is returned in the body.

This page as markdown · All pages · llms.txt