List customers
Returns a paginated list of customers. Use groupId or tagId to filter by segment. Use wilayaId to filter by wilaya.
query Parameters
wilayaIdFilter by wilaya ID (1–58)
Filter by wilaya ID (1–58)
searchSearch by customer name, phone or email
Search by customer name, phone or email
groupIdFilter to customers in a specific customer group
Filter to customers in a specific customer group
tagIdFilter to customers with a specific tag
Filter to customers with a specific tag
limitMaximum number of results to return
Maximum number of results to return
offsetNumber of results to skip for pagination
Number of results to skip for pagination
List customers › Responses
List of customers
Create customer
Register a new customer profile. Resolves wilayaId/communeId to their Arabic display names automatically.
Create customer › Request Body
namephone^0[5-7]\d{8}$ · requiredAlgerian mobile number starting with 05, 06, or 07
wilayaIdOfficial wilaya number (1–58)
communeIdCommune UUID from /api/wilayas/{id}/communes
phone2^0[5-7]\d{8}$Secondary phone number (optional)
emailEmail address (optional); stored lower-cased
addressCreate customer › Responses
Customer created. Response includes the full customer record with recentOrders (empty array for new customers).
successCustomer profile with denormalized purchase statistics
messageGet customer
Returns the full customer record plus recentOrders (up to 10 most recent orders).
path Parameters
idCustomer ID
Customer ID
Get customer › Responses
Customer detail including recentOrders
successCustomer profile with denormalized purchase statistics
Update customer
Partial update — only include fields you want to change. Set phone2, communeId, or address to null to clear them.
path Parameters
idCustomer ID
Customer ID
Update customer › Request Body
namephone^0[5-7]\d{8}$Algerian mobile number starting with 05, 06, or 07
phone2^0[5-7]\d{8}$Secondary phone. Set to null to clear it.
emailEmail address. Set to null or empty to clear it.
wilayaIdOfficial wilaya number (1–58)
communeIdCommune UUID. Set to null to clear.
addressStreet address. Set to null to clear it.
Update customer › Responses
Customer updated. Returns the full updated customer record.
successCustomer profile with denormalized purchase statistics
messageDelete customer
Get customer orders
Returns all orders for a customer in reverse chronological order, each with statusHistory included.
path Parameters
idCustomer ID
Customer ID
Get customer orders › Responses
List of customer orders (each includes statusHistory)
successcountNumber of items returned
Get customer groups
Returns all customer groups the customer belongs to, including the assignedAt timestamp for each membership.
path Parameters
idCustomer ID
Customer ID
Get customer groups › Responses
List of groups the customer belongs to
successGet customer tags
Returns all tags assigned to the customer, including the assignedAt timestamp for each assignment.
path Parameters
idCustomer ID
Customer ID
Get customer tags › Responses
List of tags assigned to the customer
success