Backend API
Create a new customer account address.
Arguments
Unique identifier for the address.
Whether the address is active on the account. Inactive accounts will not be returned in the Storefront API.
The corresponding account id for the address.
Primary street address.
Secondary street address.
City where the address is located.
Customer's company name, if applicable.
Country of the residence.
Date of the address creation.
Date the address was updated.
A unique fingerprint hashed from specific address fields that is used to prevent duplicate entries.
First name listed for the address.
Last name listed for the address.
Combined name listed for the address.
Link to the parent account.
Phone number listed for the address.
State of the address.
Postal code of the address.
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.post('/accounts:addresses', {
email: 'adoringfan@azurasstar.com',
first_name: 'Adoring'
last_name: 'Fan'
address1: '123 Breezehome St'
city: 'Whiterun'
country: 'US'
});Response
{
"parent_id": "621e53a6213eaf013d1fa6b2",
"name": "Adoring Fan",
"first_name": "Adoring",
"last_name": "Fan",
"address1": "123 Breezehome St",
"address2": null,
"city": "Whiterun",
"state": "NY",
"zip": null,
"country": "US",
"phone": null,
"company": "Honningbrew Meadery",
"fingerprint": "1219483071269e91f9528ac1c4237944",
"date_created": "2022-07-12T17:53:55.762Z",
"active": true,
"id": "62cdb5332c0a5f00123c5fd7"
}