Customers API
Create and manage customer records. Customer data can be linked to orders and reservations for a personalised service experience.
Customer Object
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | Required | Unique customer identifier |
restaurant_id | uuid | Required | Owning restaurant |
first_name | string | Required | Customer first name |
last_name | string | Optional | Customer last name |
email | string | Optional | Email address |
phone | string | Optional | Phone number |
notes | string | Optional | Internal notes about the customer |
birthday | string (date) | Optional | Birthday in YYYY-MM-DD format |
created_at | string (datetime) | Required | ISO 8601 creation timestamp |
updated_at | string (datetime) | Required | ISO 8601 last-update timestamp |
List Customers
GET
/api/customersProtectedRetrieve all customers for the current restaurant. Supports an optional search query parameter to filter by name, email, or phone.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
search | string | Optional | Search by name, email, or phone number |
bash
curl -X GET __PH1__Authorization: Bearer <token>"json
// Response 200
{
__PH1__: [
{
__PH2__: "cust-uuid",
__PH4__: "Hans",
__PH6__: "Schmidt",
__PH8__: "hans@example.com",
__PH10__: "+49 170 1234567",
__PH12__: "Prefers window seating",
__PH14__: "1985-06-15",
__PH16__: "2026-01-10T14:30:00Z",
__PH18__: "2026-03-18T09:00:00Z"
}
]
}Get Customer
GET
/api/customers/{id}ProtectedRetrieve a single customer by ID.
json
// Response 200
{
__PH1__: "cust-uuid",
__PH3__: "Hans",
__PH5__: "Schmidt",
__PH7__: "hans@example.com",
__PH9__: "+49 170 1234567",
__PH11__: "Prefers window seating",
__PH13__: "1985-06-15",
__PH15__: "2026-01-10T14:30:00Z",
__PH17__: "2026-03-18T09:00:00Z"
}Create Customer
POST
/api/customersProtectedCreate a new customer record.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | Required | Customer first name |
last_name | string | Optional | Customer last name |
email | string | Optional | Email address |
phone | string | Optional | Phone number |
notes | string | Optional | Internal notes |
birthday | string (date) | Optional | Birthday in YYYY-MM-DD format |
json
// Request
{
__PH2__: "Anna",
__PH4__: "Mueller",
__PH6__: "anna.mueller@example.com",
__PH8__: "+49 160 9876543",
__PH10__: "1990-12-03"
}
// Response 201
{
__PH12__: "new-cust-uuid",
__PH14__: "Anna",
__PH16__: "Mueller",
__PH18__: "anna.mueller@example.com",
__PH20__: "+49 160 9876543",
__PH22__: null,
__PH23__: "1990-12-03",
__PH25__: "2026-03-20T11:00:00Z",
__PH27__: "2026-03-20T11:00:00Z"
}Update Customer
PUT
/api/customers/{id}ProtectedPartially update a customer record. Only the provided fields are changed.
json
// Request
{
__PH2__: "VIP - always reserve table 5",
__PH4__: "+49 160 1112233"
}
// Response 200
{
__PH6__: "cust-uuid",
__PH8__: "Anna",
__PH10__: "Mueller",
__PH12__: "anna.mueller@example.com",
__PH14__: "+49 160 1112233",
__PH16__: "VIP - always reserve table 5",
__PH18__: "1990-12-03",
__PH20__: "2026-03-20T11:00:00Z",
__PH22__: "2026-03-20T14:20:00Z"
}Delete Customer
DELETE
/api/customers/{id}ProtectedDelete a customer record.
Permanent Deletion
This action permanently removes the customer record. Existing orders and reservations linked to this customer will retain the customer name for historical reference but will no longer reference the customer ID.
json
// Response 200
{
__PH1__: "Customer deleted successfully"
}