List all of a member's user fields
GET /api/members/{memberId}/user-fields
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 values a member holds in the custom fields your organisation has defined. User fields are the extension mechanism for the member record: rather than a fixed schema, each organisation configures its own fields — a referral source, a locker number, a staff discount code — and this endpoint returns one entry per field the member actually has a value stored for.
The response carries values, not labels. Each entry gives you a userFieldId and nothing to display it with. To turn that into something a person can read, fetch the field definitions from GET /api/configuration/user-fields and join on userFieldId = the definition's id; the definition's description is the field's label, and for Options fields its options list gives the permitted values. Fetch the definitions once and cache them — they change rarely, whereas member values change constantly.
Only fields with a stored value for this member come back. A configured field the member has never been given a value for is absent from the array entirely; it is not returned with a null value. Do not treat the response as a complete picture of the configured fields — the definitions endpoint is the only source for that.
Entries are sorted by userFieldId ascending. Fields of type Currency are returned with an extra currency property carrying the currency symbol configured for the member's site, defaulting to GBP; no other type has it, so read it defensively.
Access is checked against the token: the member id in the route must be the member the token was issued for, or a member linked to them.
Endpoint
GET {base_url}/api/members/{memberId}/user-fields
{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 stored values you want. Must be the member your token was issued for, or one linked to them. An id no member matches returns 404 with No member could be found with the member ID of: {memberId}. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
user-field-ids | string | No | Comma-separated list of user field definition ids, to return only those fields — for example 3,7,12. Every entry must parse as an integer; one that does not fails the whole request with 400 and names the offending value. Ids the member holds no value for are simply absent from the response rather than an error. Omit the parameter to get every field the member has a value for. |
Sample request
curl -X GET '{base_url}/api/members/{memberId}/user-fields' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
[].userFieldId | integer (int32) | Identifies which configured field this value belongs to. It is the id of the field definition returned by GET /api/configuration/user-fields — join on it to get the field's label, type and permitted options. Entries are ordered by this value ascending. |
[].value | string | The member's stored value for the field. Its shape follows type rather than being a fixed string: a date for Date, a number for Numeric and Currency, and text for the rest. For an Options field it is the option's description text, not the option id, and it matches case-sensitively against the options in the field definition. May be null or absent for the text-based types (Free_Format, Options, Hyperlink, User) — the other types cannot hold a null, so a field with no value is deleted rather than blanked and will not appear at all. |
[].type | string (enum) | The field definition's type, which tells you how to interpret value. One of Free_Format, Options, Date, Numeric, Currency, Hyperlink, User, Member — sent as the name, not a number. Date values are ISO 8601 and date-only. Currency entries carry an additional currency property. This is a property of the definition, not of the member's value, so it is the same for every member holding that field. |
Sample response
[
{
"userFieldId": 12345,
"type": "Free_Format"
}
]Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | An entry in user-field-ids is not a valid integer. The response is One or more of the user fields ({value}) in the filter is invalid. |
404 | Not found | No member exists with the supplied memberId. The response is No member could be found with the member ID of: {memberId}. A member that exists but holds no user field values returns 200 with an empty array instead. |
500 | Internal server error |