JavaScript
import { createSpreeClient } from '@spree/sdk' const client = createSpreeClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const address = await client.store.customer.addresses.get('addr_abc123', { bearerToken: '<token>', })
{ "id": "addr_EfhxLZ9ck8", "firstname": "John", "lastname": "Doe", "full_name": "John Doe", "address1": "15 Lovely Street", "address2": "Northwest", "city": "Herndon", "zipcode": "35005", "phone": "555-555-0199", "company": "Company", "country_name": "NAME_5", "country_iso": "I5", "state_text": "STATE_ABBR_13", "state_abbr": "STATE_ABBR_13", "quick_checkout": false, "state_name": "STATE_NAME_13" }
Publishable API key for store access
JWT token for authenticated customers
address found
Was this page helpful?