Get member contact details

GET /api/members/{memberId}/contact-details

Success: 200 OK

Overview

Retrieves the email addresses and telephone numbers held for a member, and tells you which of each the member has nominated as their primary.

The response shape is fixed slots, not a list of what exists. telephone always has exactly three elements, in this order: mobile, home number, work number. email always has exactly two: home email, then work email. Each element populates only its own field and leaves the others null — so the mobile element has mobile set and telephone1/telephone2 null, and so on. A member with no contact details at all still returns all five elements, every value null. Index into the arrays by position, or filter on the non-null field; do not assume an element is missing because the member has not supplied that number.

Junior members can inherit an email from the member they are linked to. When that applies, the inherited address is substituted into the first email element and isInheritedfromPrimaryMember is set on it, so what you read may not be stored on this member's own record.

An unknown member returns 404. Linked members are allowed: a primary member's token can read the contact details of a member linked to them.

Endpoint

GET {base_url}/api/members/{memberId}/contact-details

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

Path parameters

NameTypeRequiredDescription
memberIdinteger (int32)YesThe member whose contact details you want. Must be greater than 0 — the non-member record 0 and purged members -999 are rejected with 400, not 404. With a member-scoped token this may be the token's own member or a member linked to them.

Sample request

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

Response fields

FieldTypeDescription
emailarray of objectAlways exactly two elements, in a fixed order: the home email slot first, then the work email slot. The length never varies with how many addresses the member actually has.
email[].email1stringThe member's home email address. Populated only on the first element; null on the second, which carries email2 instead. null when no home address is recorded. When the member inherits their email, this field holds the inherited address rather than anything stored against them.
email[].email2stringThe member's work email address. Populated only on the second element; null on the first. null when no work address is recorded. Never inherited — inheritance only ever fills email1.
email[].isPrimarybooleanWhether this slot is the address the member has nominated for contact. Exactly one of the two elements is true. When the member has expressed no preference the home slot is treated as primary, so true here does not prove a deliberate choice — and the nominated address can still be null if the member never supplied it.
email[].isInheritedfromPrimaryMemberbooleantrue when the address in email1 was taken from the member's primary member rather than stored against this member — the arrangement used for juniors who share a parent's email. Only ever true on the first element. When it is true, updating this member's own email will not change what you read back here.
telephonearray of objectAlways exactly three elements, in a fixed order: mobile, then home number, then work number. The length never varies with how many numbers the member actually has.
telephone[].mobilestringThe mobile number. Populated only on the first element; null on the other two. Stored as free text, not normalised or validated into a dialling format.
telephone[].telephone1stringThe home number. Populated only on the second element; null on the others.
telephone[].telephone2stringThe work number. Populated only on the third element; null on the others.
telephone[].isPrimarybooleanWhether this slot is the number the member has nominated for contact. At most one of the three is true — unlike email, a member with no preference recorded gets false on all three, so do not assume something is primary.

Sample response

200 OK
{
  "email": [
    {
      "email1": "member@example.com",
      "email2": "member@example.com",
      "isPrimary": true,
      "isInheritedfromPrimaryMember": true
    }
  ],
  "telephone": [
    {
      "mobile": "string",
      "telephone1": "string",
      "telephone2": "string",
      "isPrimary": true
    }
  ]
}

Errors

StatusMeaningWhen
400Bad requestmemberId is 0 or negative, which covers the non-member record and purged members. The body is {memberId} is an invalid member ID.
403ForbiddenThe token belongs to a member who is neither memberId nor linked to them. The body is The given member ID of {memberId} does not belong to the logged in member nor any linked members.
404Not foundmemberId is a valid, positive id that does not exist. The body is MemberId does not exist. A member with no contact details recorded returns 200 with all-null values instead.
500Internal server errorAn unexpected server-side failure while reading the contact details, including while resolving an inherited email from the primary member.

This page as markdown · All pages · llms.txt