Delete member links

DELETE /api/members/{memberId}/links

Overview

Breaks the link between a secondary member and the primary member they are attached to. A link joins one primary member to one or more secondary members, so that the primary can act on their behalf — for example making bookings for a partner or an adult child.

The endpoint has two distinct modes, and which one you get depends entirely on whether you pass linkedMemberId:

In both modes, if removing this link leaves the primary member with no remaining links, the primary member is also reset — it loses its primary flag and its link settings are cleared. A member below the tenant's age of consent cannot have its link removed through this endpoint at all.

A successful call returns 204 No Content.

Endpoint

DELETE {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 is being changed. When linkedMemberId is omitted this must be a secondary member — it is that member's own link that is removed. When linkedMemberId is supplied this must instead be the primary member that owns the link. Getting this the wrong way round is the most common cause of a 400 on this endpoint.

Query parameters

NameTypeRequiredDescription
linkedMemberIdinteger (int32)NoThe secondary member to unlink from the primary member in the path. Supply this only when memberId is a primary member. Must be 1 or greater — a value below 1 is rejected with 400, because it indicates a missing or purged member record. The member you name must already be linked to memberId, or the call fails with 404. Omit this parameter entirely to use the other mode, in which the member in the path removes their own link.

Sample request

cURL
curl -X DELETE '{base_url}/api/members/{memberId}/links' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Errors

StatusMeaningWhen
400Bad requestlinkedMemberId was omitted but memberId is a primary member — a primary member cannot remove its own link this way. Use linkedMemberId to remove a specific secondary member instead.
400Bad requestlinkedMemberId was supplied but memberId is not a primary member.
400Bad requestlinkedMemberId is less than 1, which is treated as a missing or purged member record.
400Bad requestThe member whose link is being removed is a junior — their date of birth puts them below the tenant's configured age of consent.
404Not foundmemberId does not exist.
404Not foundlinkedMemberId does not exist.
404Not foundlinkedMemberId exists but is not currently linked to memberId.
500Internal server errorThe secondary member's record points at a primary member that could not be retrieved — the link data is inconsistent and needs support intervention.

This page as markdown · All pages · llms.txt