Browse the API docs

Customer addresses

A customer's saved addresses, one of them the default.

Endpoints#

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_customers

Default 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 responseShow
{ "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_customers
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/addresses/$ADDRESS_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "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_customers

address1, 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 responseShow
{ "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_customers

Fields 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 responseShow
{ "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_customers

The 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 responseShow
{}

Make an address the default#

PUT/customers/{id}/addresses/{address_id}/default.jsonwrite_customers
Request 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 responseShow
{ "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 } }