Skip to content

Get Customer Addresses

Retrieve all saved addresses for the authenticated customer.

Endpoint

GET /api/shop/customer-addresses

Request Headers

HeaderRequiredDescription
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Query Parameters

ParameterRequiredDefaultDescription
sortNoidColumn to sort by — id or created_at. The compound form created_at-desc (<column>-<direction>) is also accepted.
orderNoascSort direction — asc or desc. Use desc to return the most recently added addresses first.

By default addresses are returned oldest-first (the order they were added). To show the newest address at the top, pass ?sort=created_at&order=desc (or the shorthand ?sort=created_at-desc).

Response Fields (200 OK)

FieldTypeDescription
addressesarrayList of customer addresses

Address Fields

FieldTypeDescription
idintegerAddress ID
firstNamestringFirst name
lastNamestringLast name
addressstringStreet address
citystringCity
statestringState/Province
countrystringCountry code
postcodestringPostal code
phonestringPhone number
isDefaultbooleanIs default address
addressTypestringType (residential/commercial)

Use Cases

  • Display saved addresses in checkout
  • Allow customer to select address
  • Populate address dropdown
  • Show customer's address book
  • Select shipping address
  • Select billing address

Released under the MIT License.