The Institutions API handles the lifecycle of organizations — such as soup kitchens, snack bars, and schools — that receive food donations through the Banco Alimentos network. Institution records are identified by a UUID (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alvarezlautaro/BancoAlimentos/llms.txt
Use this file to discover all available pages before exploring further.
externalId) rather than a numeric ID, and all mutating endpoints require the ROLE_USER_INSTITUCIONAL role. Read access is available to the deposit, treasury, and institutional roles.
Base URL
Path parameters and request-body IDs use UUID format (e.g.
3fa85f64-5717-4562-b3fc-2c963f66afa6), not a plain numeric Long.Endpoints
List all institutions (paginated)
Bearer token with one of:
ROLE_USER_DEPOSITO, ROLE_USER_TESORERIA, or ROLE_USER_INSTITUCIONAL.Zero-based page index. Default:
0.Number of records per page. Default:
10.Field and direction, e.g.
nombre,asc. Default: nombre.200 OK — Spring Page<InstitucionDTO> envelope.
Get institution by ID
Bearer token with one of:
ROLE_USER_DEPOSITO, ROLE_USER_TESORERIA, or ROLE_USER_INSTITUCIONAL.UUID of the institution.
200 OK — single InstitucionDTO object.
Get institution by name
Bearer token with one of:
ROLE_USER_DEPOSITO, ROLE_USER_TESORERIA, or ROLE_USER_INSTITUCIONAL.Exact name of the institution.
200 OK — single InstitucionDTO object.
Filter by institution type (paginated)
Bearer token with one of:
ROLE_USER_DEPOSITO, ROLE_USER_TESORERIA, or ROLE_USER_INSTITUCIONAL.One of the
tipoInstitucion enum values (see table below).Zero-based page index. Default:
0.Page size. Default:
10.Sort field and direction. Default:
nombre.200 OK — paginated Page<InstitucionDTO>.
Filter by payment status (paginated)
Bearer token with one of:
ROLE_USER_DEPOSITO, ROLE_USER_TESORERIA, or ROLE_USER_INSTITUCIONAL.One of the
estadoPago enum values (see table below).Zero-based page index. Default:
0.Page size. Default:
10.Sort field and direction. Default:
nombre.200 OK — paginated Page<InstitucionDTO>.
Create institution
Bearer token with the
ROLE_USER_INSTITUCIONAL role.NuevaInstitucionDTO
Institution name. At least 3 characters.
Institution type. Must be a valid
tipoInstitucion enum value.Physical address of the institution.
Contact phone number.
Contact email address. Must be a valid email format.
Current payment/subscription status. Must be a valid
estadoPago enum value.201 Created — returns the newly created InstitucionDTO.
Full update
Bearer token with the
ROLE_USER_INSTITUCIONAL role.UUID of the institution to update.
InstitucionDTO fields (see Data models below).
Response — 200 OK — returns the updated InstitucionDTO.
Partial update
Bearer token with
ROLE_USER_INSTITUCIONAL or ROLE_USER_TESORERIA.UUID of the institution to partially update.
ActualizarInstitucionParcialDTO (all fields optional except externalId). Only supplied fields are updated.
Response — 200 OK — returns the updated InstitucionDTO.
Delete institution
Bearer token with the
ROLE_USER_INSTITUCIONAL role.UUID of the institution to delete.
204 No Content
Get audit history
Valid Bearer token.
UUID of the institution whose history to retrieve.
Institucion snapshots representing every revision stored for this institution.
Response — 200 OK — JSON array of institution snapshots.
Data models
NuevaInstitucionDTO
| Field | Type | Required | Constraints |
|---|---|---|---|
nombre | string | ✅ | Not blank; min 3 characters |
tipo | tipoInstitucion | ✅ | Valid enum value |
direccion | string | ✅ | Not blank |
telefono | string | Optional contact phone | |
email | string | Optional; must be a valid email | |
estado | estadoPago | ✅ | Valid enum value |
InstitucionDTO
Unique identifier of the institution.
Institution name (min 3 characters).
Type of institution.
Contact phone number (10–11 digits when provided).
Contact email address.
Current payment status of the institution’s subscription.
ActualizarInstitucionParcialDTO
| Field | Type | Required | Constraints |
|---|---|---|---|
externalId | UUID | ✅ | Must match the path parameter |
nombre | string | Min 3 characters if provided | |
tipo | tipoInstitucion | Valid enum value if provided | |
direccion | string | Optional | |
telefono | string | 10–11 digits if provided | |
email | string | Valid email format if provided | |
estado | estadoPago | Valid enum value if provided |
Enum: tipoInstitucion
| Value | Description |
|---|---|
COMEDOR | Community soup kitchen |
MERENDERO | Afternoon snack bar |
ESCUELA | School |
OTRO | Other organization |
Enum: estadoPago
| Value | Description |
|---|---|
AL_DIA | Subscription payments are current |
DEUDOR | Institution has outstanding dues |
EXCEPCIONAL | Exceptional / waived payment arrangement |
Pagination
All list endpoints use Spring’sPageable mechanism. The response is a standard Spring Page<T> envelope containing:
| Field | Description |
|---|---|
content | Array of items for the current page |
pageable | Pagination metadata (pageNumber, pageSize) |
totalElements | Total number of matching records |
totalPages | Total number of pages |
| Param | Default | Description |
|---|---|---|
page | 0 | Zero-based page number |
size | 10 | Number of items per page |
sort | nombre | Sort field and optional direction (asc/desc) |