Browse the API docs

Customers

People who bought from the store, created an account, or were added by staff.

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.

List customers#

GET/customers.jsonread_customers

Ordered by id. state is enabled (has a password and confirmed the email), invited (signed up but hasn't confirmed yet) or disabled (no password yet, including customers with an unopened invite). orders_count and total_spent leave out cancelled orders.

Query parameters
ParameterDescription
limitResults per page, 1–250 (default 50).
page_infoCursor from the Link header for the next or previous page.
since_idOnly results after this id.
idsComma-separated ids.
emailOnly the customer with this email (case-insensitive).
created_at_min / created_at_maxISO 8601 bounds on creation time.
updated_at_min / updated_at_maxISO 8601 bounds on last change (address changes count); use for incremental sync.
fieldsComma-separated fields to return, e.g. id,email,updated_at.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "customers": [ … ] }

Count customers#

GET/customers/count.jsonread_customers
Query parameters
ParameterDescription
ids, email, created_at_*, updated_at_*Same filters as the list.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/count.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "count": 42 }

Search customers#

GET/customers/search.jsonread_customers

Words match the email, phone, first or last name (all words must match). Narrow with field:value terms: email, first_name, last_name, phone, tag, accepts_marketing (true or false) and state (enabled, invited or disabled). Quote phrases: last_name:"van der Berg". Paginated like the list.

Query parameters
ParameterDescription
querySearch terms, e.g. "amara", "email:example.com tag:VIP" or "state:invited".
limit, page_info, fieldsAs for the list.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/search.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "customers": [ … ] }

Get a customer#

GET/customers/{id}.jsonread_customers

state is enabled (has a password and confirmed the email), invited (signed up but hasn't confirmed yet) or disabled (no password yet, including customers with an unopened invite). orders_count and total_spent leave out cancelled orders.

Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "customer": {
    "id": "cm2customer01",
    "email": "[email protected]",
    "first_name": "Amara",
    "last_name": "Okafor",
    "phone": "+234 802 555 0147",
    "state": "enabled",
    "verified_email": true,
    "accepts_marketing": true,
    "note": "Prefers DHL Express.",
    "tags": "VIP",
    "orders_count": 4,
    "total_spent": "212.00",
    "currency": "USD",
    "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 }],
    "default_address": { "id": "cm2address01", "city": "Lekki", "country_code": "NG", "default": true, … },
    "created_at": "2026-09-29T10:12:00.000Z",
    "updated_at": "2026-10-21T08:40:00.000Z"
  }
}

Create a customer#

POST/customers.jsonwrite_customers

A customer needs an email or a phone number (customers who pay cash on delivery often have only a phone); an email must be new to the store, and so must a phone. Customers without an email come back with email: null and get no emails. tags is a comma-separated string or a list. addresses use Shopify's fields (zip, country or country_code); the one with default: true (else the first) becomes the default. send_email_invite: true emails an account invite so the customer can choose a password. Passwords can't be set through the API: customers prove they own the email first.

Request body
{
  "customer": {
    "first_name": "Grace",
    "last_name": "Kim",
    "email": "[email protected]",
    "phone": "+1 416 555 0120",
    "accepts_marketing": true,
    "tags": "wholesale, Toronto",
    "note": "Café on Queen Street West.",
    "addresses": [{ "address1": "512 Queen St W", "city": "Toronto", "province": "Ontario", "zip": "M5V 2B5", "country_code": "CA" }],
    "send_email_invite": false
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/customers.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "customer": {
    "first_name": "Grace",
    "last_name": "Kim",
    "email": "[email protected]",
    "phone": "+1 416 555 0120",
    "accepts_marketing": true,
    "tags": "wholesale, Toronto",
    "note": "Café on Queen Street West.",
    "addresses": [{ "address1": "512 Queen St W", "city": "Toronto", "province": "Ontario", "zip": "M5V 2B5", "country_code": "CA" }],
    "send_email_invite": false
  }
}'
Example responseShow
{
  "customer": {
    "id": "cm2customer01",
    "email": "[email protected]",
    "first_name": "Amara",
    "last_name": "Okafor",
    "phone": "+234 802 555 0147",
    "state": "enabled",
    "verified_email": true,
    "accepts_marketing": true,
    "note": "Prefers DHL Express.",
    "tags": "VIP",
    "orders_count": 4,
    "total_spent": "212.00",
    "currency": "USD",
    "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 }],
    "default_address": { "id": "cm2address01", "city": "Lekki", "country_code": "NG", "default": true, … },
    "created_at": "2026-09-29T10:12:00.000Z",
    "updated_at": "2026-10-21T08:40:00.000Z"
  }
}

Update a customer#

PUT/customers/{id}.jsonwrite_customers

Fields you leave out keep their values. tags replaces the customer's tags. When addresses is sent, the list replaces the customer's addresses: include existing ones by id (with the fields to change) to keep them; entries without an id are added.

Request body
{ "customer": { "tags": "VIP, wholesale", "note": "Ships to the studio.", "accepts_marketing": false } }
Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "customer": { "tags": "VIP, wholesale", "note": "Ships to the studio.", "accepts_marketing": false } }'
Example responseShow
{
  "customer": {
    "id": "cm2customer01",
    "email": "[email protected]",
    "first_name": "Amara",
    "last_name": "Okafor",
    "phone": "+234 802 555 0147",
    "state": "enabled",
    "verified_email": true,
    "accepts_marketing": true,
    "note": "Prefers DHL Express.",
    "tags": "VIP",
    "orders_count": 4,
    "total_spent": "212.00",
    "currency": "USD",
    "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 }],
    "default_address": { "id": "cm2address01", "city": "Lekki", "country_code": "NG", "default": true, … },
    "created_at": "2026-09-29T10:12:00.000Z",
    "updated_at": "2026-10-21T08:40:00.000Z"
  }
}

Delete a customer#

DELETE/customers/{id}.jsonwrite_customers

Customers with orders can't be deleted (422), so order history stays complete.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}

Send an account invite#

POST/customers/{id}/send_invite.jsonwrite_customers

Emails an activation link (valid 24 hours) so the customer can choose a password, or confirm the one they signed up with. Fails when the customer has no email, the account is already enabled or customer accounts are turned off.

Request body
{}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/send_invite.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Example responseShow
{ "customer_invite": { "to": "[email protected]", "expires_in_hours": 24 } }

List a customer's orders#

GET/customers/{id}/orders.jsonread_orders

Needs read_orders. Ordered by id, paginated like the orders list.

Query parameters
ParameterDescription
statusopen, closed (archived), cancelled or any (default).
limit, page_info, fieldsAs for other lists.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/orders.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "orders": [{ "id": "…", "name": "#1012", "email": "[email protected]", "financial_status": "paid", "total_price": "58.00", … }] }