Update member address details

PUT /api/members/{memberId}/addresses

Overview

Updates the two postal addresses held against a member. address1 is the member's home address and address2 is their work address; there are no other address slots, despite what the field names might suggest.

Understand the update semantics before you call this, because they are unusual:

Only isPrimary behaves as a true partial field: omit it on both addresses and the member's existing primary designation is preserved.

Linked members are permitted — a token issued for a member linked to {memberId} may call this endpoint.

Endpoint

PUT {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 are updated. Must match the member id in your access token, or be a member linked to it.

Request body

FieldTypeRequiredDescription
address1objectNoThe member's home address. Omit to leave the home address exactly as it is. If you include it, send every line — any line you leave out is written as an empty string and clears the stored value.
address1.addressLine1stringNoFirst line of the home address (house name or number), maximum 75 characters.
address1.addressLine2stringNoSecond line of the home address (street), maximum 75 characters.
address1.addressLine3stringNoThird line of the home address (locality), maximum 75 characters.
address1.townCitystringNoTown or city of the home address, maximum 75 characters.
address1.regionstringNoCounty, state or region of the home address, maximum 75 characters.
address1.postalCodestringNoPostcode or ZIP code of the home address, maximum 25 characters. No format check is applied, so any string within the limit is accepted.
address1.countrystringNoCountry of the home address, maximum 25 characters. Free text — it is not validated against a country list.
address1.isPrimarybooleanNoWhich of the two addresses is the member's primary one. true makes the home address primary; false makes the work address primary instead, so do not send false merely to mean "leave it alone" — omit the field for that. Sending true on both addresses is rejected with 400. A home address that is primary must not be completely blank.
address2objectNoThe member's work address. Omit to leave the work address exactly as it is. The same all-or-nothing replacement rule as address1 applies.
address2.addressLine1stringNoFirst line of the work address (building name or number), maximum 75 characters.
address2.addressLine2stringNoSecond line of the work address (street), maximum 75 characters.
address2.addressLine3stringNoThird line of the work address (locality), maximum 75 characters.
address2.townCitystringNoTown or city of the work address, maximum 75 characters.
address2.regionstringNoCounty, state or region of the work address, maximum 75 characters.
address2.postalCodestringNoPostcode or ZIP code of the work address, maximum 25 characters.
address2.countrystringNoCountry of the work address, maximum 25 characters. Free text.
address2.isPrimarybooleanNotrue makes the work address primary; false makes the home address primary. Applied after address1.isPrimary, so if both objects carry the flag, address2 wins. Sending true on both addresses is rejected with 400. A work address that is primary must not be completely blank.

Sample request

cURL
curl -X PUT '{base_url}/api/members/{memberId}/addresses' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "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

A successful call returns 204 No Content.

StatusMeaningWhen
400Bad requestBoth addresses claim to be primary: Only one of the given addresses can be marked as primary
400Bad requestThe address you marked primary has every line blank: Cannot have a primary address with empty values
400Bad requestA field breaches its length limit — for example AddressLine1 cannot be more than 75 characters, PostalCode cannot be more than 25 characters. Returned as a model-state object rather than a plain string.
404Not foundNo member exists with that id: Member with ID {memberId} does not exist
500Internal server errorAn individual address line was sent as an explicit JSON null inside an included address object, or the change could not be saved. No detail is returned in the body.

This page as markdown · All pages · llms.txt