Customers API
Manage customer records associated with your channel's organization. Customers are automatically created when you submit tasks with new customer details, or you can create them explicitly.
Create a Customer
POST
/api/v1/customers
Create a new customer record.
{
"name": "Ahmed Hassan",
"phone": "+201234567890",
"email": "ahmed@example.com",
"address": "15 Tahrir Square, Cairo"
}
List Customers
GET
/api/v1/customers?page=1&limit=20
List customers with pagination. Supports filtering by name, phone, or email.
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
search | string | Search by name, phone, or email |
Get a Customer
GET
/api/v1/customers/:id
Retrieve a single customer by ID. Returns the customer with their delivery history summary.
Update a Customer
PATCH
/api/v1/customers/:id
Update customer details. Only include the fields you want to change.
{
"phone": "+201098765432",
"address": "22 Nile Corniche, Giza"
}
Auto-Creation
When you create a task with customer details that don't match an existing customer, a new customer record is automatically created. You don't need to create customers separately unless you want to pre-populate your customer database.
