Skip to content

Customers

Read and update the customers in your shop.

GET /customers

Cursor-paginated list of your customers (oldest first).

Query params:

ParamTypeDescription
emailstringReturn only customers with this email address.
limitintegerPage size, 1–1000 (default 20).
afterstringCursor for the next page.
beforestringCursor for the previous page.
hasCountbooleanInclude the total count in meta.pagination (slower).

See pagination for details.

// data
[
{
"id": "6677889900",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"stampBalance": 35,
"cards": 1,
"stampsToNextReward": 5,
"vipTierId": 3,
"vipTierName": "Gold",
"dateOfBirth": "09-04",
"state": "active"
}
]
// meta.pagination
{
"hasNext": true,
"hasPrevious": false,
"nextCursor": "aWQ6NjY3Nzg4OTkwMA==",
"previousCursor": "...",
"count": null
}

dateOfBirth is a dd-mm string. mergedIntoCustomerId is present only when the customer has been merged into another.

Returned by every customer endpoint (list, get, and update). Null fields are omitted from REST responses.

FieldTypeDescription
idstringThe Shopify customer ID (the customer’s identity everywhere).
firstNamestringCustomer’s first name.
lastNamestringCustomer’s last name.
emailstringCustomer’s email address.
stampBalanceintegerCurrent redeemable stamp balance.
cardsintegerNumber of completed stamp cards.
stampsToNextRewardintegerStamps still needed to reach the next reward.
stampsExpireAtstringWhen the current stamp balance expires, if stamp expiry is enabled (omitted otherwise).
vipTierIdintegerCurrent VIP tier ID (if any).
vipTierNamestringCurrent VIP tier name (if any).
dateOfBirthstringDay and month of birth as a dd-mm string.
statestringLoyalty state of the customer.
mergedIntoCustomerIdstringIf the customer was merged, the kept customer’s ID (omitted otherwise).
nextRewardobjectThe next reward the customer is working towards, with id and name. Returned only by Get a customer.
FieldTypeDescription
hasNextbooleanWhether another page follows.
hasPreviousbooleanWhether a previous page exists.
nextCursorstringCursor to fetch the next page (pass as after).
previousCursorstringCursor for the previous page (pass as before).
countintegerTotal matching records (only when hasCount=true, otherwise null).

GET /customers/{id}

Returns a single customer by Shopify customer ID (see Customer fields), or 404 CUSTOMER_NOT_FOUND. This endpoint also populates nextReward, which the list endpoint omits.

{
"id": "6677889900",
"firstName": "Ada",
"stampBalance": 35,
"cards": 1,
"stampsToNextReward": 5,
"nextReward": { "id": "44", "name": "Free coffee" }
}

PATCH /customers/{id}

Update an existing customer’s birthday. Returns 404 CUSTOMER_NOT_FOUND if the ID is unknown.

Only app-owned fields are writable. Customer name, email, and phone are owned by Shopify and are not editable through this API.

Body:

FieldTypeDescription
birthday_monthintegerMonth of birth, 1–12 (send with birthday_day).
birthday_dayintegerDay of birth, 1–31 (send with birthday_month).
excludedbooleantrue removes the customer from the loyalty program (state becomes removed); false re-includes them. See below.

When excluded is true, the customer is ineligible for the program: they are excluded from earning, birthday and anniversary rewards, and balance recalculation. This exclusion is preserved when Shopify syncs the customer and is not silently undone. Setting excluded to false re-includes the customer, and their account state is read back from Shopify so it reflects reality.

{ "excluded": true }

Returns the updated customer object (see Customer fields).

POST /customers/{id}/tier

Assigns the customer to a VIP tier. The tier must belong to your shop, otherwise 404 TIER_NOT_FOUND is returned (and 404 CUSTOMER_NOT_FOUND for an unknown customer).

By default this only sets the tier. Set trigger_rewards to true to also issue the rewards attached to the tier, the same as ticking “give this tier’s rewards” on the admin tier change.

Body:

FieldTypeRequiredDescription
tier_idintegeryesThe tier to assign (id from /tiers).
trigger_rewardsbooleannoWhen true, also issue the tier’s rewards to the customer. Defaults to false.
commentstringnoCustomer-facing note recorded against the change.
internal_commentstringnoStaff-only note recorded against the change.
{ "tier_id": 3 }

Returns the updated customer object (see Customer fields).