Customers
People who bought from the store, created an account, or were added by staff.
Endpoints#
- GET
/customers.jsonList customers - GET
/customers/count.jsonCount customers - GET
/customers/search.jsonSearch customers - GET
/customers/{id}.jsonGet a customer - POST
/customers.jsonCreate a customer - PUT
/customers/{id}.jsonUpdate a customer - DELETE
/customers/{id}.jsonDelete a customer - POST
/customers/{id}/send_invite.jsonSend an account invite - GET
/customers/{id}/orders.jsonList a customer's orders
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#
/customers.jsonread_customersOrdered 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.
| Parameter | Description |
|---|---|
limit | Results per page, 1–250 (default 50). |
page_info | Cursor from the Link header for the next or previous page. |
since_id | Only results after this id. |
ids | Comma-separated ids. |
email | Only the customer with this email (case-insensitive). |
created_at_min / created_at_max | ISO 8601 bounds on creation time. |
updated_at_min / updated_at_max | ISO 8601 bounds on last change (address changes count); use for incremental sync. |
fields | Comma-separated fields to return, e.g. id,email,updated_at. |
curl "https://store.weftgrid.com/api/admin/2026-10/customers.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "customers": [ … ] }Count customers#
/customers/count.jsonread_customers| Parameter | Description |
|---|---|
ids, email, created_at_*, updated_at_* | Same filters as the list. |
curl "https://store.weftgrid.com/api/admin/2026-10/customers/count.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "count": 42 }Search customers#
/customers/search.jsonread_customersWords 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.
| Parameter | Description |
|---|---|
query | Search terms, e.g. "amara", "email:example.com tag:VIP" or "state:invited". |
limit, page_info, fields | As for the list. |
curl "https://store.weftgrid.com/api/admin/2026-10/customers/search.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "customers": [ … ] }Get a customer#
/customers/{id}.jsonread_customersstate 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.
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"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#
/customers.jsonwrite_customersA 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.
{
"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
}
}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 responseShowHide
{
"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#
/customers/{id}.jsonwrite_customersFields 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.
{ "customer": { "tags": "VIP, wholesale", "note": "Ships to the studio.", "accepts_marketing": false } }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 responseShowHide
{
"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#
/customers/{id}.jsonwrite_customersCustomers with orders can't be deleted (422), so order history stays complete.
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{}Send an account invite#
/customers/{id}/send_invite.jsonwrite_customersEmails 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.
{}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 responseShowHide
{ "customer_invite": { "to": "[email protected]", "expires_in_hours": 24 } }List a customer's orders#
/customers/{id}/orders.jsonread_ordersNeeds read_orders. Ordered by id, paginated like the orders list.
| Parameter | Description |
|---|---|
status | open, closed (archived), cancelled or any (default). |
limit, page_info, fields | As for other lists. |
curl "https://store.weftgrid.com/api/admin/2026-10/customers/$CUSTOMER_ID/orders.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "orders": [{ "id": "…", "name": "#1012", "email": "[email protected]", "financial_status": "paid", "total_price": "58.00", … }] }