Customers
Search customer accounts and retrieve their order history.
List customers
GET /api/admin/customers requires an admin identity or a token with customers:read.
curl --get "$SELLFORGE_ADMIN_URL/api/admin/customers" \
-H "Authorization: Bearer $SELLFORGE_API_TOKEN" \
--data-urlencode 'q=example.com' \
--data-urlencode 'limit=25'
q searches email and display name. The response uses customers, count, limit, and offset; accounts are sorted newest first. This list includes user records with the customer role, rather than every guest email address ever used in checkout.
Retrieve a customer
GET /api/admin/customers/:id returns customer with id, email, first_name, last_name, phone, has_account, timestamps, and addresses.
In the current serializer, phone is null and addresses is an empty array. Do not interpret those placeholders as a complete address book. Order addresses remain part of order data.
Order history
GET /api/admin/customers/:id/orders returns an orders array. It matches both the customer ID and their email within the relevant shop scope. This can include purchases made before an order was linked to the account.
GET /api/admin/customers/:id/audit-log returns entries for account-related activity.
Imports and exports
Customer CSV templates, exports, and background imports are covered in Data and media. There is no customers:write token scope in the reviewed policy.
Found something unclear? Let us know