List all of a member's addresses

GET /api/members/{memberId}/addresses

Success: 200 OK

Overview

Returns the addresses held against a member. A member record has exactly two address slots and no more: address1 is the member's home address and address2 is their work address. There is no address-type field to read and no way to add a third address — the slots are positional, and their meaning comes from which one you are looking at.

Both objects are always present in a 200 response, even for a member with nothing recorded. An empty slot is returned as an object whose lines are all null, not as an omitted or null address1/address2. Test for content by inspecting the lines; do not test for the presence of the key.

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. Requesting someone else's addresses returns 403 rather than an empty result.

Endpoint

GET {base_url}/api/members/{memberId}/addresses

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

Path parameters

NameTypeRequiredDescription
memberIdinteger (int32)YesThe member whose addresses you want. Must be the member your token was issued for, or one linked to them. A member id that does not exist returns 404; 0, a non-member record or a purged record returns 400.

Sample request

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

Response fields

FieldTypeDescription
address1objectThe member's home address. Always present in the response — when the member has no home address recorded, the object is returned with every line null.
address1.addressLine1stringFirst line of the home address: the property — typically the house name or number. Null when not recorded.
address1.addressLine2stringSecond line of the home address: the street. Null when not recorded.
address1.addressLine3stringThird line of the home address: the locality — the district or village below town level. Null when not recorded.
address1.townCitystringTown or city of the home address. Null when not recorded.
address1.regionstringCounty, state or equivalent region of the home address. Null when not recorded.
address1.postalCodestringPostcode or ZIP code of the home address. Null when not recorded. Free text: no format is enforced, so do not assume a valid postcode.
address1.countrystringCountry of the home address. Null when not recorded.
address1.isPrimarybooleanTrue when address1 is the member's chosen primary address — the address to use for correspondence. A member has a single primary-address choice, so at most one of address1 and address2 can be true, and both are false when no primary address has been chosen. Do not assume the home address is primary by default.
address2objectThe member's work address. Always present in the response — when the member has no work address recorded, the object is returned with every line null.
address2.addressLine1stringFirst line of the work address: the property — typically the house name or number. Null when not recorded.
address2.addressLine2stringSecond line of the work address: the street. Null when not recorded.
address2.addressLine3stringThird line of the work address: the locality — the district or village below town level. Null when not recorded.
address2.townCitystringTown or city of the work address. Null when not recorded.
address2.regionstringCounty, state or equivalent region of the work address. Null when not recorded.
address2.postalCodestringPostcode or ZIP code of the work address. Null when not recorded. Free text: no format is enforced, so do not assume a valid postcode.
address2.countrystringCountry of the work address. Null when not recorded.
address2.isPrimarybooleanTrue when address2 is the member's chosen primary address — the address to use for correspondence. A member has a single primary-address choice, so at most one of address1 and address2 can be true, and both are false when no primary address has been chosen. Do not assume the home address is primary by default.

Sample response

200 OK
{
  "address1": {
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "townCity": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string",
    "isPrimary": true
  },
  "address2": {
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "townCity": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string",
    "isPrimary": true
  }
}

Errors

StatusMeaningWhen
400Bad requestThe id is not a usable member record. A non-member record is rejected with 0 is an invalid member ID; a purged member record is also rejected with 400.
404Not foundMemberId does not exist.
500Internal server error

This page as markdown · All pages · llms.txt