Skip to main content

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.

Banco Alimentos structures its domain around seven core entities that together cover the full journey of a food donation — from the moment a donor registers a contribution through product cataloguing, invoice generation, and final distribution to beneficiary institutions. Understanding how these entities relate to one another is the foundation for working with any part of the API.

Entity overview

Donante

A legal donor (company or individual) identified by CUIT. Owns one or more donations.

Donacion

A single donation event submitted by a Donante. Carries a lifecycle state and zero or more line items.

ItemDonacion

A line item inside a Donacion. Links a specific Producto to the donation with quantity, unit value, and expiry information.

Producto

A catalogued food or hygiene product, classified by category and unit of measure.

Institucion

A beneficiary institution (soup kitchen, school, etc.) that receives goods via Remito dispatch notes.

Remito

A dispatch note that records an outbound transfer of goods to a single Institucion on a given date.

Factura

An invoice linked one-to-one with a Donacion. A type-C invoice is created automatically when a Donacion is first saved via POST /api/donaciones. A type-A invoice can be created explicitly via the generate endpoint, provided no invoice already exists for that donation.

Entity reference

Donante

Stored in the donantes table. Annotated with @Audited — every change to core fields is tracked by Hibernate Envers. The donaciones association is marked @NotAudited to keep revision history focused on donor data only.
FieldTypeNullableNotes
idLongNoAuto-generated primary key
razonSocialStringNoLegal business name
cuitStringNoArgentine tax ID
telefonoStringNoContact phone number
emailStringNoContact email address
direccionStringNoStreet address
donacionesList<Donacion>Back-reference; @NotAudited

Donacion

Stored in the donaciones table. Each Donacion belongs to exactly one Donante and contains one or more ItemDonacion line items. The estado field drives the donation lifecycle state machine.
FieldTypeNullableNotes
idLongNoAuto-generated primary key (id_donacion)
fechaLocalDateNoDate of the donation
estadoEstadoDonacionNoLifecycle state — see enumerations below
nroRemitoProveedorintYesSupplier-side remito reference number (nro_remito_proveedor)
observacionesStringYesFree-text notes
itemDonacionesList<ItemDonacion>Line items; CascadeType.ALL, orphanRemoval = true
donanteDonante (FK)NoOwning donor (id_donante)

ItemDonacion

Stored in the ItemDonacion table. Acts as the join entity between a Donacion and a Producto, enriched with quantity, monetary, and expiry data. ItemDonacion records are also referenced by DetalleRemito when goods are dispatched outbound.
FieldTypeNullableNotes
idLongNoAuto-generated primary key (id_itemdonacion)
cantidadIntegerNoQuantity donated
valorUnitarioDoubleNoUnit value at donation time
fechaVencimientoDateNoProduct expiry date
productoProducto (FK)NoCatalogued product reference (producto_id)
donacionDonacion (FK)NoOwning donation (id_donacion)

Producto

Stored in the productos table. Represents a product in the catalogue. The combination of categoria and unidadMedida enumerations standardises data entry across all donations.
FieldTypeNullableNotes
idLongNoAuto-generated primary key (id_producto)
nombreStringNoProduct name (max 55 characters)
categoriaCategoriaNoProduct category — see enumerations below
unidadMedidaUnidadMedidaNoUnit of measure — see enumerations below

Institucion

Stored in the institucion table. Annotated with @Audited — institutional profile changes are revision-tracked. An auto-generated UUID (externalId) is used as the stable public identifier for external API references; the internal numeric id is never exposed to callers.
FieldTypeNullableNotes
idLongNoAuto-generated internal primary key (id_institucion)
externalIdUUIDNoPublic-facing identifier; set on @PrePersist, immutable (updatable = false)
nombreStringNoInstitution name
tipotipoInstitucionNoInstitution type — see enumerations below
direccionStringNoStreet address
telefonoStringNoContact phone number
emailStringNoContact email address
estadoestadoPagoNoPayment standing — see enumerations below
remitosList<Remito>Dispatch notes issued to this institution; @NotAudited

