The Customers API manages the restaurant’s guest directory. Customer records are linked to both orders and reservations, allowing staff to track visit history and personalise the dining experience. All endpoints require a valid JWT in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FloresJesus/SS_RESTAURANT/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <token> header. No additional role restriction is applied — any authenticated user may access these routes.
Endpoint overview
| Method | Path | Description |
|---|---|---|
GET | /api/customers | List all customers (supports search) |
GET | /api/customers/:id | Get a customer by ID |
POST | /api/customers | Create a new customer |
PUT | /api/customers/:id | Update a customer |
DELETE | /api/customers/:id | Delete a customer |
Customer object
Unique customer identifier.
Customer’s full name.
Customer’s phone number.
Customer’s email address, or
null if not provided.ISO timestamp of when the record was created.
Example customer object
GET /api/customers
Returns all customer records sorted by creation time descending. Accepts an optionalsearch query parameter to filter by name, phone, or email using a case-insensitive partial match.
GET /api/customers/:id
Returns a single customer record. Returns404 if no customer with the given ID exists.
POST /api/customers
Creates a new customer record. Returns201 on success.
Request body
Customer’s full name.
Customer’s phone number. Used as a natural key by the public reservations endpoint.
Customer’s email address. Optional — stored as
null if omitted.Example request
Example response
PUT /api/customers/:id
Replaces a customer record with the provided values.nombre and telefono are required. Returns 404 if the customer does not exist.
Updated full name.
Updated phone number.
Updated email address. Pass
null explicitly to clear it.DELETE /api/customers/:id
Permanently removes a customer record. Returns404 if not found.
Automatic customer creation
When a booking is submitted through the public reservation endpoint (
POST /api/public/reservations), the server always creates a new customer record using the nombre, telefono, and email fields from the request. No de-duplication is performed — if a customer with that phone number already exists, a second record is inserted. Use GET /api/customers?search=<phone> to check for existing records before creating one manually.