# Get member contact details

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

- **Success:** `200 OK`
- **Products:** Operator (`FOH`), Consumer (`CONSUMER`), Integrations (`INTEGRATIONS`) (any one of these products, not all)
- **Features:** Online Bookings (`ONLINEBOOK`), Online Joining (`ONLINEJOIN`), TRP Integration (`TRP`), Front of House Generic Access (`FOHGENERIC`) (any one of these features, not all)

HTML version: [Get member contact details](https://support.gladstonesoftware.cloud/reference/members/get-member-contact-details)

## 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](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `memberId` | integer (int32) | Yes | The 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

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

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `email` | array of object | Always 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[].email1` | string | The 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[].email2` | string | The 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[].isPrimary` | boolean | Whether 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[].isInheritedfromPrimaryMember` | boolean | `true` 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. |
| `telephone` | array of object | Always 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[].mobile` | string | The 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[].telephone1` | string | The home number. Populated only on the **second** element; `null` on the others. |
| `telephone[].telephone2` | string | The work number. Populated only on the **third** element; `null` on the others. |
| `telephone[].isPrimary` | boolean | Whether 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

```json title="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

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `memberId` is `0` or negative, which covers the non-member record and purged members. The body is `{memberId} is an invalid member ID`. |
| `403` | Forbidden | The 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`. |
| `404` | Not found | `memberId` 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. |
| `500` | Internal server error | An unexpected server-side failure while reading the contact details, including while resolving an inherited email from the primary member. |
