Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/160906/Yakultt-App/llms.txt

Use this file to discover all available pages before exploring further.

The Clients API manages the customer directory for Yakult distributors. Each client record stores the essential contact details needed for order delivery — name, phone number, and address. The activo flag determines whether a client appears in order-creation flows; toggling it off lets you retain historical data without exposing the client to new orders. No authentication is required on any clients endpoint.

GET /api/clientes

Returns all client records ordered alphabetically by name, including both active and inactive clients. Example request
curl http://localhost:3000/api/clientes
Example response
[
  {
    "id": 1,
    "nombre": "Minisuper Torres",
    "telefono": "6649876543",
    "direccion": "Av. Revolución 120, Tijuana, BC",
    "activo": 0,
    "creado_en": "2025-01-06T11:30:00.000Z"
  },
  {
    "id": 2,
    "nombre": "Tienda López",
    "telefono": "6641234567",
    "direccion": "Calle Morelos 45, Tijuana, BC",
    "activo": 1,
    "creado_en": "2025-01-05T10:00:00.000Z"
  }
]
id
number
Unique numeric ID of the client.
nombre
string
Business or customer name.
telefono
string
Phone number used for WhatsApp order updates.
direccion
string
Delivery address.
activo
number
Account status as a TINYINT: 1 = active, 0 = inactive.
creado_en
string
ISO 8601 timestamp of when the record was created.

POST /api/clientes

Creates a new client record. Newly created clients are active by default. No authentication is required.
nombre
string
required
Business or customer name, e.g. "Tienda López".
telefono
string
required
Phone number. Used to send WhatsApp notifications on order status changes.
direccion
string
required
Full delivery address.
Example request
curl -X POST http://localhost:3000/api/clientes \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Tienda López",
    "telefono": "6641234567",
    "direccion": "Calle Morelos 45, Tijuana, BC"
  }'
Example response
{
  "id": 1,
  "nombre": "Tienda López",
  "telefono": "6641234567",
  "direccion": "Calle Morelos 45, Tijuana, BC",
  "activo": true
}
id
number
Auto-generated ID assigned to the new client.
nombre
string
Client name as stored.
telefono
string
Phone number as stored.
direccion
string
Delivery address as stored.
activo
boolean
Always true for a newly created client.

PUT /api/clientes/:id

Updates the name, phone number, and address of an existing client. Supply all three fields. No authentication is required.
id
number
required
Numeric ID of the client to update.
nombre
string
required
Updated client name.
telefono
string
required
Updated phone number.
direccion
string
required
Updated delivery address.
Example request
curl -X PUT http://localhost:3000/api/clientes/1 \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Tienda López Renovada",
    "telefono": "6641234567",
    "direccion": "Calle Morelos 45, Local 2, Tijuana, BC"
  }'
Example response
{ "ok": true }

PUT /api/clientes/:id/activo

Enables or disables a client without deleting their record. Inactive clients are excluded from new order creation. No authentication is required.
id
number
required
Numeric ID of the client to update.
activo
boolean
required
Pass true to re-activate the client or false to deactivate them.
Example request
curl -X PUT http://localhost:3000/api/clientes/1/activo \
  -H "Content-Type: application/json" \
  -d '{ "activo": false }'
Example response
{ "ok": true }

DELETE /api/clientes/:id

Permanently deletes a client record. Consider using PUT /api/clientes/:id/activo with activo: false to preserve order history. No authentication is required.
id
number
required
Numeric ID of the client to delete.
Example request
curl -X DELETE http://localhost:3000/api/clientes/1
Example response
{ "ok": true }

Build docs developers (and LLMs) love