Skip to content

Get Checkout Addresses

Retrieve all saved addresses for the authenticated customer.

Authentication

This mutation supports both authenticated customers and guest users:

  • Authenticated customers: Provide a valid customer authentication token in the Authorization header. Obtain this token via the Customer Login API.
  • Guest users: Provide the Guest Cart Token cartToken obtained from the Create Cart mutation.
Authorization: Bearer <accessToken>

Arguments

NameTypeRequiredDescription
firstInt❌ NoNumber of addresses to fetch (default: 10, max: 100)
afterString❌ NoCursor for forward pagination
lastInt❌ NoNumber of addresses to fetch backward
beforeString❌ NoCursor for backward pagination

Response

FieldTypeDescription
idStringAddress ID
firstNameStringFirst name
lastNameStringLast name
addressStringStreet address
cityStringCity
stateStringState/Province
countryStringCountry code
zipCodeStringPostal/Zip code
phoneStringPhone number
isDefaultBooleanIs this the default address
createdAtDateTimeWhen address was created

Pagination

Uses cursor-based pagination:

  • first + after for forward pagination
  • last + before for backward pagination
  • pageInfo contains hasNextPage and endCursor

Use Cases

  • Display address list in checkout
  • Pre-fill address selection dropdown
  • Allow customers to select shipping/billing address
  • Manage saved addresses

Error Responses

json
{
  "errors": {
    "authentication": ["Unauthorized: Invalid or expired token"]
  }
}

Released under the MIT License.