Searches for members by ID or name

GET /api/search/members/{searchText}

Success: 200 OK

Overview

Finds members from a single free-text term — the lookup behind a staff search box. It returns full personal detail for every match, including date of birth, home and work addresses, email, phone and card numbers, so treat the response as personal data and request only what you will use.

Whether your term contains a space completely changes the search. The text is trimmed and split on its first space into at most two parts, and the two modes search different things:

All text matching is prefix-only. The term matches only the start of a value, so smith finds "Smithers" but never "Blacksmith", and @example.com finds no one. Case sensitivity is not normalised by the endpoint, and can differ between environments.

Before matching, the characters +, *, (, ), | and " are stripped, as is any space immediately followed by a hyphen. A term made up entirely of those characters therefore reduces to an empty prefix, which matches every member — the empty-input guard runs before the stripping, so it does not catch this.

No results is 204 No Content with no body, not 200 with an empty array. A client that always parses the body will fail on a search that found nothing.

There is no paging, no result limit and no ordering. Every match is returned in one response, in an order that can change between identical calls. Keep terms specific: a one- or two-character term against a large environment will return most of the member base.

Endpoint

GET {base_url}/api/search/members/{searchText}

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

Path parameters

NameTypeRequiredDescription
searchTextstringYesThe term to search for — a name, a member id, an email address, a card number or a telephone number. Matched as a prefix, so supply the beginning of the value, not a fragment from the middle. A space in the term switches the search to first-name-or-last-name only, so send one word when you want to match on email, card or phone. URL-encode it, since it sits in the path. Empty or missing is rejected with 400 and the body Search Text cannot be empty; a term consisting only of the stripped characters is not rejected and matches everyone.

Sample request

