Skip to main content

Documentation 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.

The Settings API exposes a single configuration record (row id = 1 of the configuracion table) that holds the restaurant’s display information: its trading name, street address, telephone number, and NIT (tax identification). This data appears in the header of every PDF report generated by the system, so keeping it accurate ensures all printed documents reflect the correct restaurant identity. If the configuration row does not yet exist, GET /api/settings returns an empty object. Both endpoints require the admin role.

Endpoints

MethodPathAuthDescription
GET/api/settingsadminRetrieve the current configuration
PUT/api/settingsadminUpdate the configuration

GET /api/settings

Returns the current restaurant configuration. If the configuracion table contains no row with id = 1, an empty object is returned rather than a 404.
curl -X GET https://api.example.com/api/settings \
  -H "Authorization: Bearer <token>"
Response 200 OK:
{
  "nombre_restaurante": "SAN SALVADOR",
  "direccion": "Av. Principal 123, Santa Cruz",
  "telefono": "+591 3 3456789",
  "nit": "1234567890"
}
nombre_restaurante
string
Restaurant trading name. Displayed as the title in PDF report headers. The report generator falls back to "SAN SALVADOR" if this field is empty.
direccion
string
Street address printed below the name in report headers. Empty string if not set.
telefono
string
Contact telephone number printed alongside the address. Empty string if not set.
nit
string
Restaurant NIT (Número de Identificación Tributaria). Printed on invoices and report headers. Empty string if not set.

PUT /api/settings

Updates the restaurant configuration. nombre_restaurante is the only required field; omitting direccion, telefono, or nit stores an empty string for those fields.

Request body

nombre_restaurante
string
required
Restaurant trading name. Used as the primary heading in all generated PDF reports.
direccion
string
Street address. Appears on the second line of PDF report and invoice headers.
telefono
string
Contact phone number. Appears alongside the address in PDF headers.
nit
string
Restaurant NIT. Printed as NIT: <value> in PDF report headers and referenced during invoice generation.
curl -X PUT https://api.example.com/api/settings \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre_restaurante": "SAN SALVADOR",
    "direccion": "Av. Principal 123, Santa Cruz",
    "telefono": "+591 3 3456789",
    "nit": "1234567890"
  }'
Response 200 OK:
{ "message": "Configuracion actualizada correctamente" }

Error responses

StatusCondition
400nombre_restaurante is missing or empty
500Database or internal error

Settings are read every time a PDF is generated — there is no caching. Updating the configuration takes effect immediately for all subsequent report generation requests.
The direccion and telefono fields are rendered as a single pipe-separated line in the PDF header (e.g., Av. Principal 123 | +591 3 3456789). If either field is empty, only the non-empty value is shown with no trailing pipe.

Build docs developers (and LLMs) love