Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

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.

List all customers

Parameters:

  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • search in query (string, max length 100, optional).
  • segment in query ("ACTIVE", "AT_RISK", "CHURNED", "HIGH_VALUE", "LOYAL", "NEW", "VIP", optional).

Responses:

  • 200: Customers retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Get customer by ID

Parameters:

  • id in path (string, required).

Responses:

  • 200: Customer retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Customer not found.

Update customer

Parameters:

  • id in path (string, required).

Request body: UpdateCustomerAdminDto.

Responses:

  • 200: Customer updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Customer not found.

List customer segments with counts

Responses:

  • 200: Segments retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • firstName (string, max length 100, optional).
  • lastName (string, max length 100, optional).
  • email (string, email, max length 254, optional).
  • phone (string, max length 30, optional).
  • isActive (boolean, optional).
As seen on Open Source Alternatives The Merchant Engine badge