cURL
curl -X GET '{base_url}/api/search/members/{searchText}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
membersarray of objectThe matching members. Present and non-empty on a 200, because a search with no matches returns 204 with no body at all rather than an empty array — so you will never see "members": []. Unordered and unpaged: every match is here, however many there are.
members[].idinteger (int32)The member's identifier, and the value every other member endpoint takes. Assigned by the platform and unique within the tenant only. A single-word search term that parses as an integer is matched against this exactly, in addition to the prefix matches on the text fields — which is why searching 1234 can return both member 1234 and members whose card number begins 1234.
members[].firstNamesstringThe member's given names as one string — forename and any middle names together, not just the first. Searched as a prefix in both modes. May be null. Because it is a single field, you cannot reliably split a forename from a middle name here.
members[].lastNamestringThe member's family name. Searched as a prefix in both modes; in the two-word mode it is matched against the text after the first space, and combined with firstNames using OR rather than AND. May be null.
members[].homeEmailstringThe member's personal email address. Searched as a prefix, but only when your term contains no space, and only from the start — so you can find jane@example.com by typing jane but never by typing example.com. May be null, and is not guaranteed unique across members. The member's work email exists on the underlying record but is not returned here.
members[].homePostCodestringThe member's home postcode, duplicated from homeAddress.postalCode — the same value in two places, not two different postcodes. It is not searched, despite postcode being an obvious thing to search on. May be null.
members[].statusIdstringThe member's status code, resolvable through Get all member statuses. It is a code rather than a label, so look it up rather than displaying it. The search applies no status filter, so cancelled, expired and otherwise inactive members are returned alongside current ones — filter on this yourself if you only want active members. May be null.
members[].dateOfBirthstring (date-time)The member's date of birth, serialised as a full timestamp even though only the date is meaningful — ignore the time component rather than converting the value between time zones, which can shift the date. null where no date of birth is recorded, which is common, so do not rely on it to disambiguate two members with the same name.
members[].cardIdsarray of objectEvery card number associated with the member: the primary card first, then any additional cards. The first entry is always present even when the member has no primary card, in which case its cardId is null — so guard against a null before using cardIds[0]. Duplicates between the primary and additional cards are collapsed. All of these are searched as prefixes in single-word mode.
members[].cardIds[].cardIdstringA card number as printed on the member's card. Nullable — see cardIds. Nothing here distinguishes the primary card from an additional one except position, and there is no expiry or status, so do not infer that a listed card is currently valid.
members[].phoneNumberstringA single contact number chosen from the three the member may have, in strict order: mobile if set, otherwise home, otherwise work. You cannot tell from this field which kind of number you got, and the other two are not returned. All three are searched as prefixes in single-word mode, so a member can match on a home number while this field shows their mobile. Null only when all three are empty.
members[].homeAddressobjectThe member's home address. Always present, never null, even for a member with no address recorded — in that case every field inside it is null, so check the fields rather than the object.
members[].homeAddress.addressLine1stringThe property element of the address — house name or number. May be null.
members[].homeAddress.addressLine2stringThe street element of the address. May be null, including when addressLine1 is populated, so build a display address by joining the non-null lines rather than assuming they fill in order.
members[].homeAddress.addressLine3stringThe locality element of the address — a village or district within the town. Frequently null.
members[].homeAddress.townCitystringThe town or city. May be null.
members[].homeAddress.regionstringThe county, state or region. May be null. Free text, not validated against any list.
members[].homeAddress.postalCodestringThe postcode. The same value as the top-level homePostCode. Free text with no format validation, so do not assume it is normalised or even well formed.
members[].homeAddress.countrystringThe country. Free text rather than an ISO code, so it may be spelled or abbreviated in any way the operator entered. May be null.
members[].homeAddress.isPrimarybooleanWhether the home address is the member's designated correspondence address. Derived from a single indicator shared with workAddress.isPrimary, so at most one of the two is true — and both are false when no primary address has been set, which is not an error. Never rely on one being true to pick an address for correspondence.
members[].workAddressobjectThe member's work address. Always present, never null, even for a member with no work address — in that case every field inside is null, which is the common case.
members[].workAddress.addressLine1stringThe property element of the work address. May be null. Note the employer's name is held elsewhere on the member record and is not returned by this endpoint.
members[].workAddress.addressLine2stringThe street element of the work address. May be null independently of the other lines.
members[].workAddress.addressLine3stringThe locality element of the work address. Frequently null.
members[].workAddress.townCitystringThe town or city of the work address. May be null.
members[].workAddress.regionstringThe county, state or region of the work address. Free text, may be null.
members[].workAddress.postalCodestringThe postcode of the work address. Free text with no format validation. Unlike the home postcode, it is not duplicated at the top level of the member object.
members[].workAddress.countrystringThe country of the work address, as free text rather than an ISO code. May be null.
members[].workAddress.isPrimarybooleanWhether the work address is the member's designated correspondence address. Mutually exclusive with homeAddress.isPrimary because both derive from one indicator, and both are false when none has been set.

Sample response

200 OK
{
  "members": [
    {
      "id": 12345,
      "firstNames": "string",
      "lastName": "string",
      "homeEmail": "member@example.com",
      "homePostCode": "string",
      "statusId": "string",
      "dateOfBirth": "2026-08-14T19:00:00Z",
      "cardIds": [
        {
          "cardId": "string"
        }
      ],
      "phoneNumber": "string",
      "homeAddress": {
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "townCity": "string",
        "region": "string",
        "postalCode": "string",
        "country": "string",
        "isPrimary": true
      },
      "workAddress": {
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "townCity": "string",
        "region": "string",
        "postalCode": "string",
        "country": "string",
        "isPrimary": true
      }
    }
  ]
}

Errors

StatusMeaningWhen
200OKSuccess, with at least one match. The body always contains a non-empty members array.
204No contentThe search ran and matched nothing. There is no body at all — not {"members": []} — so check the status before parsing.
400Bad requestsearchText was empty or missing. Body: the plain string Search Text cannot be empty. Note the check runs on the raw value, so a term made only of the stripped characters + * ( ) | " passes it and matches every member instead.
500Internal server errorAn unexpected server-side failure running the search. The response has no body. A very broad term against a large member base produces an unbounded result set with no paging, so treat a 500 on a one- or two-character term as a signal to narrow the search rather than to retry it unchanged.

This page as markdown · All pages · llms.txt