Customers API

Create and manage customer records. Customer data can be linked to orders and reservations for a personalised service experience.

Customer Object

NameTypeRequiredDescription
iduuidRequiredUnique customer identifier
restaurant_iduuidRequiredOwning restaurant
first_namestringRequiredCustomer first name
last_namestringOptionalCustomer last name
emailstringOptionalEmail address
phonestringOptionalPhone number
notesstringOptionalInternal notes about the customer
birthdaystring (date)OptionalBirthday in YYYY-MM-DD format
created_atstring (datetime)RequiredISO 8601 creation timestamp
updated_atstring (datetime)RequiredISO 8601 last-update timestamp

List Customers

GET/api/customersProtected

Retrieve all customers for the current restaurant. Supports an optional search query parameter to filter by name, email, or phone.

Query Parameters

NameTypeRequiredDescription
searchstringOptionalSearch 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}Protected

Retrieve 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/customersProtected

Create a new customer record.

Request Body

NameTypeRequiredDescription
first_namestringRequiredCustomer first name
last_namestringOptionalCustomer last name
emailstringOptionalEmail address
phonestringOptionalPhone number
notesstringOptionalInternal notes
birthdaystring (date)OptionalBirthday 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}Protected

Partially 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}Protected

Delete a customer record.

json
// Response 200
{
  __PH1__: "Customer deleted successfully"
}