Delete member favourite

DELETE /api/members/{memberId}/favourites/{favouriteId}

Overview

Removes one saved favourite from a member — in practice a site or an activity, since those are the only kinds the create endpoint will store. There is no bulk form: call it once per favourite, using the id returned when the favourite was created or read back from Get member favourites.

The delete is permanent. The favourite is removed outright, with no soft-delete flag and no archived copy, so a second delete of the same id returns 404 rather than succeeding silently. Re-creating the favourite afterwards gives it a new id.

Two separate guards stop you removing someone else's favourite. First, if your token identifies a member, the memberId in the path must be that same member — linked members are explicitly not accepted on this route — and a mismatch is rejected with 403 before anything else is checked; tokens that carry no member identity skip that check. Second, the favourite is looked up by its own id and its owner compared with the memberId in the path, so a favourite that belongs to another member returns 404 and is left untouched. A caller that gets past the first guard still cannot reach across members.

A subsequent read reflects a successful delete immediately. A successful delete returns 204 with an empty body.

Endpoint

DELETE {base_url}/api/members/{memberId}/favourites/{favouriteId}

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

Path parameters

NameTypeRequiredDescription
memberIdinteger (int32)YesThe member the favourite belongs to. Checked twice: the member must exist, and the favourite found by favouriteId must actually be theirs. Both failures come back as 404.
favouriteIdinteger (int32)YesThe favourite to delete — the integer returned by Create member favourite, or a values[].id from Get member favourites. It is a global id, not a per-member index, which is why its owner is checked against memberId.

Sample request

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

Errors

StatusMeaningWhen
404Not foundThree different triggers share this status: The member does not exist. when memberId matches no member, Favourite with ID {favouriteId} does not exist when no favourite has that id — including one already deleted — and Member with ID {memberId} does not have a favourite with ID {favouriteId} when the favourite exists but belongs to someone else. Read the message to tell them apart.
500Internal server errorAn unexpected server-side failure during the delete. The body is empty and a subsequent read may not reflect the true state straight away, so re-read the member's favourites rather than assuming the favourite survived.

This page as markdown · All pages · llms.txt