Add an address
POST
/store/v1/customers/me/addresses
const url = 'https://your-store.example.com/store/v1/customers/me/addresses';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"type":"shipping","isDefault":false,"name":"example","company":"example","line1":"example","line2":"example","city":"example","postalCode":"example","region":"example","country":"example","phone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-store.example.com/store/v1/customers/me/addresses \ --header 'Content-Type: application/json' \ --data '{ "type": "shipping", "isDefault": false, "name": "example", "company": "example", "line1": "example", "line2": "example", "city": "example", "postalCode": "example", "region": "example", "country": "example", "phone": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
type
required
string
isDefault
boolean
name
required
string
line1
required
string
city
required
string
postalCode
required
string
country
required
string