JavaScript
import { createSpreeClient } from '@spree/sdk' const client = createSpreeClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const address = await client.store.customer.addresses.update('addr_abc123', { city: 'Los Angeles', }, { bearerToken: '<token>', })
{ "id": "addr_EfhxLZ9ck8", "firstname": "John", "lastname": "Doe", "full_name": "John Doe", "address1": "21 Lovely Street", "address2": "Northwest", "city": "Los Angeles", "zipcode": "35005", "phone": "555-555-0199", "company": "Company", "country_name": "NAME_7", "country_iso": "I7", "state_text": "STATE_ABBR_19", "state_abbr": "STATE_ABBR_19", "quick_checkout": false, "state_name": "STATE_NAME_19" }
Publishable API key for store access
JWT token for authenticated customers
"John"
"Doe"
"456 Oak Ave"
"Los Angeles"
address updated
Was this page helpful?