# Get member personalisation by key

`GET /api/members/{memberId}/personalisation/{personalisationKey}`

- **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)

HTML version: [Get member personalisation by key](https://support.gladstonesoftware.cloud/reference/members/get-member-personalisation-by-key)

## Overview

Reads one of a member's stored preferences by its key. *Personalisation* is a simple key-and-value store the platform keeps per member — the most common use is the member's chosen language, for example the key `LANGUAGE` holding `en-GB`.

The keys are not free text: each one corresponds to a personalisation type configured for the tenant, and a member has at most one value per key. Asking for a key the member has no value under returns `404`, so a client that treats a missing preference as an error will misbehave on every new member. Treat `404` as "not set — use your default".

A value written through the API is visible here straight away, so you will read back your own writes.

This endpoint is deliberately single-member: linked members are not accepted, so a primary member cannot read a linked member's preferences even though they can act on their bookings.

## Endpoint

`GET {base_url}/api/members/{memberId}/personalisation/{personalisationKey}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `memberId` | integer (int32) | Yes | The member whose preference you want. The member must exist, or you get `404` with a message about the member. With a member-scoped token this must be the token's own member; linked members are explicitly not allowed, and attempting one gives `403`. |
| `personalisationKey` | string | Yes | The preference to read, given as the personalisation type's key rather than its numeric id — `LANGUAGE` being the common one. The set of valid keys is configured per tenant, so confirm what your operator has set up rather than assuming. An unknown key and a known key the member has never set are not distinguished: both give the same `404`. |

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/members/{memberId}/personalisation/{personalisationKey}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | integer (int32) | The stored preference's own id. Not needed to read or write the preference — both are addressed by member and key. |
| `typeId` | integer (int32) | The numeric id of the personalisation type behind the key. Operator-defined and different between tenants, so prefer `typeKey` when you need to branch on which preference this is. |
| `typeKey` | string | The key the value is stored under, echoed back from the type configuration. Always the key you asked for, in the casing the operator configured rather than the casing you sent. |
| `value` | string | The member's stored value, always a string regardless of what it represents — a language tag such as `en-GB`, a flag, a numeric setting. The platform does not validate or coerce it into a type for you, so parse it according to the key you asked for. |

## Sample response

```json title="200 OK"
{
  "id": 12345,
  "typeId": 12345,
  "typeKey": "string",
  "value": "string"
}
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `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 has no value stored under that key, or the key is not a configured personalisation type. Both cases give the body `The member does not have a personalisation which has that specific key.` — the message does not tell you which, so you cannot use this to validate a key. |
| `500` | Internal server error | An unexpected server-side failure while reading the preference. |
