Backend API
Update an existing account address using the ID that was returned when created.
Arguments
idobjectIdrequired
Unique identifier for the address.
parent_idobjectIdrequired
The ID of the parent customer.
address1stringrequired
citystring
City where the address is located.
companystring
Customer's company name, if applicable.
countrystring
Country of the residence.
first_namestring
First name listed for the address.
last_namestring
Last name listed for the address.
namestring
Combined name listed for the address.
statestring
State of the address.
zipstring
Postal code of the address.
PUT/accounts:addresses/:id
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.put('/accounts:addresses/{id}', {
id: '62cdb5332c0a5f00123c5fd7',
address1: '456 Breezehome St'
});
Response
{
"parent_id": "621e53a6213eaf013d1fa6b2",
"name": "Njada Stonearm",
"first_name": "Njada",
"last_name": "Stonearm",
"address1": "456 Breezehome St",
"address2": null,
"city": "Whiterun",
"state": "NY",
"zip": null,
"country": "US",
"phone": null,
"fingerprint": "1219483071269e91f9528ac1c4237944",
"date_created": "2022-07-12T17:53:55.762Z",
"date_updated": "2022-07-14T10:22:41.318Z",
"active": true,
"id": "62cdb5332c0a5f00123c5fd7"
}