Get Customer Addresses
Retrieve all saved addresses for the authenticated customer.
Endpoint
GET /api/shop/customer-addressesRequest Headers
| Header | Required | Description |
|---|---|---|
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer token (customer login required) |
Query Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
sort | No | id | Column to sort by — id or created_at. The compound form created_at-desc (<column>-<direction>) is also accepted. |
order | No | asc | Sort 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
The response is a bare array of addresses — there is no wrapper object and no addresses key.
Address Fields
| Field | Type | Description |
|---|---|---|
id | integer | Address ID. Use it on Update and Delete. |
addressType | string | Always customer for an address-book entry. Cart addresses saved during checkout carry cart_billing or cart_shipping instead. |
firstName / lastName | string | Name on the address. |
address | string | Street address. Note the read endpoints return address, while create and update accept and echo address1 / address2. |
city | string | City. |
state | string | State or region code. |
country | string | Two-letter country code. |
postcode | string | Postal code. |
email / phone | string | Contact details stored with the address. |
defaultAddress | boolean | Whether this is the customer's default address. |
useForShipping | boolean | Carried from checkout usage; false on a plain address-book entry. |
createdAt / updatedAt | string | ISO 8601 timestamps. |
Use Cases
- Address picker at checkout — list the customer's entries and post the chosen one's fields to Set Shipping Address; the checkout endpoints take address fields, not an address ID.
- Address book, newest first —
?sort=created_at&order=descputs the most recently added entry at the top, which is what an "added just now" confirmation screen needs. - Pre-select the default — find the entry whose
defaultAddressistrue; there is at most one, and there may be none if the default was deleted.
Best Practices
- Filter out cart addresses before rendering — checkout writes entries with an
addressTypeofcart_billingorcart_shippinginto the same list, and showing them makes the address book look duplicated. - Map
addresstoaddress1when submitting — the read returnsaddress, but create and update expectaddress1; postingaddressstores an empty street with no error. - Do not assume a default exists — deleting the default promotes nothing in its place.
Related Resources
- Create Customer Address — add an address to the book
- Update Customer Address — patch one saved address
- Delete Customer Address — remove one saved address

