This endpoint executesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/factus_challenge/llms.txt
Use this file to discover all available pages before exploring further.
SELECT * FROM {table} against the PostgreSQL database and returns every row found. It is the primary way to populate dropdown lists, data grids, and reference tables on the frontend — for example, fetching all payment methods, municipalities, or customers in a single call.
Endpoint
Path Parameters
Name of the PostgreSQL table to query. The value is interpolated directly into the SQL statement as
SELECT * FROM {table}. Common values used in the reference implementation:| Value | Description |
|---|---|
customer | Registered customers |
products | Product catalogue |
payment_method | Available payment methods |
municipality | Colombian municipalities (lookup table) |
identification_document | Types of identification document |
legal_organization | Legal organisation types |
customer_tribute | Tax / tribute categories for customers |
Responses
200 — OK
Returned when at least one row is found (rowCount > 0).
Always
200 on success.Human-readable confirmation:
"Datos encontrados".Array of row objects returned by PostgreSQL. Each object’s keys correspond to the column names of the queried table.
404 — Not Found
Returned whenrowCount === 0 (the table exists but contains no rows).
404 when no rows are found."No se encontraron datos"500 — Internal Server Error
Returned when the query throws (e.g., the table does not exist, a connection error, etc.).500 on an unhandled exception."Error al obtener los datos"The raw error object thrown by the
pg driver. Contains fields such as code, detail, and message from PostgreSQL.