Customer addresses
A customer's saved addresses, one of them the default.
Endpoints#
- GET
/customers/{id}/addresses.jsonList a customer's addresses - GET
/customers/{id}/addresses/{address_id}.jsonGet an address - POST
/customers/{id}/addresses.jsonAdd an address - PUT
/customers/{id}/addresses/{address_id}.jsonUpdate an address - DELETE
/customers/{id}/addresses/{address_id}.jsonDelete an address - PUT
/customers/{id}/addresses/{address_id}/default.jsonMake an address the default
Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.
The customer address object#
What the endpoints below return for one customer address.
customer_address
{
"id": "cm2address01",
"customer_id": "cm2customer01",
"first_name": "Amara",
"last_name": "Okafor",
"name": "Amara Okafor",
"company": null,
"address1": "14 Admiralty Way",
"address2": "Lekki Phase 1",
"city": "Lekki",
"province": "Lagos",
"zip": "106104",
"country": "Nigeria",
"country_code": "NG",
"phone": "+234 802 555 0147",
"default": true
}List a customer's addresses#
GET
/customers/{id}/addresses.jsonread_customersDefault first, then oldest first.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "addresses": [{ "id": "cm2address01", "customer_id": "cm2customer01", "first_name": "Amara", "last_name": "Okafor", "name": "Amara Okafor", "company": null, "address1": "14 Admiralty Way", "address2": "Lekki Phase 1", "city": "Lekki", "province": "Lagos", "zip": "106104", "country": "Nigeria", "country_code": "NG", "phone": "+234 802 555 0147", "default": true }] }Get an address#
GET
/customers/{id}/addresses/{address_id}.jsonread_customersRequest
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses/$ADDRESS_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "customer_address": { "id": "cm2address01", "customer_id": "cm2customer01", "first_name": "Amara", "last_name": "Okafor", "name": "Amara Okafor", "company": null, "address1": "14 Admiralty Way", "address2": "Lekki Phase 1", "city": "Lekki", "province": "Lagos", "zip": "106104", "country": "Nigeria", "country_code": "NG", "phone": "+234 802 555 0147", "default": true } }Add an address#
POST
/customers/{id}/addresses.jsonwrite_customersaddress1, city and a country (country_code like "NG", or the country name) are required. The customer's first address, or one sent with default: true, becomes the default.
Request body
{ "address": { "first_name": "Amara", "last_name": "Okafor", "address1": "9 Marina Road", "city": "Lagos", "zip": "101001", "country_code": "NG", "default": false } }Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "address": { "first_name": "Amara", "last_name": "Okafor", "address1": "9 Marina Road", "city": "Lagos", "zip": "101001", "country_code": "NG", "default": false } }'Example responseShowHide
{ "customer_address": { "id": "cm2address01", "customer_id": "cm2customer01", "first_name": "Amara", "last_name": "Okafor", "name": "Amara Okafor", "company": null, "address1": "14 Admiralty Way", "address2": "Lekki Phase 1", "city": "Lekki", "province": "Lagos", "zip": "106104", "country": "Nigeria", "country_code": "NG", "phone": "+234 802 555 0147", "default": true } }Update an address#
PUT
/customers/{id}/addresses/{address_id}.jsonwrite_customersFields you leave out keep their values. default: true makes it the default address.
Request body
{ "address": { "address2": "Flat 4", "zip": "106104" } }Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses/$ADDRESS_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "address": { "address2": "Flat 4", "zip": "106104" } }'Example responseShowHide
{ "customer_address": { "id": "cm2address01", "customer_id": "cm2customer01", "first_name": "Amara", "last_name": "Okafor", "name": "Amara Okafor", "company": null, "address1": "14 Admiralty Way", "address2": "Lekki Phase 1", "city": "Lekki", "province": "Lagos", "zip": "106104", "country": "Nigeria", "country_code": "NG", "phone": "+234 802 555 0147", "default": true } }Delete an address#
DELETE
/customers/{id}/addresses/{address_id}.jsonwrite_customersThe default address can't be deleted while the customer has other addresses (422): make another one the default first.
Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses/$ADDRESS_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{}Make an address the default#
PUT
/customers/{id}/addresses/{address_id}/default.jsonwrite_customersRequest body
{}Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses/$ADDRESS_ID/default.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Example responseShowHide
{ "customer_address": { "id": "cm2address01", "customer_id": "cm2customer01", "first_name": "Amara", "last_name": "Okafor", "name": "Amara Okafor", "company": null, "address1": "14 Admiralty Way", "address2": "Lekki Phase 1", "city": "Lekki", "province": "Lagos", "zip": "106104", "country": "Nigeria", "country_code": "NG", "phone": "+234 802 555 0147", "default": true } }