Create member identifiers
POST /api/members/{memberId}/identifier
- 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
Attaches one or more identifiers to an existing member. An identifier is the value a member presents at a door, turnstile or kiosk — the number encoded on an access card, wristband, key fob or digital token. You send an array, so several can be added in one call.
Where each entry ends up depends on its type. An entry of type CARD whose id is 25 characters or shorter replaces the member's single primary card value; every other entry is added as an additional identifier of that type. A member therefore has at most one primary card, and any number of additional identifiers subject to the rules configured for each type. Sending a CARD entry for a member who already has a primary card overwrites the old value without warning, and the overwritten value is not returned to you.
Identifier values must be unique across the whole tenant, not merely across one member: each id is checked, case-insensitively, against every member's primary card and every additional identifier, and the whole request is refused on a clash. All validation runs before anything is saved, so a rejected request adds nothing. A 201 confirms validation passed and the save was attempted; a failure while saving is not reported to you, so if certainty matters, read the member's identifiers back afterwards.
Create the member first with POST {base_url}/api/members/profile — this call needs an id that already exists.
Endpoint
POST {base_url}/api/members/{memberId}/identifier
{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 the identifiers are attached to, as returned by POST {base_url}/api/members/profile. Must be greater than zero: 0 (the reserved non-member id) and -999 (a purged member) are rejected with {memberId} is an invalid member ID. If your access token identifies a member, this must be that same member — a linked member's id is not accepted here and returns 403. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
[].id | string | Yes | The identifier value itself — the number encoded on the card, band, fob or token that a reader will present to the platform. It must not already be in use as any member's primary card or additional identifier, matched without regard to case. Sending an empty string is rejected with Both identifier ID and Type must be set; sending JSON null produces a 500 rather than a validation message, so always send a string. An entry of type CARD with 25 characters or fewer becomes the member's primary card value. |
[].type | string | Yes | The kind of identifier, for example a card or a fob. Maximum 15 characters, and upper-cased before use, so the case you send does not matter. CARD is special and denotes the primary card; every other value must already exist as a configured identifier type, otherwise Identifier type "{type}" does not exist. Unless that type is configured to allow more than one per member, the member must not already hold one of it. Sending an empty string is rejected with Both identifier ID and Type must be set. |
Sample request
curl -X POST '{base_url}/api/members/{memberId}/identifier' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "string",
"type": "string"
}
]'Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | The member does not exist (Member {memberId} does not exist); an entry has an empty id or type (Both identifier ID and Type must be set); a CARD entry is longer than the primary card limit (Primary card ID must be between 1 and 25 characters); the type is not configured (Identifier type "{type}" does not exist); or memberId in the route is zero or negative. |
409 | Conflict | One of the values you sent is already taken, or the member already has that type. The body is prefixed with an error code: [ERRORCODE:ID001] ID "{id}" already in use as a primary card, [ERRORCODE:ID002] ID "{id}" already in use as an additionalId, or [ERRORCODE:ID003] Identifier type "{type}" already exists for this member and duplicates are not allowed. A request that repeats the same id twice returns Request contains duplicate identifier IDs with no code. |
500 | Internal server error | An unexpected server-side failure, including a JSON null sent for an entry's id or type, which fails before the emptiness check can reject it. The response has no body. |