Customers API
Access customer profiles and data.
Overview
Manage customer profiles, addresses, and preferences via the API.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/admin/customers | List customers with search, sort, and pagination |
POST | /api/admin/customers | Create a new customer |
GET | /api/admin/customers/[id] | Get customer with orders and addresses |
PUT | /api/admin/customers/[id] | Update customer profile |
DELETE | /api/admin/customers/[id] | Delete a customer (Owner only) |
Query parameters
searchβ search by name, email, or phonesortβ sort by totalSpent, orderCount, createdAt, or namemarketingβ filter by marketing consent (email, sms)
