Customers (admin API)
Admin routes of the customers module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.
GET /v1/admin/customers
Section titled “GET /v1/admin/customers”List all customers
Parameters:
pagein query (number, min 1, optional).pageSizein query (number, min 1, max 100, optional).searchin query (string, max length 100, optional).segmentin query ("NEW","ACTIVE","LOYAL","AT_RISK","CHURNED","HIGH_VALUE","VIP", optional).
Responses:
200: Customers retrieved.401: Unauthorized.403: Insufficient permissions.
GET /v1/admin/customers/{id}
Section titled “GET /v1/admin/customers/{id}”Get customer by ID
Parameters:
idin path (string, required).
Responses:
200: Customer retrieved.401: Unauthorized.403: Insufficient permissions.404: Customer not found.
PATCH /v1/admin/customers/{id}
Section titled “PATCH /v1/admin/customers/{id}”Update customer
Parameters:
idin path (string, required).
Request body: UpdateCustomerAdminDto.
Responses:
200: Customer updated.400: Invalid input.401: Unauthorized.403: Insufficient permissions.404: Customer not found.
GET /v1/admin/customers/segments
Section titled “GET /v1/admin/customers/segments”List customer segments with counts
Responses:
200: Segments retrieved.401: Unauthorized.403: Insufficient permissions.
Schemas
Section titled “Schemas”UpdateCustomerAdminDto
Section titled “UpdateCustomerAdminDto”firstName(string, max length 100, optional).lastName(string, max length 100, optional).email(string, max length 254, optional).phone(string, max length 30, optional).isActive(boolean, optional).