Remito

Stored in the remito table. Records a single outbound dispatch of goods to a beneficiary Institucion. Like Institucion, it carries a UUID externalId as its public identifier.
FieldTypeNullableNotes
idLongNoAuto-generated internal primary key (id_remito)
externalIdUUIDNoPublic-facing identifier; set on @PrePersist, immutable (updatable = false)
fechaLocalDateYesDispatch date
institucionInstitucion (FK)YesReceiving institution (id_institucion)

DetalleRemito

Stored in the detalle-remito table. Each row links one Remito to one ItemDonacion, recording how many units of that donation line item are dispatched in that remito.
FieldTypeNullableNotes
idDetalleRemitoLongNoAuto-generated internal primary key
externalIdUUIDNoPublic-facing identifier; set on @PrePersist, immutable (updatable = false)
remitoRemito (FK)YesParent dispatch note (id_remito)
itemDonacionItemDonacion (FK)YesDonation line item being dispatched (id_item_donacion)
cantidadIntegerNoQuantity dispatched in this line

Factura

Stored in the facturas table. A Factura has a strict one-to-one relationship with a Donacion enforced by a unique constraint on the id_donacion column. The invoice type reflects the fiscal category of the transaction.
FieldTypeNullableNotes
idLongNoAuto-generated primary key (id_factura)
donacionDonacion (FK)NoAssociated donation (id_donacion); unique
fechaLocalDateNoInvoice date
tipoTipoFacturaNoFiscal invoice type — see enumerations below

Enumerations

EstadoDonacion

Controls the lifecycle state of a Donacion.
ValueDescription
PENDIENTEInitial state assigned at creation
CONFIRMADADonation confirmed; invoices can be generated
CANCELADADonation soft-cancelled

Categoria

Classifies a Producto into one of 16 food and household product categories.
Value
CEREALES_Y_DERIVADOS
LEGUMBRES
CONSERVAS
LACTEOS
CARNES_Y_PROTEINAS
FRUTAS_Y_VERDURAS
ACEITES_Y_GRASAS
AZUCARES_Y_DULCES
INFUSIONES_Y_BEBIDAS
CONDIMENTOS_Y_SALSAS
PANIFICADOS
ALIMENTOS_INFANTILES
ALIMENTOS_ESPECIALES
PRODUCTOS_DE_HIGIENE
PRODUCTOS_DE_LIMPIEZA
OTROS

UnidadMedida

Defines the unit of measure for a Producto.
ValueDescription
UNIDADIndividual unit
KILOGRAMOKilograms
GRAMOGrams
LITROLitres
MILILITROMillilitres
PAQUETEPackage
CAJABox
BOLSABag
LATACan / tin
BOTELLABottle

tipoInstitucion

Categorises a beneficiary Institucion.
ValueDescription
COMEDORCommunity dining hall
MERENDEROCommunity snack kitchen
ESCUELASchool
OTROOther institution type

estadoPago

Reflects the payment standing of an Institucion.
ValueDescription
AL_DIAUp to date
DEUDORIn arrears
EXCEPCIONALExceptional status

TipoFactura

The fiscal type of a Factura.
ValueNotes
ACreated by the explicit /api/facturas/generar/{idDonacion} endpoint when no invoice exists yet for the donation
BInvoice type available via POST /api/facturas
CAutomatically assigned when a Donacion is first saved via POST /api/donaciones

Relationship diagram

Donante ──< Donacion ──< ItemDonacion >── Producto
                │               │
                │               └──< DetalleRemito >── Remito >── Institucion

                └── Factura (1-to-1)
Institucion, Remito, and DetalleRemito all expose a externalId (UUID) as their stable public identifier. Donante uses its numeric id directly. Never pass internal numeric IDs for entities that carry a UUID externalId — those endpoints accept the UUID form.

Build docs developers (and LLMs) love