GestionCervecera API beta
REST API for server-to-server integrations. JSON over HTTPS, JWT authentication.
API REST para integraciones servidor a servidor. JSON sobre HTTPS, autenticación JWT.
This API is in beta. It works and it is documented, but it has not yet been used by an integration in production. Expect rough edges, and tell us when you hit one: at this stage a report changes the API, which is the point of a beta.
What beta does not mean: it does not mean the contract moves under your feet. Within
/api/v1 we only add — new endpoints and new fields. Anything that would break a working
integration goes in a new version, with at least 90 days' notice. Build against it as
you would against any other version.
So give us a technical contact. Notice we cannot deliver is not notice: send the email address of whoever maintains the integration to desarrollo@gestioncervecera.com when you start. It is not the same address as your brewery's commercial contact, and it is the only way we can warn you before something changes.
Esta API está en beta. Funciona y está documentada, pero todavía ningún sistema la usó en producción. Es esperable que aparezcan asperezas: si encuentra una, avísenos. En esta etapa un reporte cambia la API, que es justamente para lo que sirve una beta.
Lo que beta no significa: no significa que el contrato se le mueva abajo de los pies.
Dentro de /api/v1 sólo agregamos — endpoints nuevos y campos nuevos. Todo lo que
rompa una integración que ya funciona va en una versión nueva, con un preaviso
mínimo de 90 días. Constrúyala con la misma confianza que
cualquier otra versión.
Por eso, dénos un contacto técnico. Un preaviso que no se puede entregar no es un preaviso: mandános el mail de quien mantiene la integración a desarrollo@gestioncervecera.com cuando arranque. No es el mismo que el contacto comercial de la fábrica, y es la única forma que tenemos de avisarle antes de que algo cambie.
OverviewIntroducción
This API lets an external system read and maintain your account's master data: customers with their points of sale and contacts, suppliers, products and price lists, recipes, supplies and their warehouses, production batches and tasks, and purchases — plus your catalogs and reports.
/api/v1Your token is bound to a single account, and that binding is signed into the token: it always resolves to your own data, whatever parameters you send.
Esta API le permite a un sistema externo leer y mantener los datos maestros de su cuenta: clientes con sus puntos de venta y contactos, proveedores, productos y listas de precios, recetas, insumos y sus depósitos, lotes y tareas de producción, y compras — más sus catálogos y sus informes.
/api/v1Su token está atado a una sola cuenta, y esa relación va firmada dentro del token: siempre resuelve a sus propios datos, sin importar qué parámetros envíe.
What this API does not do. This version is built for master data: the records your systems need to stay in sync. The following operations are not available, and there is no endpoint for them — they are done in the application:
- Creating orders and invoicing. No orders, invoices or credit notes are created, edited, approved, delivered or invoiced through the API. Orders can be read — see Orders — but invoices and credit notes are not read back.
- Point of sale. The counter-sale flow — open register, combos, payment and receipt
in one step — is not exposed. This is unrelated to
/customers/{id}/points-of-sale, which is available and means your customer's branches. - Packaging runs. Turning beer into packaged product is not exposed. Recipes, supplies and packagings are.
- Electronic documents in collections. Electronic receipts and electronic delivery guides are not issued through the API.
- Delivery routes. Route sheets and their assignment are not exposed.
- Operations that continue into a second step. Where the application asks you something after an action and then does more work — yeast reuse when a batch changes stage is the clearest case — the API exposes only the part that completes on its own, and says so in that section. It never leaves an operation half done.
Each of these is a decision about this version, not a permanent one. If your integration needs one, tell us: it helps us prioritise.
Qué no hace esta API. Esta versión está hecha para datos maestros: los registros que sus sistemas necesitan para mantenerse sincronizados. Las siguientes operaciones no están disponibles, y no hay endpoint para ellas — se hacen desde la aplicación:
- Crear pedidos y facturar. Por la API no se crean, editan, aprueban, entregan ni facturan pedidos, y no se emiten facturas ni notas de crédito. Los pedidos sí se pueden leer — ver Pedidos —; las facturas y notas de crédito no.
- Punto de venta. El flujo de venta en mostrador —caja abierta, combos, cobro y
comprobante en un solo paso— no está expuesto. No tiene relación con
/customers/{id}/points-of-sale, que sí está disponible y son las sucursales de su cliente. - Envasado. Pasar cerveza a producto envasado no está expuesto. Recetas, insumos y envases sí.
- Documentos electrónicos en cobranzas. Los recibos electrónicos y las guías electrónicas no se emiten por la API.
- Hoja de ruta. Las hojas de reparto y su asignación no están expuestas.
- Operaciones que siguen en un segundo paso. Donde la aplicación le pregunta algo después de una acción y entonces hace más trabajo —la reutilización de levaduras al cambiar la etapa de un lote es el caso más claro— la API expone solo la parte que se completa sola, y lo aclara en esa sección. Nunca deja una operación a medias.
Cada una de estas es una decisión sobre esta versión, no algo definitivo. Si su integración necesita alguna, avísenos: nos ayuda a priorizar.
EnvironmentsEntornos
| Environment | Base URL | Use it for |
|---|---|---|
| QA | https://apiqa.gestioncervecera.com/api/v1 | Integrating and testing. Test data. |
| Production | https://api.gestioncervecera.com/api/v1 | Only after validating in QA. |
| Entorno | URL base | Para qué |
|---|---|---|
| QA | https://apiqa.gestioncervecera.com/api/v1 | Integrar y probar. Datos de prueba. |
| Producción | https://api.gestioncervecera.com/api/v1 | Solo después de validar en QA. |
Both hosts serve this same documentation at their root, so
https://apiqa.gestioncervecera.com is a valid bookmark. Start with
GET /api/v1/health: it needs no token and answers
{"status":"ok"}, so you can tell "the API is unavailable" from "my token is wrong"
before opening a ticket.
Los dos hosts sirven esta misma documentación en su raíz, así que
https://apiqa.gestioncervecera.com sirve como marcador. Empiece por
GET /api/v1/health: no necesita token y responde
{"status":"ok"}, así puede distinguir "la API no está disponible" de "mi
token está mal" antes de abrir un ticket.
CredentialsCredenciales
There is one credential: your account's API key. No user name, no password. The account owner finds it in Settings and hands it to you.
A person's login never works here, and that is deliberate. If your integration authenticated as an employee, the day that person leaves or changes their password your integration would stop without warning — and every record it wrote would look as if that person had written it. The API key belongs to the account, not to anyone.
Treat it like a password: it is the whole credential. Keep it out of source control, out of URLs and out of logs. If it leaks, ask the account owner to have it replaced.
You do not request permissions. The key grants exactly what this API's endpoints need and nothing else — there is no request that reaches anything outside what is documented here.
Hay una sola credencial: la API key de su cuenta. Sin usuario y sin contraseña. El dueño de la cuenta la encuentra en Configuración y se la entrega.
El login de una persona nunca funciona acá, y es deliberado. Si su integración se autenticara como un empleado, el día que esa persona se va o cambia su contraseña la integración se detendría sin aviso — y cada registro que escribió figuraría como hecho por esa persona. La API key es de la cuenta, no de nadie en particular.
Trátela como una contraseña: es toda la credencial. Fuera del control de versiones, fuera de las URLs y fuera de los logs. Si se filtra, pídale al dueño de la cuenta que la reemplace.
No hay permisos que pedir. La clave habilita exactamente lo que necesitan los endpoints de esta API y nada más: no existe ningún pedido que llegue a algo que no esté documentado acá.
Postman and toolsPostman y herramientas
The full machine-readable contract is published as OpenAPI 3:
/api/v1/openapi.json
Every tool in the ecosystem reads it directly, so there is no separate collection to keep in sync:
- Postman — Import → Link, paste the URL above. You get every endpoint, its parameters and its schemas as a ready-to-run collection.
- Insomnia, Bruno, Hoppscotch — same import-from-URL flow.
- Client generators — openapi-generator, NSwag or Kiota will produce a typed client in your language from the same file.
- API reference — browse and try every endpoint in the browser, with request snippets in cURL, C#, JavaScript, Python and others.
The specification is generated from the running server, so it always matches the deployed version. Re-import it after an upgrade instead of editing your collection by hand.
El contrato completo, legible por máquina, se publica como OpenAPI 3:
/api/v1/openapi.json
Todas las herramientas del ecosistema lo leen directo, así que no hay una colección aparte que mantener sincronizada:
- Postman — Import → Link y pegue la URL de arriba. Obtiene todos los endpoints, sus parámetros y sus schemas como una colección lista para ejecutar.
- Insomnia, Bruno, Hoppscotch — el mismo flujo de importar desde URL.
- Generadores de clientes — openapi-generator, NSwag o Kiota generan un cliente tipado en su lenguaje a partir del mismo archivo.
- Referencia de la API — recorra y pruebe cada endpoint desde el navegador, con snippets en cURL, C#, JavaScript, Python y otros.
La especificación se genera desde el servidor en ejecución, así que siempre coincide con la versión desplegada. Vuelva a importarla después de una actualización en lugar de editar su colección a mano.
AuthenticationAutenticación
Log in once and reuse the access token. Do not log in on every request.
Autentique una vez y reutilice el token de acceso. No se autentique en cada request.
# 1) Login — ONCE, not on every request
curl -X POST https://api.gestioncervecera.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"apiKey": "<your account's API key>",
"deviceName": "<a label for this client>"
}'
# 1) Login — UNA VEZ, no en cada request
curl -X POST https://api.gestioncervecera.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"apiKey": "<la API key de su cuenta>",
"deviceName": "<una etiqueta para este cliente>"
}'
The response carries accessToken, expiresIn and an
account object. There is no refresh token — see below. Exact fields are in the
API reference.
La respuesta trae accessToken, expiresIn y un objeto
account. No hay refresh token — vea más abajo. Los campos exactos están en la
referencia de la API.
deviceName is a free-form label for your client, used for auditing: it is how
support tells your staging environment apart from your production one when reading the logs. Send it.
deviceName es una etiqueta libre para identificar su cliente, y se usa para
auditoría: es lo que permite distinguir en los registros su entorno de pruebas del productivo.
Envíelo.
# 2) Use the accessToken on every call
curl "https://api.gestioncervecera.com/api/v1/customers?page=1&pageSize=50" \
-H "Authorization: Bearer <accessToken>"
# 3) On 401, log in again (step 1) and retry the call once
# 2) Use el accessToken en cada llamada
curl "https://api.gestioncervecera.com/api/v1/customers?page=1&pageSize=50" \
-H "Authorization: Bearer <accessToken>"
# 3) Ante un 401, autentique de nuevo (paso 1) y reintente la llamada una vez
The accessToken lasts 8 hours. When it expires, log in again with your API
key. That is the whole renewal flow: one call, no stored state, and safe to run from several
processes at the same time.
Do not treat 8 hours as a guarantee: read expiresIn from the login response instead of
hard-coding it, and handle a 401 anyway. A token can stop being accepted before it expires — for
instance if the integration user is deactivated.
El accessToken dura 8 horas. Cuando vence, autentique de nuevo con su API
key. Ese es todo el flujo de renovación: una llamada, sin estado que guardar, y se puede
ejecutar desde varios procesos a la vez sin problema.
No tome las 8 horas como garantía: lea expiresIn de la respuesta del login en vez
de fijarlo en el código, y maneje igual el 401. Un token puede dejar de ser aceptado antes de
vencer — por ejemplo si se inactiva el usuario de integración.
Implement it exactly like this:
Implémentelo exactamente así:
call(request):
response = send(request, accessToken)
if response.status == 401:
accessToken = login(apiKey) # step 1, again
response = send(request, accessToken) # ONE single retry
return response
llamar(request):
respuesta = enviar(request, accessToken)
if respuesta.status == 401:
accessToken = login(apiKey) # paso 1, otra vez
respuesta = enviar(request, accessToken) # UN solo reintento
return respuesta
One single retry. A retry loop on 401 produces a login storm and ends in a block. Login attempts are rate limited per API key and IP.
Un solo reintento. Un bucle de reintentos ante un 401 genera una tormenta de logins y termina en un bloqueo. Los intentos de login están limitados por API key y por IP.
There is no refresh token, and no logout
No hay refresh token ni logout
/auth/login is the only authentication endpoint. There is no
/auth/refresh and no /auth/logout, and the login response contains no
refreshToken. This is deliberate, and it is the design that suits automated clients.
/auth/login es el único endpoint de autenticación. No existe
/auth/refresh ni /auth/logout, y la respuesta del login no trae ningún
refreshToken. Es deliberado, y es el diseño que le conviene a un cliente
automatizado.
A rotating refresh token has to be stored, kept current, and renewed exactly once at a time. Clients that run several requests in parallel — agents especially — hit the same expiry from several places at once, and one of those renewals loses. Logging in again has none of that: it is idempotent, holds no state, and is safe to call from as many processes as you like. You already store the API key, so there is no second secret to look after.
Un refresh token que rota hay que guardarlo, mantenerlo al día y renovarlo exactamente de a uno por vez. Los clientes que corren varios requests en paralelo —los agentes sobre todo— chocan con el mismo vencimiento desde varios lados a la vez, y una de esas renovaciones pierde. Volver a autenticarse no tiene nada de eso: es idempotente, no guarda estado y se puede llamar desde tantos procesos como quiera. La API key ya la guarda igual, así que no hay un segundo secreto que cuidar.
To cut access immediately, the account owner deactivates the integration user from the Users screen. That takes effect on the very next request, without waiting for any token to expire.
Para cortar el acceso de inmediato, el dueño de la cuenta inactiva el usuario de integración desde la pantalla de Usuarios. Tiene efecto en el request siguiente, sin esperar a que venza ningún token.
PermissionsPermisos
The API key grants a fixed set of permissions: exactly what the endpoints below need. You cannot ask for more, and there is nothing to configure. Anything not listed in this documentation has no endpoint, so no key can reach it.
La API key habilita un conjunto fijo de permisos: exactamente lo que necesitan los endpoints de abajo. No se puede pedir más y no hay nada que configurar. Todo lo que no esté en esta documentación no tiene endpoint, así que ninguna clave llega.
| Endpoints | Permission it needs |
|---|---|
/auth/*, /health | None. /health needs no token at all |
GET /customers, GET /customers/{id} and its sub-resources | Cliente |
Every write on /customers, its points of sale and its contacts | CrearEditarCliente |
GET /customers/{id}/balance | CtaCteCliente |
Country reference catalogs: /tax-conditions, /provinces, /payment-terms, and the fiscal ones | None |
Account catalogs: /price-lists, /customer-types, /currencies, /sales-reps, /logistics-providers, /customer-categories | Cliente |
GET /brands, GET /brands/{id} | Marcas |
POST/PUT on /brands | CrearEditarMarcas |
/brands/{id}/deactivate | EliminarMarcas |
GET /promotions, GET /promotions/{id} | Promociones |
POST/PUT on /promotions | CrearEditarPromocion |
/promotions/{id}/deactivate | EliminarPromocion |
GET /suppliers, GET /suppliers/{id}, /supplier-categories, /expense-accounts | Proveedor |
POST and PUT on /suppliers | CrearEditarProveedor |
/suppliers/{id}/deactivate and /activate | EliminarProveedor |
Everything under /purchases except /cancel, plus the purchase catalogs: /voucher-types, /payment-types, /supplies, /complementary-products, /purchasable-services, /spare-parts, /supply-warehouses | Compras |
everything on /purchase-orders | OrdenDeCompra |
everything on /keg-purchase-orders and on /distributor-purchases | CompraDistribuidora |
everything on /distributor-services — and the Duenio role on top, same as the web application's own service screens | Distribuidora |
/purchases/{id}/cancel | EliminarCompra |
GET /services, GET /services/{id} | Servicio |
POST and PUT on /services | CrearEditarServicio |
/services/{id}/deactivate and /activate | EliminarServicio |
GET /products, GET /products/{id}, /products/{id}/categories, /product-categories, /containers, /cases | Productos |
POST and PUT on /products | CrearEditarProducto |
/products/{id}/deactivate and /activate | EliminarProducto |
Everything under /products/{id}/stock, including /pack and /unpack | Stock |
GET on /batches, and /batches/{id}/extended-notes (both verbs) | Lote |
POST and PUT on /batches | CrearEditarLote |
/batches/{id}/stage | CambiarEtapaDeUnLote |
/batches/{id}/deactivate and /activate | EliminarLote |
/batches/{id}/tasks/{taskId}/complete and /reopen | ProduccionCompletarTarea |
GET on /batches/{id}/measurements | Mediciones |
everything on /batches/{id}/waste | Produccion |
everything on /tanks — which is also the catalog of tankId | Tanque |
everything on /tasks and /task-definitions | Tareas |
everything on /price-lists | ListaDePrecio |
everything on /costings | Costeo |
everything on /waste-groups | ProyectarVentas |
/keg-volumes — the only catalog that reads your configuration | Barril |
GET on /kegs | Barril |
POST on /kegs | CrearEditarBarril |
PUT on /kegs | EditarBarril |
/kegs/{id}/deactivate and /activate | EliminarBarril |
POST /kegs/transfers | TrasladoBarrilesEntreClientes |
POST /kegs/{id}/release-reservation | Stock or LiberarBarril |
POST /kegs/{id}/empty | IngresoDisminucionStock |
POST /kegs/{id}/discard | Barril |
POST /kegs/{id}/return | DevolucionBarriles |
POST /kegs/returns-to-supplier | DevolucionBarrilesProveedor |
POST /kegs/clean and /undo-clean | BarrilLimpieza |
GET /kegs/{id}/movements | SeguimientoBarril or Barril |
everything on /tap-systems | ChoperasABM |
POST /tap-systems/deliveries | EntregaDevolucionChoperas |
everything on /supplies, and /ila-types | Insumos |
/supplies/{id}/stock and /supplies/{id}/batches | StockInsumos |
/supplies/{id}/stock/adjustments and /counts | StockInsumos or Stock |
/supplies/projection | ProyeccionInsumos |
GET on /warehouses — which is also the catalog of warehouseId | Depositos |
POST and PUT on /warehouses | CrearEditarDepositos |
/warehouses/{id}/deactivate and /activate | EliminarDepositos |
GET on /supply-warehouses | DepositoInsumo |
POST and PUT on /supply-warehouses | DepositoInsumoCrearEditar |
/supply-warehouses/{id}/deactivate and /activate | DepositoInsumoEliminar |
GET and POST on /stock-movements, plus /supply-warehouses/{id}/transfers | MovimientosDepositos |
GET on /stock-valuation and /stock-valuation-cost | InformesStock |
GET on /raw-material-valuation | InformesProductos |
everything on /mix-packs | Envasado |
GET on /recipes | Receta |
POST on /recipes | CrearEditarReceta |
PUT on /recipes | EditarReceta |
/recipes/{id}/deactivate and /activate | EliminarReceta |
Fixed reference catalogs: /supplier-types, /purchase-types, /units, /product-types | None |
GET on /notifications | None — same as the fixed catalogs above; the web application itself gates this with nothing more than being logged in |
everything on /leads | Leads |
GET on /audit | Informes or Administracion — same gate as the web application's own audit report |
everything on /files (published so far: POST, GET, GET .../content, .../deactivate) | None — same as the web application itself |
everything on /invitations | InvitarCliente module and the Administracion role — both required, same as the web application's own invitation action |
everything on /external-users except .../activate | Duenio role, no module — same as the web application itself |
POST on /external-users/{id}/activate | Administracion role, no module — a laxer requirement than the rest of this resource, same asymmetry the web application itself has |
/external-user-products | Products and Customers modules, no role — same as the web application itself. Also needs portal product assignment enabled for your account, otherwise every action answers 404 |
/distributor-purchases | Distributor purchases module, no role — the same module /keg-purchase-orders already uses |
GET on /checks, and the treasury catalogs: /banks, /check-statuses, /check-kinds | Cheques |
POST/PUT on /checks, and /checks/{id}/collect | IngresoEgresoCheques |
/checks/{id}/deactivate | EliminarCheques |
/withholdings | Informes — same permission that already gates seeing this data through the Withholdings report screen |
GET on /bank-accounts | CuentasBancarias |
POST/PUT on /bank-accounts | CrearEditarCuentasBancarias |
/bank-accounts/{id}/deactivate and /activate | EliminarCuentasBancarias |
GET and POST on /bank-accounts/{id}/movements | MovimientosCuentasBancarias |
everything on /chart-of-accounts, and /account-categories | Cuenta |
GET on /cash-registers | CajasUsuario |
POST/PUT on /cash-registers | CrearEditarCajaUsuario |
/cash-registers/{id}/deactivate and /activate | EliminarCajaUsuario |
GET on /cash-registers/{id}/movements, and /open and /close | Cajas |
GET on /orders | Pedidos |
GET on /delivery-notes | EntregasVerRemito |
GET on /collections | Cobranzas |
POST on /collections | CrearEditarCobranza |
GET/POST/PUT on /returnable-packaging | Produccion |
everything on /account | Configuraciones |
GET on /maintenances, and /maintenances/{id}/deactivate//activate | Mantenimiento |
POST on /maintenances, /maintenances/{id}/start and /maintenances/{id}/recur | Mantenimiento and IniciarMantenimiento |
POST on /maintenances/{id}/finish | Mantenimiento and FinalizarMantenimiento |
POST on /maintenances/{id}/reschedule | Mantenimiento |
GET on /spare-parts | Repuesto |
POST on /spare-parts | CrearRepuesto |
PUT on /spare-parts, and /spare-parts/{id}/deactivate//activate | EditarRepuesto |
GET on /event-categories | EventoAgenda |
POST on /event-categories, and /event-categories/{id}/activate | CrearEditarCategoriaEvento |
PUT on /event-categories | CrearEditarCategoriaEvento |
/event-categories/{id}/deactivate | EliminarCategoriaEvento |
GET on /calendar-events | EventoAgenda |
POST on /calendar-events, and /calendar-events/{id}/activate | CrearEditarEventoAgenda |
PUT on /calendar-events | CrearEditarEventoAgenda |
/calendar-events/{id}/deactivate | EliminarEventoAgenda |
| Endpoints | Permiso que necesita |
|---|---|
/auth/*, /health | Ninguno. /health no necesita ni token |
GET /customers, GET /customers/{id} y sus sub-recursos | Cliente |
Toda escritura sobre /customers, sus puntos de venta y sus contactos | CrearEditarCliente |
GET /customers/{id}/balance | CtaCteCliente |
Catálogos de referencia del país: /tax-conditions, /provinces, /payment-terms y los fiscales | Ninguno |
Catálogos de la cuenta: /price-lists, /customer-types, /currencies, /sales-reps, /logistics-providers, /customer-categories | Cliente |
GET /brands, GET /brands/{id} | Marcas |
POST/PUT sobre /brands | CrearEditarMarcas |
/brands/{id}/deactivate | EliminarMarcas |
GET /promotions, GET /promotions/{id} | Promociones |
POST/PUT sobre /promotions | CrearEditarPromocion |
/promotions/{id}/deactivate | EliminarPromocion |
GET /suppliers, GET /suppliers/{id}, /supplier-categories, /expense-accounts | Proveedor |
POST y PUT sobre /suppliers | CrearEditarProveedor |
/suppliers/{id}/deactivate y /activate | EliminarProveedor |
Todo lo que cuelga de /purchases menos /cancel, más los catálogos de compras: /voucher-types, /payment-types, /supplies, /complementary-products, /purchasable-services, /spare-parts, /supply-warehouses | Compras |
todo /purchase-orders | OrdenDeCompra |
todo /keg-purchase-orders y todo /distributor-purchases | CompraDistribuidora |
todo /distributor-services — y además el rol Duenio, igual que las pantallas de servicios de la propia aplicación web | Distribuidora |
/purchases/{id}/cancel | EliminarCompra |
GET /services, GET /services/{id} | Servicio |
POST and PUT on /services | CrearEditarServicio |
/services/{id}/deactivate and /activate | EliminarServicio |
GET /products, GET /products/{id}, /products/{id}/categories, /product-categories, /containers, /cases | Productos |
POST y PUT sobre /products | CrearEditarProducto |
/products/{id}/deactivate y /activate | EliminarProducto |
Todo lo que cuelga de /products/{id}/stock, incluidos /pack y /unpack | Stock |
GET sobre /batches, y /batches/{id}/extended-notes (los dos verbos) | Lote |
POST y PUT sobre /batches | CrearEditarLote |
/batches/{id}/stage | CambiarEtapaDeUnLote |
/batches/{id}/deactivate y /activate | EliminarLote |
/batches/{id}/tasks/{taskId}/complete y /reopen | ProduccionCompletarTarea |
GET sobre /batches/{id}/measurements | Mediciones |
todo /batches/{id}/waste | Produccion |
todo /tanks — que es además el catálogo de tankId | Tanque |
todo /tasks y /task-definitions | Tareas |
todo /price-lists | ListaDePrecio |
todo /costings | Costeo |
todo /waste-groups | ProyectarVentas |
/keg-volumes — el único catálogo que lee su configuración | Barril |
GET sobre /kegs | Barril |
POST sobre /kegs | CrearEditarBarril |
PUT sobre /kegs | EditarBarril |
/kegs/{id}/deactivate y /activate | EliminarBarril |
POST /kegs/transfers | TrasladoBarrilesEntreClientes |
POST /kegs/{id}/release-reservation | Stock o LiberarBarril |
POST /kegs/{id}/empty | IngresoDisminucionStock |
POST /kegs/{id}/discard | Barril |
POST /kegs/{id}/return | DevolucionBarriles |
POST /kegs/returns-to-supplier | DevolucionBarrilesProveedor |
POST /kegs/clean y /undo-clean | BarrilLimpieza |
GET /kegs/{id}/movements | SeguimientoBarril o Barril |
todo /tap-systems | ChoperasABM |
POST /tap-systems/deliveries | EntregaDevolucionChoperas |
todo /supplies, y /ila-types | Insumos |
/supplies/{id}/stock y /supplies/{id}/batches | StockInsumos |
/supplies/{id}/stock/adjustments y /counts | StockInsumos o Stock |
/supplies/projection | ProyeccionInsumos |
GET sobre /warehouses — que es además el catálogo de warehouseId | Depositos |
POST y PUT sobre /warehouses | CrearEditarDepositos |
/warehouses/{id}/deactivate y /activate | EliminarDepositos |
GET sobre /supply-warehouses | DepositoInsumo |
POST y PUT sobre /supply-warehouses | DepositoInsumoCrearEditar |
/supply-warehouses/{id}/deactivate y /activate | DepositoInsumoEliminar |
GET y POST sobre /stock-movements, más /supply-warehouses/{id}/transfers | MovimientosDepositos |
GET sobre /stock-valuation y /stock-valuation-cost | InformesStock |
GET sobre /raw-material-valuation | InformesProductos |
todo /mix-packs | Envasado |
GET sobre /recipes | Receta |
POST sobre /recipes | CrearEditarReceta |
PUT sobre /recipes | EditarReceta |
/recipes/{id}/deactivate y /activate | EliminarReceta |
Catálogos de referencia fijos: /supplier-types, /purchase-types, /units, /product-types | Ninguno |
GET sobre /notifications | Ninguno — igual que los catálogos fijos de arriba; la aplicación web misma no gatea esto con nada más que estar logueado |
todo /leads | Leads |
GET sobre /audit | Informes o Administracion — mismo gate que el propio informe de auditoría de la web |
todo /files (publicado hasta ahora: POST, GET, GET .../content, .../deactivate) | Ninguno — igual que la propia aplicación web |
todo /invitations | Módulo InvitarCliente y rol Administracion — los dos obligatorios, igual que la propia acción de invitar de la web |
todo /external-users salvo .../activate | Rol Duenio, sin módulo — igual que la propia aplicación web |
POST sobre /external-users/{id}/activate | Rol Administracion, sin módulo — menos exigente que el resto de este recurso, misma asimetría que ya tiene la propia aplicación web |
/external-user-products | Módulos Productos y Clientes, sin rol — igual que la propia aplicación web. Además necesita la asignación de productos al portal habilitada en su cuenta; si no, todas las acciones responden 404 |
/distributor-purchases | Módulo Compras de distribuidora, sin rol — el mismo módulo que ya usa /keg-purchase-orders |
GET sobre /checks, y los catálogos de tesorería: /banks, /check-statuses, /check-kinds | Cheques |
POST/PUT sobre /checks, y /checks/{id}/collect | IngresoEgresoCheques |
/checks/{id}/deactivate | EliminarCheques |
/withholdings | Informes — el mismo permiso que ya habilita ver este dato desde la pantalla de informe de retenciones |
GET sobre /bank-accounts | CuentasBancarias |
POST/PUT sobre /bank-accounts | CrearEditarCuentasBancarias |
/bank-accounts/{id}/deactivate y /activate | EliminarCuentasBancarias |
GET y POST sobre /bank-accounts/{id}/movements | MovimientosCuentasBancarias |
todo sobre /chart-of-accounts, y /account-categories | Cuenta |
GET sobre /cash-registers | CajasUsuario |
POST/PUT sobre /cash-registers | CrearEditarCajaUsuario |
/cash-registers/{id}/deactivate y /activate | EliminarCajaUsuario |
GET sobre /cash-registers/{id}/movements, y /open y /close | Cajas |
GET sobre /orders | Pedidos |
GET sobre /delivery-notes | EntregasVerRemito |
GET sobre /collections | Cobranzas |
POST sobre /collections | CrearEditarCobranza |
GET/POST/PUT sobre /returnable-packaging | Produccion |
todo /account | Configuraciones |
GET sobre /maintenances, y /maintenances/{id}/deactivate//activate | Mantenimiento |
POST sobre /maintenances, /maintenances/{id}/start y /maintenances/{id}/recur | Mantenimiento e IniciarMantenimiento |
POST sobre /maintenances/{id}/finish | Mantenimiento y FinalizarMantenimiento |
POST sobre /maintenances/{id}/reschedule | Mantenimiento |
GET sobre /spare-parts | Repuesto |
POST sobre /spare-parts | CrearRepuesto |
PUT sobre /spare-parts, y /spare-parts/{id}/deactivate//activate | EditarRepuesto |
GET sobre /event-categories | EventoAgenda |
POST sobre /event-categories, y /event-categories/{id}/activate | CrearEditarCategoriaEvento |
PUT sobre /event-categories | CrearEditarCategoriaEvento |
/event-categories/{id}/deactivate | EliminarCategoriaEvento |
GET sobre /calendar-events | EventoAgenda |
POST sobre /calendar-events, y /calendar-events/{id}/activate | CrearEditarEventoAgenda |
PUT sobre /calendar-events | CrearEditarEventoAgenda |
/calendar-events/{id}/deactivate | EliminarEventoAgenda |
A 403 names the permission that was missing, in message. You
should not see one in normal use — if you do, it means an endpoint was added and your account has not
picked up the new permission yet. Log in again: the token is reissued with the current set. If it
persists, that is a bug on our side, not something for you to configure.
Un 403 indica en el message qué permiso faltaba. No
debería ver ninguno en uso normal — si aparece, significa que se agregó un endpoint y su
cuenta todavía no tomó el permiso nuevo. Autentique de nuevo: el token se emite con el
conjunto actual. Si persiste, es un error nuestro y no algo que usted deba configurar.
ConventionsConvenciones
PagingPaginación
List endpoints take page (1-based, default 1) and pageSize
(default 50, maximum 200), and answer with items, page,
pageSize and total. total is the number of records matching
your filter, not the number in this page.
Los endpoints de listado aceptan page (base 1, por defecto 1) y
pageSize (por defecto 50, máximo 200), y responden con items,
page, pageSize y total. total es la cantidad de
registros que coinciden con su filtro, no la cantidad que trae esta página.
DatesFechas
Always ISO 8601 — 2026-08-12 or 2026-08-12T14:30:00.
Any other format is rejected with a 400. Do not send 12/08/2026: it is
ambiguous and it is not accepted.
Siempre ISO 8601 — 2026-08-12 o 2026-08-12T14:30:00.
Cualquier otro formato se rechaza con un 400. No envíe
12/08/2026: es ambiguo y no se acepta.
Field namesNombres de campo
Request and response fields are English camelCase. Relation identifiers end
in Id — priceListId, parentCustomerId. There is no exception:
every field the API returns follows this rule.
Los campos de request y respuesta son camelCase en inglés. Los
identificadores de relación terminan en Id: priceListId,
parentCustomerId. No hay excepciones: todo campo que devuelve la API sigue esta
regla.
ErrorsErrores
Every error, for every status code, has the same shape:
Todos los errores, para cualquier código de estado, tienen la misma forma:
{
"error": {
"code": "business_rule",
"message": "...",
"traceId": "..."
}
}
Match on code, never on message: code is a stable
identifier, message is human-readable text whose wording can change. The
message comes back in the language configured for your integration user.
Discrimine por code, nunca por message: code es
un identificador estable y message es texto legible cuya redacción puede cambiar.
El message vuelve en el idioma configurado para su usuario de integración.
| HTTP | When |
|---|---|
| 200 | OK |
| 201 | Resource created |
| 400 | Invalid body, or a business rule rejected the operation |
| 401 | Token missing, invalid, expired, or user inactive |
| 403 | Your integration user lacks the required permission |
| 404 | The resource does not exist or is not yours |
| 413 | Body larger than the 1 MB maximum |
| 429 | Rate limit or concurrency limit exceeded — see Retry-After |
| 500 | Unexpected error, with a reference id in the message |
| 503 | The API is not enabled in this environment |
| HTTP | Cuándo |
|---|---|
| 200 | OK |
| 201 | Recurso creado |
| 400 | Cuerpo inválido, o una regla de negocio rechazó la operación |
| 401 | Token ausente, inválido, expirado, o usuario inactivo |
| 403 | A su usuario de integración le falta el permiso necesario |
| 404 | El recurso no existe o no es suyo |
| 413 | Cuerpo mayor al máximo de 1 MB |
| 429 | Límite de uso o de concurrencia excedido — ver Retry-After |
| 500 | Error inesperado, con un id de referencia en el mensaje |
| 503 | La API no está habilitada en este entorno |
What to do with each code:
Qué hacer con cada code:
code | HTTP | What to do |
|---|---|---|
token_expired | 401 | Log in again and retry once. |
token_missing | 401 | The header is missing. It must be Authorization: Bearer <token>. |
token_invalid | 401 | Log in again. Check the header format. |
missing_credentials | 400 | The login body needs apiKey. |
invalid_credentials | 401 | Unknown API key, or the account is not active. |
user_inactive | 401 | The integration user was deactivated. Contact your account administrator. |
session_unavailable | 401 | Retry once; if it persists, contact us with the traceId. |
too_many_login_attempts | 429 | Wait 60 seconds. You are almost certainly retrying in a loop. |
not_authenticated | 401 | Log in again. |
module_forbidden / role_forbidden / no_modules | 403 | Your user lacks the permission. Ask your account administrator. Do not retry. |
plan_forbidden | 403 | This endpoint is not available on your account's plan. It is not a permission your administrator can grant — it is what the plan includes. Do not retry. |
addon_not_contracted | 403 | This endpoint belongs to an add-on your account has not contracted. The message names it. Do not retry. |
enterprise_required | 403 | API access is not enabled for this account. It applies to the whole API, not to one endpoint, and you will also get it on POST /auth/login. Contact your account manager. Do not retry. |
forbidden | 403 | The operation is not allowed for this user. Do not retry. |
business_rule | 400 | Read message: it names the rule that blocked the operation. Do not retry. |
invalid_body | 400 | Malformed JSON, a field with the wrong type, or a text longer than its maximum. message names the field. |
invalid_reference | 400 | A field ending in Id holds a value that is not available to your account. message names the field and the catalog that lists the valid ones. Do not retry. |
missing_body | 400 | The endpoint needs a JSON body and none arrived. |
invalid_date_range | 400 | dateFrom / dateTo missing, not ISO 8601, or inverted. |
date_range_too_wide | 400 | Split the range into several calls. message states the maximum. |
not_found | 404 | The resource does not exist or is not yours. Do not retry. |
rate_limit_exceeded | 429 | Wait Retry-After and retry with exponential backoff. |
too_many_concurrent_requests | 429 | Too many requests in flight at once. Serialize your calls. |
request_in_progress | 409 | An identical Request-Id is still being processed. Retry in a few seconds to get its result. |
request_id_reused | 400 | That Request-Id was already used for a different operation. Use one UUID per operation. Do not retry. |
internal_error | 500 | Retry with exponential backoff. If it persists, contact us quoting the traceId. |
api_disabled | 503 | The API is not enabled in this environment. |
code | HTTP | Qué hacer |
|---|---|---|
token_expired | 401 | Autentique de nuevo y reintente una vez. |
token_missing | 401 | Falta el header. Tiene que ser Authorization: Bearer <token>. |
token_invalid | 401 | Autentique de nuevo. Revise el formato del header. |
missing_credentials | 400 | El cuerpo del login necesita apiKey. |
invalid_credentials | 401 | API key desconocida, o la cuenta no está activa. |
user_inactive | 401 | El usuario de integración fue dado de baja. Contacte al administrador de su cuenta. |
session_unavailable | 401 | Reintente una vez; si persiste, contáctenos con el traceId. |
too_many_login_attempts | 429 | Espere 60 segundos. Casi seguro está reintentando en un bucle. |
not_authenticated | 401 | Autentique de nuevo. |
module_forbidden / role_forbidden / no_modules | 403 | A su usuario le falta el permiso. Pídalo al administrador de su cuenta. No reintente. |
plan_forbidden | 403 | Este endpoint no está disponible en el plan de su cuenta. No es un permiso que el administrador pueda otorgar — es lo que incluye el plan. No reintente. |
addon_not_contracted | 403 | Este endpoint pertenece a un addon que su cuenta no contrató. El mensaje lo nombra. No reintente. |
enterprise_required | 403 | El acceso a la API no está habilitado para esta cuenta. Aplica a la API entera, no a un endpoint, y también lo va a recibir en POST /auth/login. Contacte a su ejecutivo de cuenta. No reintente. |
forbidden | 403 | La operación no está permitida para este usuario. No reintente. |
business_rule | 400 | Lea el message: nombra la regla que bloqueó la operación. No reintente. |
invalid_body | 400 | JSON mal formado, un campo con el tipo equivocado, o un texto más largo que su máximo. El message nombra el campo. |
invalid_reference | 400 | Un campo terminado en Id tiene un valor que su cuenta no puede usar. El message nombra el campo y el catálogo que lista los válidos. No reintente. |
missing_body | 400 | El endpoint necesita un cuerpo JSON y no llegó ninguno. |
invalid_date_range | 400 | Falta dateFrom o dateTo, no están en ISO 8601, o están invertidos. |
date_range_too_wide | 400 | Divida el rango en varias llamadas. El message indica el máximo. |
not_found | 404 | El recurso no existe o no es suyo. No reintente. |
rate_limit_exceeded | 429 | Espere el Retry-After y reintente con backoff exponencial. |
too_many_concurrent_requests | 429 | Demasiados requests en vuelo a la vez. Serialice sus llamadas. |
request_in_progress | 409 | Un Request-Id idéntico todavía se está procesando. Reintente en unos segundos para obtener su resultado. |
request_id_reused | 400 | Ese Request-Id ya se usó para otra operación. Use un UUID por operación. No reintente. |
internal_error | 500 | Reintente con backoff exponencial. Si persiste, contáctenos citando el traceId. |
api_disabled | 503 | La API no está habilitada en este entorno. |
The traceId identifies the exact request on our side.
Always include it when reporting a problem.
El traceId identifica el request exacto de nuestro lado.
Inclúyalo siempre al reportar un problema.
Rate limitsLímites de uso
Two independent limits keep response times predictable. Both apply to your account and
both answer 429.
Dos límites independientes mantienen predecibles los tiempos de respuesta. Los
dos aplican a su cuenta y los dos responden 429.
| Limit | Default | Error code |
|---|---|---|
| Requests per second | 1/s, with a small burst allowance | rate_limit_exceeded |
| Requests in flight at once | 2 | too_many_concurrent_requests |
| Límite | Por defecto | Código de error |
|---|---|---|
| Requests por segundo | 1/s, con una pequeña tolerancia de ráfaga | rate_limit_exceeded |
| Requests en vuelo a la vez | 2 | too_many_concurrent_requests |
Limits are configured per account — if you need more, ask. Expensive endpoints cost more than one unit of your per-second budget; each operation states its cost in the API reference. A change to your limits can take up to 5 minutes to take effect.
Los límites se configuran por cuenta: si necesita más, pídalo. Los endpoints costosos consumen más de una unidad de su presupuesto por segundo; cada operación declara su costo en la referencia de la API. Un cambio de límites puede tardar hasta 5 minutos en tomar efecto.
Every response carries your current budget in X-RateLimit-Limit and
X-RateLimit-Remaining. When you exceed it you get a 429 with
Retry-After in seconds.
Cada respuesta lleva su presupuesto actual en X-RateLimit-Limit y
X-RateLimit-Remaining. Cuando lo excede recibe un 429 con
Retry-After en segundos.
delay = max(Retry-After, 1)
for attempt in 1..6:
response = send(request)
if response.status != 429:
return response
wait(delay + random(0, delay * 0.3)) # jitter
delay = min(delay * 2, 60) # exponential, capped at 60s
fail("persistent rate limit")
espera = max(Retry-After, 1)
for intento in 1..6:
respuesta = enviar(request)
if respuesta.status != 429:
return respuesta
esperar(espera + aleatorio(0, espera * 0.3)) # jitter
espera = min(espera * 2, 60) # exponencial, tope 60s
fallar("limite de uso persistente")
1. Respect Retry-After. It is the floor, not a suggestion. Retrying
sooner only burns your own budget.
2. Double the wait on every attempt (1s, 2s, 4s, 8s…). Retrying at a fixed interval sustains the saturation instead of relieving it.
3. Add random jitter. If you run several processes, without jitter they all retry at the same instant and collide again.
1. Respete el Retry-After. Es el piso, no una sugerencia. Reintentar
antes solo consume su propio presupuesto.
2. Duplique la espera en cada intento (1s, 2s, 4s, 8s…). Reintentar a intervalo fijo sostiene la saturación en lugar de aliviarla.
3. Agregue jitter aleatorio. Si corre varios procesos, sin jitter todos reintentan en el mismo instante y vuelven a chocar.
If you have many records to process, serialize your calls and space them out
according to your limit, instead of firing them in parallel and absorbing the 429s. Watch
X-RateLimit-Remaining to self-regulate before you hit the wall.
Si tiene muchos registros para procesar, serialice sus llamadas y espacielas
según su límite, en lugar de dispararlas en paralelo y absorber los 429. Mire
X-RateLimit-Remaining para autorregularse antes de chocar contra el tope.
IdempotencyIdempotencia
curl -X POST https://api.gestioncervecera.com/api/v1/customers \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Request-Id: <one UUID per operation - reuse it on every retry>" \
-d '<customer body — see the API reference for the fields>'
curl -X POST https://api.gestioncervecera.com/api/v1/customers \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Request-Id: <un UUID por operación - repita el mismo en cada reintento>" \
-d '<cuerpo del cliente — los campos estan en la referencia>'
Generate one UUID per operation and send it as Request-Id. On a retry, send
the same one. That is the whole point: if your request dies on a network timeout, retrying
with the same Request-Id gives you back the original response —
same status, same body — instead of creating the record twice. The window is 5 minutes.
Genere un UUID por operación y mándelo como Request-Id. En un
reintento, mande el mismo. Ahí está todo el sentido: si su request muere por
un timeout de red, reintentar con el mismo Request-Id le devuelve la respuesta
original —mismo status, mismo cuerpo— en vez de crear el registro dos veces. La
ventana es de 5 minutos.
A replayed response carries the header Idempotent-Replayed: true, so you
can tell it apart from a fresh one. You never have to guess whether the first attempt went through.
Una respuesta repetida trae el header Idempotent-Replayed: true, así
que puede distinguirla de una nueva. Nunca tiene que adivinar si el primer intento pasó.
| Situation | You get |
|---|---|
| First attempt | The normal response. |
| Retry, after the first one finished | The original response, with Idempotent-Replayed: true. |
| Retry while the first one is still running | 409 request_in_progress. Wait a couple of seconds and retry: there is no response yet to give you. |
Same Request-Id on a different operation | 400 request_id_reused. Use a new UUID per operation. |
| Attempt that failed (4xx/5xx) | Nothing is stored. Retrying with the same Request-Id really runs again. |
| Situación | Qué recibe |
|---|---|
| Primer intento | La respuesta normal. |
| Reintento, ya terminado el primero | La respuesta original, con Idempotent-Replayed: true. |
| Reintento mientras el primero sigue corriendo | 409 request_in_progress. Espere un par de segundos y reintente: todavía no hay respuesta que darle. |
Mismo Request-Id en otra operación | 400 request_id_reused. Use un UUID por operación. |
| Intento que falló (4xx/5xx) | No se guarda nada. Reintentar con el mismo Request-Id ejecuta de verdad. |
CustomersClientes
| Endpoint | What it does |
|---|---|
GET /customers | Paged listing. search, page, pageSize, includeInactive. |
GET /customers/{id} | One customer, active or not. |
POST /customers | Creates a customer. Answers 201. tradeName and taxConditionId are required — there is no default for the tax condition, since it decides how the customer is invoiced. |
PUT /customers/{id} | Partial update. |
POST /customers/{id}/deactivate | Deactivation. Idempotent. |
POST /customers/{id}/activate | Reactivation. Idempotent. |
GET /customers/{id}/points-of-sale | Points of sale of the customer. |
POST /customers/{id}/points-of-sale | Adds one point of sale. Answers 201. |
PUT /customers/{id}/points-of-sale/{posId} | Partial update of one point of sale. |
POST /customers/{id}/points-of-sale/{posId}/deactivate | Deactivation. Idempotent. |
GET /customers/{id}/contacts | Contact people of the customer. |
POST /customers/{id}/contacts | Adds one contact. Answers 201. |
PUT /customers/{id}/contacts/{contactId} | Partial update of one contact. |
POST /customers/{id}/contacts/{contactId}/deactivate | Deactivation. Idempotent. |
GET /customers/{id}/categories | Categories assigned to the customer. |
POST /customers/{id}/categories | Assigns one category. Idempotent if already assigned. |
POST /customers/{id}/categories/{categoryId}/deactivate | Removes one category. Idempotent. |
GET /customers/{id}/balance | Current-account balance. |
GET /customers/{id}/ledger | Current-account movements, newest first. from, to (YYYY-MM-DD), unreconciledOnly, page, pageSize. |
| Endpoint | Qué hace |
|---|---|
GET /customers | Listado paginado. search, page, pageSize, includeInactive. |
GET /customers/{id} | Un cliente, activo o no. |
POST /customers | Crea un cliente. Responde 201. tradeName y taxConditionId son obligatorios: la condición fiscal no tiene default porque decide cómo se le factura al cliente. |
PUT /customers/{id} | Actualización parcial. |
POST /customers/{id}/deactivate | Baja. Idempotente. |
POST /customers/{id}/activate | Reactivación. Idempotente. |
GET /customers/{id}/points-of-sale | Puntos de venta del cliente. |
POST /customers/{id}/points-of-sale | Agrega un punto de venta. Responde 201. |
PUT /customers/{id}/points-of-sale/{posId} | Actualización parcial de un punto de venta. |
POST /customers/{id}/points-of-sale/{posId}/deactivate | Baja. Idempotente. |
GET /customers/{id}/contacts | Contactos del cliente. |
POST /customers/{id}/contacts | Agrega un contacto. Responde 201. |
PUT /customers/{id}/contacts/{contactId} | Actualización parcial de un contacto. |
POST /customers/{id}/contacts/{contactId}/deactivate | Baja. Idempotente. |
GET /customers/{id}/categories | Categorías asignadas al cliente. |
POST /customers/{id}/categories | Asigna una categoría. Idempotente si ya estaba asignada. |
POST /customers/{id}/categories/{categoryId}/deactivate | Quita una categoría. Idempotente. |
GET /customers/{id}/balance | Saldo de cuenta corriente. |
GET /customers/{id}/ledger | Movimientos de cuenta corriente, del más nuevo al más viejo. from, to (YYYY-MM-DD), unreconciledOnly, page, pageSize. |
Current accountCuenta corriente
Read-only. Movements are generated by the system: an order adds to
what the customer owes, a payment reduces it. Reconciling a movement — imputing a payment against
an invoice — is a treasury operation that touches several entities at once (the movement, the order,
the reconciliation record), and has its own resource, which this version does not publish. That is
why reconciled is read-only here: you can read the state, not change it.
Solo lectura. Los movimientos los genera el sistema: un pedido suma a
lo que debe el cliente, un pago lo resta. Conciliar un movimiento —imputar un pago contra una
factura— es una operación de tesorería que toca varias entidades a la vez (el
movimiento, el pedido, el registro de conciliación), y tiene su propio recurso, que esta
versión no publica. Por eso reconciled es de solo lectura acá: se puede
leer el estado, no cambiarlo.
A positive amount increases what the customer owes; a payment is
negative. The balance is cumulative and depends on the order of the movements, so each entry reports
the balance it left behind and the previousBalance it started from. For
the current balance alone, read /balance: it is one call instead of paging to the
end. If the customer belongs to a group and does not keep its own current account, this lists the
group parent's movements — the same account /balance resolves to.
Un amount positivo aumenta lo que debe el cliente; un pago es negativo.
El saldo es acumulado y depende del orden de los movimientos, así que cada entrada informa el
balance que dejó y el previousBalance del que partió. Si solo
necesita el saldo actual, lea /balance: es una llamada en vez de paginar hasta el final.
Si el cliente pertenece a un grupo y no tiene cuenta corriente propia, esto lista los movimientos del
padre del grupo — la misma cuenta que resuelve /balance.
orderNumber, invoiceNumber and deliveryNoteNumber
are text, not ids. To read the order behind a movement, look it up in
GET /orders by date and match its number; delivery
notes are listed by GET /delivery-notes the same way.
orderNumber, invoiceNumber y deliveryNoteNumber
son texto, no ids. Para leer el pedido de un movimiento, búsquelo en
GET /orders por fecha y compare su number; los
remitos se listan con GET /delivery-notes de la misma forma.
Every field, its type and its maximum length are in the
API reference. Exceeding a maximum answers 400 with
invalid_body naming the field.
Cada campo, su tipo y su longitud máxima están en la
referencia de la API. Exceder un máximo responde 400
con invalid_body nombrando el campo.
Server-controlled fieldsCampos que controla el servidor
id— assigned by the server. Ignored if you send it, on create and on update.active— read-only. Change it with/deactivateand/activate.
id— lo asigna el servidor. Se ignora si lo envía, tanto al crear como al actualizar.active— solo lectura. Se cambia con/deactivatey/activate.
Validation rulesReglas de validación
A violation answers 400 with business_rule and a
message naming the rule. The same rules apply in the application, so they cannot be
waived per integration. Do not retry — retrying cannot succeed.
Una violación responde 400 con business_rule y un
message que nombra la regla. Las mismas reglas rigen en la aplicación, así
que no se pueden levantar por integración. No reintente: reintentar no puede
funcionar.
tradeNameis required.taxConditionIdis required on create, and has no default: it decides how the customer is invoiced and its values differ by country. Read them fromGET /api/v1/tax-conditions.tradeNamemust not match another active customer. A name freed by a deactivated customer can be reused.- In Chile,
taxId(RUT) must not contain spaces. - A customer that does not belong to a group must have its own current account. Create it without
parentCustomerIdand it gets one; sendparentCustomerIdto attach it to a group instead. - Once a customer has current-account movements, its currency can no longer be changed.
customerTypeIdmust be an active type.- Every field ending in
Idmust hold a value from its catalog. Otherwise:400 invalid_reference, naming the field and the catalog to read.
tradeNamees obligatorio.taxConditionIdes obligatorio al crear y no tiene default: decide cómo se le factura al cliente y sus valores varían por país. Léalos deGET /api/v1/tax-conditions.tradeNameno puede coincidir con el de otro cliente activo. Un nombre que liberó un cliente dado de baja se puede reutilizar.- En Chile, el
taxId(RUT) no puede contener espacios. - Un cliente que no pertenece a un grupo debe tener cuenta corriente propia. Creélo sin
parentCustomerIdy se le asigna una; envíeparentCustomerIdpara adjuntarlo a un grupo. - Una vez que un cliente tiene movimientos de cuenta corriente, ya no se puede cambiar su moneda.
customerTypeIddebe ser un tipo activo.- Todo campo terminado en
Iddebe contener un valor de su catálogo. Si no:400 invalid_reference, indicando el campo y el catálogo que hay que leer.
Listing and searchingListado y búsqueda
search matches trade name, legal name or tax id, accent- and
case-insensitive. By default the listing returns only active customers; pass
includeInactive=true to include deactivated ones — that is what you want when
reconciling a full catalogue and you need to tell "deactivated" apart from "never existed".
GET /customers/{id} always returns the customer, active or
not.
search busca en nombre de fantasía, razón social o
identificación fiscal, sin distinguir mayúsculas ni acentos. Por defecto el listado
devuelve solo clientes activos; pase includeInactive=true para incluir los dados de
baja: es lo que necesita al reconciliar un catálogo completo y tiene que distinguir "dado de
baja" de "nunca existió". GET /customers/{id} devuelve
siempre el cliente, esté activo o no.
Partial updatesActualizaciones parciales
PUT is a partial update: it changes only the fields you send. Fields
you leave out keep their current value, so you never need to send the whole object to change one
field. To clear a text field, send it as an explicit empty string or null.
To clear a reference field, send null — not 0.
A 0 in any …Id field is read as "not set" and ignored, because no
catalog has an entry with id 0. This matters if your client serializes uninitialized
integers: those fields are skipped rather than written, so the stored value survives. When the field
cannot be empty at all (currencyId, purchaseTypeId,
taxConditionId), a 0 likewise leaves the current value untouched.
The update is idempotent — repeating the same request leaves the customer in the same state, so it is safe to retry after a network timeout.
PUT es una actualización parcial: cambia solo los campos que
envía. Los que omite conservan su valor actual, así que nunca necesita mandar
el objeto completo para cambiar un campo. Para vaciar un campo de texto, envíelo
explícitamente como cadena vacía o null.
Para vaciar un campo de referencia mande null, no 0.
Un 0 en cualquier campo …Id se lee como "sin asignar" y se ignora,
porque ningún catálogo tiene una entrada con id 0. Esto importa si su
cliente serializa enteros sin inicializar: esos campos se saltean en vez de escribirse, así
que el valor guardado se conserva. Cuando el campo no puede quedar vacío
(currencyId, purchaseTypeId, taxConditionId), un
0 también deja intacto el valor actual.
La actualización es idempotente: repetir el mismo request deja al cliente en el mismo estado, así que es seguro reintentarla después de un timeout de red.
The update validates the whole record, not just the fields you sent.
If the customer already breaks one of the rules above — typically an older record — you get
400 even when the field you are changing is unrelated. The message names the
rule. The record needs to be corrected in the application before it can be updated here.
La actualización valida el registro entero, no solo los campos que
envió. Si el cliente ya viola alguna de las reglas de arriba —típicamente un
registro antiguo— recibe 400 aunque el campo que está cambiando no tenga
relación. El message nombra la regla. El registro tiene que corregirse en la
aplicación antes de poder actualizarlo por acá.
Deactivation instead of deletionBaja en lugar de borrado
There is no delete. POST
/customers/{id}/deactivate marks the record inactive; its history is kept and the
resource stays reachable through GET /{id}. That is why this
API has no DELETE verb. The operation is idempotent: deactivating something already
inactive returns 200 with "alreadyInactive": true. A business rule can
refuse the deactivation, in which case you get a 400 explaining why.
No hay borrado. POST
/customers/{id}/deactivate marca el registro como inactivo; conserva su historia y el
recurso sigue accesible por GET /{id}. Por eso esta API no
tiene verbo DELETE. La operación es idempotente: dar de baja algo que ya
está inactivo devuelve 200 con "alreadyInactive": true. Una regla de
negocio puede rechazar la baja, y en ese caso recibe un 400 que explica por
qué.
Points of sale, contacts, categories and balancePuntos de venta, contactos, categorías y saldo
Points of sale and contacts are managed one at a time, with their own endpoints. Each call touches a single one and leaves the rest untouched — there is no request that replaces the whole collection, deliberately: it would make "add one" and "delete every other one" the same call, and a partial payload would silently wipe what it omitted.
Los puntos de venta y los contactos se manejan de a uno, con sus propios endpoints. Cada llamada toca uno solo y deja el resto intacto — no existe una llamada que reemplace la colección entera, y es a propósito: haría que "agregar uno" y "borrar todos los demás" fueran el mismo pedido, y un cuerpo parcial borraría en silencio lo que omitió.
Deactivating one never deletes it: orders and deliveries point at a point of sale, so
removing it would leave them dangling. It stops being listed and can no longer be selected. Its
name is required, and provinceId and priceListId come from the
same catalogs as the customer's.
Darlos de baja nunca los borra: los pedidos y los remitos apuntan al punto de venta, y
eliminarlo los dejaría colgados. Deja de listarse y no se puede volver a elegir. El
name es obligatorio, y provinceId y priceListId salen de los
mismos catálogos que los del cliente.
The balance is a separate endpoint rather than a field of the customer. If the customer
belongs to a group and does not keep its own current account, the balance returned is the group
parent's, and accountCustomerId tells you whose it is.
El saldo es un endpoint aparte y no un campo del cliente. Si el cliente pertenece a un
grupo y no lleva cuenta corriente propia, el saldo que se devuelve es el del padre del grupo, y
accountCustomerId indica de quién es.
A customer can hold several categories at once, assigned and removed one at a
time — same "one endpoint per item" criterion as points of sale and contacts, and for the
same reason: CategoriaClienteService.SyncCategoriasCliente (used by the web application's
customer form) replaces the whole set at once, which would make a partial update race with a
concurrent write. categoryId is checked against
GET /api/v1/customer-categories, and a system-defined
category can be assigned like any other — the restriction on system-defined categories is only about
editing or deactivating the category itself, not about using it.
Un cliente puede tener varias categorías a la vez, asignadas y quitadas de
a una — mismo criterio de "un endpoint por ítem" que puntos de venta y contactos,
y por el mismo motivo: CategoriaClienteService.SyncCategoriasCliente (la que usa el
formulario de cliente de la web) reemplaza el conjunto entero de una vez, lo que haría que una
actualización parcial compita con una escritura concurrente. categoryId se valida
contra GET /api/v1/customer-categories, y una
categoría de sistema se puede asignar como cualquier otra — la restricción sobre
las categorías de sistema es solo para editar o desactivar la categoría en sí, no
para usarla.
Customer typesTipos de cliente
The classification a customer's customerTypeId points at — Bar,
Distributor, Online, and whatever your account added. A handful of ids are system-defined (present
in every account) and cannot be edited, deactivated or reactivated through this resource: a
PUT//deactivate//activate on one of them answers
404, the same way the web application's own edit screen never reaches them either.
La clasificación a la que apunta el customerTypeId de un cliente
— Bar, Distribuidora, OnLine, y lo que haya agregado su cuenta. Un puñado de ids son de
sistema (existen en todas las cuentas) y no se pueden editar, desactivar ni reactivar por este
recurso: un PUT//deactivate//activate sobre uno de ellos
responde 404, igual que la propia pantalla de edición de la web tampoco los
alcanza.
| Endpoint | What it does |
|---|---|
GET /customer-types | Paged listing, including system-defined types. search (name), page, pageSize, includeInactive. This is also the catalog of a customer's customerTypeId. |
GET /customer-types/{id} | One type, active or not, system-defined or not. |
POST /customer-types | Creates a type. Answers 201. name is required. |
PUT /customer-types/{id} | Partial update. 404 for a system-defined or deactivated id. |
POST /customer-types/{id}/deactivate | Deactivation. Idempotent. 400 for a system-defined type, or one used by an active customer. |
POST /customer-types/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /customer-types | Listado paginado, incluidos los tipos de sistema. search (nombre), page, pageSize, includeInactive. Es además el catálogo de customerTypeId de un cliente. |
GET /customer-types/{id} | Un tipo, activo o no, de sistema o no. |
POST /customer-types | Crea un tipo. Responde 201. name es obligatorio. |
PUT /customer-types/{id} | Actualización parcial. 404 para un id de sistema o desactivado. |
POST /customer-types/{id}/deactivate | Baja. Idempotente. 400 para un tipo de sistema, o usado por un cliente activo. |
POST /customer-types/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required, and must be unique among both your active and inactive types.- Deactivation is rejected when the type is system-defined, or when an active customer still uses it — both are real rules the web application already enforces.
- Reactivation is rejected under the same name-uniqueness rule as creation: it fails if another active type already took the name while this one was deactivated.
namees obligatorio, y único entre sus tipos activos e inactivos.- La baja se rechaza si el tipo es de sistema, o si un cliente activo todavía lo usa — las dos son reglas reales que ya aplica la aplicación web.
- La reactivación se rechaza con la misma regla de unicidad de nombre que el alta: falla si otro tipo activo ya tomó el nombre mientras este estaba desactivado.
Customer categoriesCategorías de cliente
This resource is only the category definition: create, rename,
deactivate. A customer can hold several categories at once — reading which ones a given customer
has, and assigning or removing them, is
GET/POST /customers/{customerId}/categories,
not here. A handful of ids may be system-defined (present in every account) and cannot be edited,
deactivated or reactivated through this resource — same restriction as
customer types.
Este recurso es solo la definición de la categoría: crear,
renombrar, dar de baja. Un cliente puede tener varias categorías a la vez — leer cuáles
tiene un cliente, y asignarlas o quitarlas, es
GET/POST /customers/{customerId}/categories,
no acá. Un puñado de ids pueden ser de sistema (existen en todas las cuentas) y no se
pueden editar, desactivar ni reactivar por este recurso — misma restricción que
tipos de cliente.
| Endpoint | What it does |
|---|---|
GET /customer-categories | Paged listing, including system-defined categories. search (name), page, pageSize, includeInactive. This is also the catalog used to assign a category to a customer. |
GET /customer-categories/{id} | One category, active or not, system-defined or not. |
POST /customer-categories | Creates a category. Answers 201. name is required. |
PUT /customer-categories/{id} | Partial update. 404 for a system-defined or deactivated id. |
POST /customer-categories/{id}/deactivate | Deactivation. Idempotent. 400 for a system-defined category. |
POST /customer-categories/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /customer-categories | Listado paginado, incluidas las categorías de sistema. search (nombre), page, pageSize, includeInactive. Es además el catálogo que se usa para asignar una categoría a un cliente. |
GET /customer-categories/{id} | Una categoría, activa o no, de sistema o no. |
POST /customer-categories | Crea una categoría. Responde 201. name es obligatorio. |
PUT /customer-categories/{id} | Actualización parcial. 404 para un id de sistema o desactivado. |
POST /customer-categories/{id}/deactivate | Baja. Idempotente. 400 para una categoría de sistema. |
POST /customer-categories/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required, and must be unique among both your active and inactive categories, system-defined ones included.- Deactivation is rejected only when the category is system-defined. Unlike customer types, there is no check for customers currently holding the category — that guard does not exist in the web application either, so it is not invented here.
- Reactivation is rejected under the same name-uniqueness rule as creation.
namees obligatorio, y único entre sus categorías activas e inactivas, incluidas las de sistema.- La baja se rechaza solo si la categoría es de sistema. A diferencia de los tipos de cliente, no hay chequeo de clientes que la estén usando — esa guarda tampoco existe en la aplicación web, así que no se inventa acá.
- La reactivación se rechaza con la misma regla de unicidad de nombre que el alta.
BrandsMarcas
Brands of your brewery — the entity a customer's brandId points at. Full
CRUD except reactivation: there is no /activate, because the web application itself has
no way to reactivate a deactivated brand either (same situation already documented for mix-packs).
Fiscal e-invoicing credentials that some accounts auto-fill on a brand are never exposed, and
uploading a logo stays a web-only operation — logoUrl is read-only here.
Marcas de su cervecería — la entidad a la que apunta el brandId de
un cliente. CRUD completo salvo reactivación: no hay /activate, porque la propia
aplicación web tampoco tiene forma de reactivar una marca dada de baja (misma situación
ya documentada para mix-packs). Las credenciales de facturación electrónica que algunas
cuentas completan automáticamente en una marca nunca se exponen, y subir un logo sigue siendo
una operación solo de la web — logoUrl es de solo lectura acá.
| Endpoint | What it does |
|---|---|
GET /brands | Paged listing of active brands. search (name), page, pageSize. This is also the catalog of a customer's brandId and of a chart-of-accounts entry's brandId. |
GET /brands/{id} | One brand, active or not. |
POST /brands | Creates a brand. Answers 201. name is required. |
PUT /brands/{id} | Partial update. logoUrl and active are read-only. |
POST /brands/{id}/deactivate | Deactivation. Idempotent. No /activate — see above. |
| Endpoint | Qué hace |
|---|---|
GET /brands | Listado paginado de marcas activas. search (nombre), page, pageSize. Es además el catálogo de brandId de un cliente y de una cuenta del plan de cuentas. |
GET /brands/{id} | Una marca, activa o no. |
POST /brands | Crea una marca. Responde 201. name es obligatorio. |
PUT /brands/{id} | Actualización parcial. logoUrl y active son de solo lectura. |
POST /brands/{id}/deactivate | Baja. Idempotente. Sin /activate — ver arriba. |
Validation rulesReglas de validación
nameis required. There is no uniqueness rule — none exists today, not even in the web application.- Creating your third active brand automatically sends an internal notification email — same behavior the web application always had, inherited as-is.
- There is no way to assign a brand to a product through this API — that feature is unused in the web application itself today (its only write path is commented out).
namees obligatorio. No hay regla de unicidad — no existe ninguna hoy, ni siquiera en la aplicación web.- Crear la tercera marca activa dispara automáticamente un mail interno de aviso — mismo comportamiento que siempre tuvo la aplicación web, heredado tal cual.
- No hay forma de asignar una marca a un producto por esta API — esa funcionalidad no se usa hoy ni en la propia aplicación web (su única vía de escritura está comentada).
PromotionsPromociones
This is the promotion's definition only: how it gets applied to an order is the responsibility of the order engine, not this resource.
Esta es solo la definición de la promoción: cómo se aplica a un pedido es responsabilidad del motor de reglas, no de este recurso.
| Endpoint | What it does |
|---|---|
GET /promotions | Paged listing of active promotions. page, pageSize. |
GET /promotions/{id} | One promotion, active or not. |
POST /promotions | Creates a promotion. Answers 201. description, scope and calculationType are required, plus whatever each combination needs — see the rules below. |
PUT /promotions/{id} | Partial update. active is read-only. 404 for a deactivated id — see below. |
POST /promotions/{id}/deactivate | Deactivates the promotion. Not physically deleted: still reachable through GET. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /promotions | Listado paginado de promociones activas. page, pageSize. |
GET /promotions/{id} | Una promoción, activa o no. |
POST /promotions | Crea una promoción. Responde 201. description, scope y calculationType son obligatorios, más lo que pida cada combinación — ver las reglas abajo. |
PUT /promotions/{id} | Actualización parcial. active es de solo lectura. 404 para un id dado de baja — ver abajo. |
POST /promotions/{id}/deactivate | Da de baja la promoción. No se elimina físicamente: sigue accesible por GET. Idempotente. |
Validation rulesReglas de validación
scopeis eithercart(applies to the whole order) orper-product.cart:discountPercentage(0–100) is required.cartThresholddefaults to 0.per-product: at least one ofproductIdsis required.formatType(barril/envase_suelto/pack) drives which ofliters/containerId/caseIdapplies.calculationType=percentage:discountPercentage(0–100) is required.calculationType=quantity(an MxN deal):buyQuantityandpayQuantityare required, andpayQuantitymust be less thanbuyQuantity.- When
restrictToPriceListsistrue, at least one ofpriceListIdsis required, and each must be one of your active price lists. - There is no
/activate: the web application itself has no reactivation for a promotion either. APUTon a deactivated promotion answers404for the same reason — the underlying save always reactivates on update, so this prevents reactivating one as a side effect of an edit.
scopeescart(aplica a todo el pedido) oper-product.cart:discountPercentage(0–100) es obligatorio.cartThresholddefault 0.per-product: se requiere al menos un valor enproductIds.formatType(barril/envase_suelto/pack) determina cuál deliters/containerId/caseIdaplica.calculationType=percentage:discountPercentage(0–100) es obligatorio.calculationType=quantity(un MxN):buyQuantityypayQuantityson obligatorios, ypayQuantitydebe ser menor quebuyQuantity.- Cuando
restrictToPriceListsestrue, se requiere al menos un valor enpriceListIds, y cada uno debe ser una lista de precios activa suya. - No hay
/activate: la aplicación web tampoco tiene reactivación para una promoción. UnPUTsobre una promoción dada de baja responde404por el mismo motivo — el guardado subyacente siempre reactiva al actualizar, y esto evita reactivarla como efecto colateral de una edición.
SuppliersProveedores
| Endpoint | What it does |
|---|---|
GET /suppliers | Paged listing. search (trade name, legal name, tax id, e-mails), page, pageSize, includeInactive. |
GET /suppliers/{id} | One supplier, active or not. |
POST /suppliers | Creates a supplier. Answers 201. tradeName and taxConditionId are required — there is no default for the tax condition, since it decides how the supplier invoices you. Omitting currencyId uses your account's currency. |
PUT /suppliers/{id} | Partial update. |
POST /suppliers/{id}/deactivate | Deactivation. Idempotent. |
POST /suppliers/{id}/activate | Reactivation. Idempotent. |
GET /suppliers/{id}/products | Paged listing of the products this supplier provides. page, pageSize. |
PUT /suppliers/{id}/products | Replaces that whole set. The body is an array of product ids. An empty array clears it. |
GET /suppliers/{id}/ledger | Current-account movements, newest first. from, to (YYYY-MM-DD), unreconciledOnly, page, pageSize. |
GET /suppliers/{id}/balance | What you owe the supplier right now, and in which currency. |
| Endpoint | Qué hace |
|---|---|
GET /suppliers | Listado paginado. search (nombre de fantasía, razón social, CUIT, emails), page, pageSize, includeInactive. |
GET /suppliers/{id} | Un proveedor, activo o no. |
POST /suppliers | Crea un proveedor. Responde 201. tradeName y taxConditionId son obligatorios: la condición fiscal no tiene default porque decide cómo le factura el proveedor. Si omite currencyId se usa la moneda de su cuenta. |
PUT /suppliers/{id} | Actualización parcial. |
POST /suppliers/{id}/deactivate | Baja. Idempotente. |
POST /suppliers/{id}/activate | Reactivación. Idempotente. |
GET /suppliers/{id}/products | Listado paginado de los productos que provee este proveedor. page, pageSize. |
PUT /suppliers/{id}/products | Reemplaza ese conjunto entero. El body es un arreglo de ids de producto. Un arreglo vacío lo deja sin ninguno. |
GET /suppliers/{id}/ledger | Movimientos de cuenta corriente, del más nuevo al más viejo. from, to (YYYY-MM-DD), unreconciledOnly, page, pageSize. |
GET /suppliers/{id}/balance | Cuánto le debe al proveedor ahora mismo, y en qué moneda. |
Validation rulesReglas de validación
tradeNameis required.taxConditionIdis required when creating. It is rejected withinvalid_reference, naming/tax-conditions, rather than defaulted: the tax condition varies by country and decides how the supplier invoices you.taxIdmust not match another active supplier that uses the same currency. Two suppliers with the same tax id in different currencies are allowed on purpose: it is how an account bills the same company in two currencies.legalNamefollows the same rule astaxId.- Once a supplier has current-account movements, its
currencyIdcan no longer be changed: the balance would end up mixing two currencies in one account. - Reactivation is rejected when another active supplier already uses the same
legalName. latitudeandlongitudeare the one exception to "null clears it": they are stored as numbers with0meaning "not set", so sending null resets them to0.
tradeNamees obligatorio.taxConditionIdes obligatorio en el alta. Se rechaza coninvalid_reference, nombrando/tax-conditions, en vez de tomar un default: la condición fiscal varía por país y decide cómo le factura el proveedor.taxIdno puede coincidir con el de otro proveedor activo que use la misma moneda. Dos proveedores con el mismo CUIT en monedas distintas sí se permiten, a propósito: es cómo una cuenta le factura a la misma empresa en dos monedas.legalNamesigue la misma regla quetaxId.- Una vez que un proveedor tiene movimientos de cuenta corriente, ya no se puede cambiar su
currencyId: el saldo terminaría mezclando dos monedas en una sola cuenta. - La reactivación se rechaza si ya hay otro proveedor activo con la misma
legalName. latitudeylongitudeson la única excepción a "null lo vacía": se guardan como números donde0significa "sin asignar", así que mandarlas en null las vuelve a0.
The products a supplier providesLos productos que provee un proveedor
This is a many-to-many relation, and it is a different thing from the
single supplierId written on a product. A product has one supplier on it — the one
you usually buy it from — and may additionally be provided by several others. Both exist and
neither replaces the other.
Es una relación muchos a muchos, y es otra cosa que el
supplierId que lleva escrito un producto. Un producto tiene un proveedor propio —
al que se lo compra habitualmente— y además puede ser provisto por varios. Las dos cosas
existen y ninguna reemplaza a la otra.
PUT /api/v1/suppliers/22/products
[ 88, 91, 104 ]
Every id is checked against GET /api/v1/products; one outside it answers
400 invalid_reference naming productIds and that route. The links are
deactivated rather than deleted: the relation records when it was created and is part of the history
of who supplied what.
Cada id se valida contra GET /api/v1/products; uno que no esté ahí
responde 400 invalid_reference nombrando productIds y esa ruta. Los
vínculos se dan de baja, no se borran: la relación guarda cuándo se creó y
es parte de la historia de quién proveyó qué.
Current accountCuenta corriente
Read-only. Movements are generated by the system: a purchase adds to
what you owe, a payment reduces it, a credit note offsets it. Registering a payment is a treasury
operation with its own resource, which this version does not publish — so there is no
POST here.
Solo lectura. Los movimientos los genera el sistema: una compra suma a
lo que usted debe, un pago lo resta, una nota de crédito lo compensa. Registrar un pago es una
operación de tesorería con su propio recurso, que esta versión no publica: por eso
acá no hay POST.
A positive amount increases what you owe; a payment is negative. The
balance is cumulative and depends on the order of the movements, so each entry reports the
balance it left behind and the previousBalance it started from. For the
current balance alone, read /balance: it is one call instead of paging to the end.
Un amount positivo aumenta lo que usted debe; un pago es negativo. El saldo
es acumulado y depende del orden de los movimientos, así que cada entrada informa el
balance que dejó y el previousBalance del que partió. Si solo
necesita el saldo actual, lea /balance: es una llamada en vez de paginar hasta el final.
The balance comes with its currencyId, because a number without a unit is
not a balance. A supplier cannot change currency once it has movements, precisely so this number never
mixes two.
El saldo viene con su currencyId, porque un número sin unidad no es
un saldo. Un proveedor no puede cambiar de moneda una vez que tiene movimientos, justamente para que
este número nunca mezcle dos.
ContactsContactos
A supplier has one contact, a free-text field already published as
contactName. There is no list of contacts per supplier in the application, so there is no
sub-resource for it.
Un proveedor tiene un contacto, un campo de texto libre que ya se
publica como contactName. La aplicación no maneja una lista de contactos por
proveedor, así que no hay sub-recurso para eso.
Supplier categoriesCategorías de proveedor
| Endpoint | What it does |
|---|---|
GET /supplier-categories | Paged listing. page, pageSize, includeInactive. This is also the catalog of categoryId. |
GET /supplier-categories/{id} | One category, active or not. |
POST /supplier-categories | Creates a category. Answers 201. name is required. |
PUT /supplier-categories/{id} | Partial update. |
POST /supplier-categories/{id}/deactivate | Deactivation. Idempotent. |
POST /supplier-categories/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /supplier-categories | Listado paginado. page, pageSize, includeInactive. Es además el catálogo de categoryId. |
GET /supplier-categories/{id} | Una categoría, activa o no. |
POST /supplier-categories | Crea una categoría. Responde 201. name es obligatorio. |
PUT /supplier-categories/{id} | Actualización parcial. |
POST /supplier-categories/{id}/deactivate | Baja. Idempotente. |
POST /supplier-categories/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required, and must be unique among both your active and inactive categories — a deactivated category still blocks its name, the same rule the web application enforces.- Reactivation is rejected under the same rule: it fails if another active category already took the name while this one was deactivated.
- Deactivating a category does not check whether a supplier currently uses it: the application does not enforce that either, so a supplier can be left pointing at an inactive category.
namees obligatorio, y único entre sus categorías activas e inactivas: una categoría desactivada igual bloquea su nombre, la misma regla que aplica la aplicación web.- La reactivación se rechaza con la misma regla: falla si otra categoría activa ya tomó el nombre mientras esta estaba desactivada.
- Desactivar una categoría no revisa si algún proveedor la usa: la aplicación tampoco lo hace, así que un proveedor puede quedar apuntando a una categoría inactiva.
Supplier item mappingsMapeos de ítem de proveedor
Saved mappings from an invoice line description to a system item, used by the application's AI-assisted invoice load to skip lines it already learned to classify. A mapping points to a supply, a service, a complementary product or a spare part — at least one of the four is required.
Mapeos guardados de una descripción de línea de factura a un ítem del sistema, que usa la carga de facturas asistida por IA de la aplicación para saltear líneas que ya aprendió a clasificar. Un mapeo apunta a un insumo, un servicio, un producto complementario o un repuesto — se requiere al menos uno de los cuatro.
| Endpoint | What it does |
|---|---|
GET /supplier-item-mappings | Paged listing. page, pageSize, includeInactive. |
GET /supplier-item-mappings/{id} | One mapping, active or not. |
POST /supplier-item-mappings | Creates a mapping. Answers 201. invoiceDescription and at least one of supplyId, serviceId, complementaryProductId, sparePartId are required. |
PUT /supplier-item-mappings/{id} | Partial update. invoiceDescription is ignored — see below. |
POST /supplier-item-mappings/{id}/deactivate | Deactivation. Idempotent. |
POST /supplier-item-mappings/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /supplier-item-mappings | Listado paginado. page, pageSize, includeInactive. |
GET /supplier-item-mappings/{id} | Un mapeo, activo o no. |
POST /supplier-item-mappings | Crea un mapeo. Responde 201. invoiceDescription y al menos uno de supplyId, serviceId, complementaryProductId, sparePartId son obligatorios. |
PUT /supplier-item-mappings/{id} | Actualización parcial. invoiceDescription se ignora — ver abajo. |
POST /supplier-item-mappings/{id}/deactivate | Baja. Idempotente. |
POST /supplier-item-mappings/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
invoiceDescriptionis required on create, and is normalized before being stored (lowercased, accents stripped, whitespace collapsed) so it compares consistently against future invoice lines.invoiceDescriptionis read-only after creation: it is the lookup key, and the application itself never lets it change once a mapping exists — its own edit screen shows it as plain text, not an input, once the row exists. Sending a different value on aPUThas no effect.- At least one of
supplyId,serviceId,complementaryProductId,sparePartIdis required. supplierIdis optional. Null means the mapping applies to every supplier; a specific supplier's mapping is preferred over a generic one when both would match the same text.- Accounts on the Homebrewer, FREE or Production plan cannot write to this resource — the same restriction the web screen enforces.
invoiceDescriptiones obligatoria en el alta, y se normaliza antes de guardarse (minúsculas, sin acentos, espacios colapsados) para que compare de forma consistente contra futuras líneas de factura.invoiceDescriptiones de solo lectura después de crear: es la clave de búsqueda, y la aplicación misma no la deja cambiar una vez que el mapeo existe — su propia pantalla de edición la muestra como texto plano, no como un campo editable, fuera del alta. Mandar un valor distinto en unPUTno tiene efecto.- Se requiere al menos uno de
supplyId,serviceId,complementaryProductId,sparePartId. supplierIdes opcional. Nulo significa que el mapeo aplica a todos los proveedores; el mapeo específico de un proveedor tiene prioridad sobre uno genérico cuando los dos coinciden con el mismo texto.- Las cuentas en plan Homebrewer, FREE o Producción no pueden escribir en este recurso — la misma restricción que aplica la pantalla web.
ServicesServicios
Not available on the Homebrewer, FREE or Production plans.
Calls from an account on one of those answer 403 plan_forbidden. It is not a
permission an administrator can grant — it is what the plan includes.
No disponible en los planes Homebrewer, FREE ni Producción.
Las llamadas desde una cuenta en alguno de esos responden 403 plan_forbidden. No es
un permiso que el administrador pueda otorgar — es lo que incluye el plan.
A service your account can be billed for by a supplier — an item a purchase can pay
without moving stock, alongside supplies, complementary products and spare parts. This resource is
only the service definition (create/rename/deactivate). Which suppliers offer a
given service is not exposed here: the application only uses that relation to narrow a dropdown,
and it is not data an integrator needs to write — the full catalog already gives you everything
needed to validate serviceId.
Un servicio que su cuenta puede pagarle a un proveedor — un ítem que una
compra puede pagar sin mover stock, junto a insumos, productos complementarios y repuestos. Este
recurso es solo la definición del servicio (crear/renombrar/dar de baja).
Qué proveedores ofrecen un servicio no se expone acá: la aplicación solo usa esa
relación para angostar un combo, y no es un dato que un integrador necesite escribir —
el catálogo completo ya le da todo lo necesario para validar serviceId.
GET /api/v1/purchasable-services already existed before this resource
and is not replaced by it — it keeps being the route validated by
serviceId in supplier item mappings, purchases and
purchase orders. The two paths are deliberately different: GET /services would read as
"the API's own services", which is exactly why the existing catalog was never named that.
GET /api/v1/purchasable-services ya existía antes que este recurso
y no se reemplaza por él — sigue siendo la ruta que valida
serviceId en mapeos de ítem de proveedor,
compras y órdenes de compra. Las dos rutas son distintas a propósito:
GET /services leería como "los servicios de la propia API", que es exactamente
por lo que el catálogo existente nunca se llamó así.
| Endpoint | What it does |
|---|---|
GET /services | Paged listing. search (name), page, pageSize, includeInactive. |
GET /services/{id} | One service, active or not. |
POST /services | Creates a service. Answers 201. name is required. |
PUT /services/{id} | Partial update. 404 for a deactivated id. |
POST /services/{id}/deactivate | Deactivation. Idempotent. |
POST /services/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /services | Listado paginado. search (nombre), page, pageSize, includeInactive. |
GET /services/{id} | Un servicio, activo o no. |
POST /services | Crea un servicio. Responde 201. name es obligatorio. |
PUT /services/{id} | Actualización parcial. 404 para un id desactivado. |
POST /services/{id}/deactivate | Baja. Idempotente. |
POST /services/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required, at most 100 characters, and must be unique among both your active and inactive services.- Deactivation does not check for purchases currently referencing the service — same as the web application, which allows it too (same criterion already applied to product-categories/customer-categories).
- Reactivation is rejected under the same name-uniqueness rule as creation.
- There is no way to assign or read which suppliers offer a service through this endpoint — see above.
namees obligatorio, hasta 100 caracteres, y único entre sus servicios activos e inactivos.- La baja no revisa si alguna compra referencia el servicio — igual que la aplicación web, que también lo permite (mismo criterio ya aplicado a product-categories/customer-categories).
- La reactivación se rechaza con la misma regla de unicidad de nombre que el alta.
- No hay forma de asignar ni leer qué proveedores ofrecen un servicio por este endpoint — ver arriba.
ChecksCheques
Checks received from customers or delivered to suppliers. Full read, edit, registration, collection and deactivation.
A check registered through POST /checks is a RECORD, not
money anywhere yet. In the web application a check is never created on its own: it is
always the side effect of recording a cash or bank-account movement, so it arrives already tied
to one. This endpoint is the one way to register a check that is tied to no movement — the
physical cheque you were handed, before you decide where to deposit it. Such a check will not
appear in any cash-register or bank-account report and will not affect any balance. What turns
it into money is POST /checks/{id}/collect.
Cheques recibidos de clientes o entregados a proveedores. Lectura, edición, registro, cobro y baja completos.
Un cheque registrado por POST /checks es un REGISTRO,
todavía no es plata en ningún lado. En la aplicación web un cheque
nunca se crea solo: siempre es el efecto de registrar un movimiento de caja o de cuenta
bancaria, así que nace ya ligado a uno. Este endpoint es la única vía para
registrar un cheque que no está ligado a ningún movimiento — el cheque
físico que le entregaron, antes de decidir dónde depositarlo. Un cheque así
no aparece en ningún reporte de caja ni de cuenta bancaria y no afecta ningún
saldo. Lo que lo convierte en plata es POST /checks/{id}/collect.
| Endpoint | What it does |
|---|---|
GET /checks | Paged listing. from, to (YYYY-MM-DD, match issue, due or collection date), statusId, page, pageSize. |
GET /checks/{id} | One check, active or not. |
POST /checks | Registers a check. number, amount, issuer, issueDate, dueDate, bankId and kindId are required. Answers 201. Created in portfolio and never collected. |
PUT /checks/{id} | Partial update. statusId and collectionDate are read-only. |
POST /checks/{id}/collect | Collects the check into a cash register or a bank account. Send exactly one of cashRegisterId / bankAccountId, plus collectionDate. Writes one movement on the destination and marks the check collected. |
POST /checks/{id}/deactivate | Deactivates a check with no cash/bank movement linked to it. Not physically deleted: still reachable through GET. |
| Endpoint | Qué hace |
|---|---|
GET /checks | Listado paginado. from, to (YYYY-MM-DD, compara fecha de emisión, vencimiento o cobro), statusId, page, pageSize. |
GET /checks/{id} | Un cheque, activo o no. |
POST /checks | Registra un cheque. number, amount, issuer, issueDate, dueDate, bankId y kindId son obligatorios. Responde 201. Nace en cartera y sin cobrar. |
PUT /checks/{id} | Actualización parcial. statusId y collectionDate son de solo lectura. |
POST /checks/{id}/collect | Cobra el cheque a una caja o a una cuenta bancaria. Mande exactamente uno de cashRegisterId / bankAccountId, más collectionDate. Escribe un movimiento en el destino y marca el cheque como cobrado. |
POST /checks/{id}/deactivate | Da de baja un cheque sin movimiento de caja/banco asociado. No se elimina físicamente: sigue accesible por GET. |
Validation rulesReglas de validación
dueDatemust not be earlier thanissueDate.supplierIdis read-only: the application itself never lets it change once the check exists (onlycustomerIdis editable).customerId: on a check linked to a cash or bank-account movement (which is how almost every check enters the system), sending an explicitnullis silently ignored rather than clearing it — the application only allows clearing it on a check with no such link./deactivaterejects a check linked to any cash or bank-account movement (issued through one, or already collected/delivered through one), an already inactive check, or one loaded by a different user (unless you can see everything). Same six rules the web application itself applies on delete, now shared code.POST /checkscannot create a check that is already collected:collectionDateandstatusIdare read-only, and the four movement ids are not part of the contract at all./collecttakes exactly one destination. An own check (kindId= own) can only be collected into a bank account, and is recorded there as an EXPENSE — collecting your own cheque is money leaving, not arriving./collecton a check that was deposited rejects acollectionDateearlier than the deposit date./collectinto a cash register requires that register's shift to be open, but only if your account works with cash shifts. The main cash register is exempt.- A check can only be collected once.
dueDateno puede ser anterior aissueDate.supplierIdes de solo lectura: la aplicación misma no lo deja cambiar una vez que el cheque existe (solocustomerIdes editable).customerId: en un cheque ligado a un movimiento de caja o cuenta bancaria (así entra casi todo cheque al sistema), mandar unnullexplícito se ignora en vez de vaciarlo — la aplicación solo permite vaciarlo en un cheque sin ese vínculo./deactivaterechaza un cheque ligado a cualquier movimiento de caja o cuenta bancaria (emitido a través de uno, o ya cobrado/entregado a través de uno), uno ya inactivo, o uno cargado por otro usuario (salvo que pueda ver todo). Las mismas seis reglas que la aplicación web aplica hoy al eliminar, ahora en código compartido.POST /checksno puede crear un cheque ya cobrado:collectionDateystatusIdson de solo lectura, y los cuatro ids de movimiento no forman parte del contrato./collectrecibe exactamente un destino. Un cheque propio (kindId= propio) solo se puede cobrar a una cuenta bancaria, y ahí se registra como EGRESO — cobrar un cheque propio es plata que sale, no que entra./collectsobre un cheque depositado rechaza unacollectionDateanterior a la fecha de depósito./collecta una caja exige que el turno de esa caja esté abierto, pero solo si su cuenta trabaja con turnos de caja. La caja grande está exenta.- Un cheque se puede cobrar una sola vez.
WithholdingsRetenciones
Withholdings applied on a payment to your account or to a supplier. Read-only
in this version — no POST or PUT. This is not a scope cut: the
application itself has no operation to create, edit or delete a single withholding — it is always
the side effect of recording a bank-account movement (or, transitively, a collection), and its only
state change is a whole-batch reversal triggered by cancelling that parent movement. Recording a
bank movement IS published now, but deliberately only on its plain path: that endpoint does not
accept withholdings, precisely because a movement that carries them also writes the orders and
purchases being settled.
Retenciones aplicadas sobre un pago a su cuenta o a un proveedor. Solo lectura
en esta versión — no hay POST ni PUT. No es un recorte de
alcance: la aplicación misma no tiene ninguna operación para crear, editar o eliminar
una retención individual — siempre es el efecto colateral de registrar un movimiento de
cuenta bancaria (o, transitivamente, una cobranza), y su único cambio de estado es una
reversa en lote que dispara al cancelar ese movimiento padre. Registrar un movimiento bancario SÍ
está publicado ahora, pero a propósito solo en su camino simple: ese endpoint no
acepta retenciones, justamente porque un movimiento que las lleva también escribe los
pedidos y las compras que cancela.
| Endpoint | What it does |
|---|---|
GET /withholdings | Paged listing. from, to (YYYY-MM-DD, match when it was recorded), active, purchaseId, page, pageSize. |
GET /withholdings/{id} | One withholding, active or not. |
| Endpoint | Qué hace |
|---|---|
GET /withholdings | Listado paginado. from, to (YYYY-MM-DD, compara la fecha de alta), active, purchaseId, page, pageSize. |
GET /withholdings/{id} | Una retención, activa o no. |
Which origin field is populatedQué campo de origen viene poblado
- Exactly one of
purchaseId,orderNumber, or the twokegPurchase*fields is populated, depending on which side originated the withholding — customer/order, supplier/purchase, or supplier/keg purchase. orderNumberand thekegPurchase*fields are text, not ids: to read the order, look it up inGET /ordersby date and match itsnumber; keg purchases (CompraBarril, distinct from the purchase orders inkeg-purchase-orders) are not published either.purchaseIdis a real id because/purchasesalready exists — resolve it there for the purchase's own detail.percentageis informational only: the application never reconciles it againstamount.
- Exactamente uno de
purchaseId,orderNumber, o los dos camposkegPurchase*viene poblado, según de qué lado nació la retención — cliente/pedido, proveedor/compra, o proveedor/compra de barriles. orderNumbery los camposkegPurchase*son texto, no ids: para leer el pedido, búsquelo enGET /orderspor fecha y compare sunumber; las compras de barriles (CompraBarril, distinta de las órdenes de compra dekeg-purchase-orders) tampoco lo están.purchaseIdes un id real porque/purchasesya existe — resuélvalo ahí para el detalle de la compra.percentagees solo informativo: la aplicación nunca lo concilia contraamount.
Bank accountsCuentas bancarias
Bank accounts of your brewery. Full CRUD. Its movements (the transactions on an account) can be listed and recorded. Recording is deliberately narrow: a movement created through this API is a plain one — money in or out, optionally against a customer's or a supplier's current account — and never settles orders or purchases, never carries withholdings, cheques or agenda events. Those paths write orders, purchases and their payment status in the same database transaction, the same territory already kept out of checks and customers/{id}/ledger. A movement cannot be edited or cancelled through this API.
Cuentas bancarias de su cervecería. CRUD completo. Sus movimientos (las transacciones de una cuenta) se pueden listar y registrar. El registro es deliberadamente angosto: un movimiento creado por esta API es un movimiento simple — dinero que entra o sale, opcionalmente contra la cuenta corriente de un cliente o de un proveedor — y nunca cancela pedidos ni compras, nunca lleva retenciones, cheques ni eventos de agenda. Esos caminos escriben pedidos, compras y su estado de pago en la misma transacción de base de datos, el mismo territorio que ya quedó afuera de cheques y de customers/{id}/ledger. Un movimiento no se puede editar ni cancelar por esta API.
| Endpoint | What it does |
|---|---|
GET /bank-accounts | Paged listing. search (cbu, alias or number), includeInactive, page, pageSize. |
GET /bank-accounts/{id} | One bank account, active or not. |
POST /bank-accounts | Creates a bank account. bankId, accountTypeId and currencyId are required. Answers 201. |
PUT /bank-accounts/{id} | Partial update. currencyId cannot change once the account has movements. active is read-only. |
POST /bank-accounts/{id}/deactivate | Deactivates the account. Not physically deleted: still reachable through GET. Idempotent. |
POST /bank-accounts/{id}/activate | Reactivates a previously deactivated account. Idempotent. |
GET /bank-accounts/{id}/movements | Paged listing of the account's movements, most recent first. from, to (YYYY-MM-DD, match the movement date), page, pageSize. |
POST /bank-accounts/{id}/movements | Records a movement on the account. typeId, chartOfAccountId, bankPaymentTypeId, amount and date are required. Optionally customerId (income) or supplierId (expense) to post it to their current account. Answers 201. Does NOT accept vouchers, withholdings, cheques or events. |
| Endpoint | Qué hace |
|---|---|
GET /bank-accounts | Listado paginado. search (cbu, alias o número), includeInactive, page, pageSize. |
GET /bank-accounts/{id} | Una cuenta bancaria, activa o no. |
POST /bank-accounts | Crea una cuenta bancaria. bankId, accountTypeId y currencyId son obligatorios. Responde 201. |
PUT /bank-accounts/{id} | Actualización parcial. currencyId no se puede cambiar una vez que la cuenta tiene movimientos. active es de solo lectura. |
POST /bank-accounts/{id}/deactivate | Da de baja la cuenta. No se elimina físicamente: sigue accesible por GET. Idempotente. |
POST /bank-accounts/{id}/activate | Reactiva una cuenta previamente dada de baja. Idempotente. |
GET /bank-accounts/{id}/movements | Listado paginado de los movimientos de la cuenta, más recientes primero. from, to (YYYY-MM-DD, compara la fecha del movimiento), page, pageSize. |
POST /bank-accounts/{id}/movements | Registra un movimiento en la cuenta. typeId, chartOfAccountId, bankPaymentTypeId, amount y date son obligatorios. Opcionalmente customerId (ingreso) o supplierId (egreso) para impactarlo en su cuenta corriente. Responde 201. NO acepta comprobantes, retenciones, cheques ni eventos. |
Validation rulesReglas de validación
cbuandnumbermust each be unique among your account's bank accounts, active or not.currencyIdcannot change once the account has any bank movement./deactivatehas no check for existing movements or a non-zero balance — the web application itself has none either. This is replicated as-is, not a gap introduced by the API.- A movement's
typeIddecides whetheramountincreases or decreases the balance.amountis SIGNED when you read it back: positive on an income, negative on an expense. When you SEND it on a POST it is always positive —typeIddecides the direction. - On a POST,
chartOfAccountIdmust match the movement direction: an income account on an income, an expense account on an expense.GET /chart-of-accountsexposes theincomeflag so you can filter. - On a POST,
exchangeRateis required when the customer's or supplier's currency differs from the bank account's: without it the amount posted to their current account would be in the wrong currency. It is always the value of 1 unit of the foreign currency in your local currency (e.g. 1450 for USD 1 = ARS 1450), whichever side holds the foreign currency. - A movement's
datecannot be in the future. - On a POST,
generateVoucherissues the movement's voucher: a RECEIPT on an income with acustomerId, a PAYMENT ORDER on an expense with asupplierId. The new document's id comes back asreceiptIdorpaymentOrderId, resolvable at /receipts and /payment-orders. It needs a counterparty: asking for a voucher without one is rejected, because an income with no customer would issue a payment order for money that came IN. - The voucher is issued once, with the movement. There is no way to issue one for a movement recorded earlier.
- Exactly one of a movement's
customerId/supplierIdis populated, matching which side it belongs to.
cbuynumberdeben ser únicos entre las cuentas bancarias de su cuenta, activas o no.currencyIdno se puede cambiar una vez que la cuenta tiene algún movimiento bancario./deactivateno chequea movimientos existentes ni saldo distinto de cero — la aplicación web tampoco lo hace. Se replica tal cual, no es un hueco que introduce la API.- El
typeIdde un movimiento decide siamountaumenta o disminuye el saldo.amountviene CON SIGNO al leerlo: positivo en un ingreso, negativo en un egreso. Cuando lo MANDA en un POST es siempre positivo — eltypeIddecide la dirección. - En un POST,
chartOfAccountIdtiene que coincidir con la dirección del movimiento: una cuenta de ingreso en un ingreso, una de egreso en un egreso.GET /chart-of-accountsexpone el flagincomepara poder filtrar. - En un POST,
exchangeRatees obligatorio cuando la moneda del cliente o del proveedor difiere de la de la cuenta bancaria: sin él, el importe que impacta en su cuenta corriente quedaría en la moneda equivocada. Es siempre el valor de 1 unidad de la moneda extranjera en tu moneda local (por ejemplo, 1450 para USD 1 = ARS 1450), esté la moneda extranjera del lado de la cuenta o del cliente o proveedor. - La
datede un movimiento no puede ser futura. - En un POST,
generateVoucheremite el comprobante del movimiento: un RECIBO en un ingreso concustomerId, una ORDEN DE PAGO en un egreso consupplierId. El id del documento nuevo vuelve comoreceiptIdopaymentOrderId, y se resuelve en /receipts y /payment-orders. Exige contraparte: pedir el comprobante sin ella se rechaza, porque un ingreso sin cliente emitiría una orden de pago por un dinero que ENTRÓ. - El comprobante se emite una sola vez, con el movimiento. No hay forma de emitirlo para un movimiento registrado antes.
- Exactamente uno de
customerId/supplierIdde un movimiento viene poblado, según de qué lado sea.
Chart of accountsPlan de cuentas
Entries of your chart of accounts. Full CRUD. Some entries are system-defined (fixed,
present on every account) and some are your own — name already resolves to the right
label for either kind, and only your own entries can be created, edited or deactivated: a
system-defined id always answers 404 on write, the same way the web application's own
edit screen can never reach one. There is no way to reassign which supplies post their cost to an
account through this endpoint; that stays a web-only operation.
Cuentas del plan de cuentas. CRUD completo. Algunas cuentas son de sistema (fijas,
presentes en toda cuenta) y otras son propias — name ya resuelve la etiqueta correcta
para cualquiera de los dos casos, y solo las propias se pueden crear, editar o dar de baja: un id de
sistema siempre responde 404 al escribir, igual que la propia pantalla de edición
de la web nunca puede alcanzarlo. No hay forma de reasignar qué insumos postean su costo a
una cuenta desde este endpoint; eso sigue siendo una operación solo de la web.
| Endpoint | What it does |
|---|---|
GET /chart-of-accounts | Paged listing, including system-defined entries. search (name), includeInactive, page, pageSize. |
GET /chart-of-accounts/{id} | One entry, active or not. |
POST /chart-of-accounts | Creates an entry. name is required. Answers 201. |
PUT /chart-of-accounts/{id} | Partial update. active is read-only. 404 for a system-defined id. brandId (catalog /brands) assigns the account to a brand, so reports classify its purchases and cash/bank movements by brand: assigning, changing or removing it (null) requires the multi-brand feature on your account, otherwise 400. Sending the brand the account already has, or omitting the field, keeps it. |
POST /chart-of-accounts/{id}/deactivate | Deactivates the entry. Not physically deleted: still reachable through GET. Idempotent. |
POST /chart-of-accounts/{id}/activate | Reactivates a previously deactivated entry. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /chart-of-accounts | Listado paginado, incluidas las cuentas de sistema. search (nombre), includeInactive, page, pageSize. |
GET /chart-of-accounts/{id} | Una cuenta, activa o no. |
POST /chart-of-accounts | Crea una cuenta. name es obligatorio. Responde 201. |
PUT /chart-of-accounts/{id} | Actualización parcial. active es de solo lectura. 404 para un id de sistema. brandId (catálogo /brands) asocia la cuenta a una marca, y los informes clasifican por esa marca sus compras y movimientos de caja y banco: asignarla, cambiarla o quitarla (null) exige tener Multimarca activa en la cuenta, si no responde 400. Mandar la marca que la cuenta ya tiene, u omitir el campo, la conserva. |
POST /chart-of-accounts/{id}/deactivate | Da de baja la cuenta. No se elimina físicamente: sigue accesible por GET. Idempotente. |
POST /chart-of-accounts/{id}/activate | Reactiva una cuenta previamente dada de baja. Idempotente. |
Validation rulesReglas de validación
nameis required and must be unique among your account's entries, active or not.income:truefor income-only,falsefor expense-only,nullfor both. Sending an explicitnullclears it to "both" — a real business state, not ignored./deactivatehas no check for existing movements — the web application itself has none either. It also deactivates any supply that was posting its cost to this account, the same cascade the web application performs.
namees obligatorio y debe ser único entre las cuentas de su cuenta, activas o no.income:truepara solo ingreso,falsepara solo egreso,nullpara ambos. Mandar unnullexplícito lo limpia a "ambos" — un estado de negocio real, no se ignora./deactivateno chequea movimientos existentes — la aplicación web tampoco lo hace. También desactiva cualquier insumo que posteaba su costo a esta cuenta, la misma cascada que hace la aplicación web.
Cash registersCajas
Cash registers of your brewery (not to be confused with bank
accounts). Full CRUD. Two registers are system-defined and shared by every account ("petty cash"
and "main cash register") alongside your own — only your own can be created, edited or deactivated:
a system-defined id always answers 404 on write, the same way the web application's own
edit screen can never reach one. currencyId is always read-only: the application itself
overwrites it with your account's default currency on every save, regardless of what is sent. Its
movements can be listed, and a shift can be opened and closed. Every other movement —
collections, payments, transfers between registers, cashing a cheque, cancellations — is NOT
exposed: those either cross into orders, purchases and their current accounts, or reverse a
batch of entries at once, the same territory already kept out of
bank-movements and checks. Opening and
closing is the one write that touches none of it.
Cajas de su cervecería (no confundir con las cuentas
bancarias). CRUD completo. Dos cajas son de sistema y compartidas por toda cuenta ("caja chica" y
"caja grande") junto a las propias — solo las propias se pueden crear, editar o dar de baja: un id de
sistema siempre responde 404 al escribir, igual que la propia pantalla de edición
de la web nunca puede alcanzarlo. currencyId es siempre de solo lectura: la
aplicación misma la pisa con la moneda default de su cuenta en cada guardado, sin importar qué
se mande. Sus movimientos se pueden listar, y se puede abrir y cerrar un turno. Todo otro
movimiento — cobranzas, pagos, transferencias entre cajas, cobro de cheque, cancelaciones
— NO se expone: esos cruzan pedidos, compras y sus cuentas corrientes, o revierten un lote
de asientos de una, el mismo territorio que ya quedó afuera de
bank-movements y cheques. La apertura y el
cierre son la única escritura que no toca nada de eso.
| Endpoint | What it does |
|---|---|
GET /cash-registers | Paged listing, including system-defined registers. search (name), includeInactive, page, pageSize. |
GET /cash-registers/{id} | One register, active or not. |
POST /cash-registers | Creates a register. name is required. Answers 201. |
PUT /cash-registers/{id} | Partial update. currencyId, balance and active are read-only. 404 for a system-defined id. |
POST /cash-registers/{id}/deactivate | Deactivates the register. Not physically deleted: still reachable through GET. Idempotent. |
POST /cash-registers/{id}/activate | Reactivates a previously deactivated register. Idempotent. |
GET /cash-registers/{id}/movements | Paged listing of the register's movements, most recent first. from, to (YYYY-MM-DD, match the movement date), page, pageSize (capped at 100, lower than the usual 200). Read-only. |
POST /cash-registers/{id}/open | Opens the register's shift with amount in cash. Writes two movements in one transaction: the opening here, and its mirror expense on the main cash register. 400 if the shift is already open. Returns the register with its new balance. |
POST /cash-registers/{id}/close | Closes the register's shift with amount in cash. Mirror income on the main cash register. 400 if the shift is not open. Returns the register with its new balance. |
| Endpoint | Qué hace |
|---|---|
GET /cash-registers | Listado paginado, incluidas las cajas de sistema. search (nombre), includeInactive, page, pageSize. |
GET /cash-registers/{id} | Una caja, activa o no. |
POST /cash-registers | Crea una caja. name es obligatorio. Responde 201. |
PUT /cash-registers/{id} | Actualización parcial. currencyId, balance y active son de solo lectura. 404 para un id de sistema. |
POST /cash-registers/{id}/deactivate | Da de baja la caja. No se elimina físicamente: sigue accesible por GET. Idempotente. |
POST /cash-registers/{id}/activate | Reactiva una caja previamente dada de baja. Idempotente. |
GET /cash-registers/{id}/movements | Listado paginado de los movimientos de la caja, más recientes primero. from, to (YYYY-MM-DD, compara la fecha del movimiento), page, pageSize (tope 100, más bajo que el habitual de 200). Solo lectura. |
POST /cash-registers/{id}/open | Abre el turno de la caja con amount en efectivo. Escribe dos movimientos en una transacción: la apertura acá y su egreso espejo en la caja grande. 400 si el turno ya está abierto. Devuelve la caja con su saldo nuevo. |
POST /cash-registers/{id}/close | Cierra el turno de la caja con amount en efectivo. Ingreso espejo en la caja grande. 400 si el turno no está abierto. Devuelve la caja con su saldo nuevo. |
Validation rulesReglas de validación
nameis required. There is no uniqueness rule — none exists today, not even in the web application.currencyIdcannot be set through this endpoint: the application always overwrites it with your account's default currency on every save.assignedUserIdis not published: there is no catalog of users yet.assignedUserNameis exposed instead, read-only, already resolved to text./deactivatehas no check for existing movements — the web application itself has none either. Replicated as-is, not a gap introduced by the API.- Movements:
pageSizecaps at 100 for this sub-resource, not the usual 200 — the underlying query's own limit, already tuned and verified against real data. - Movements: a shift can be opened and closed, but there is no other
POST, no cancellation and no transfer — see the remarks onCashMovementDto. /openand/closetake anamountthat must be zero or positive. Zero is valid: that is how a shift opens with no float.- The main cash register has no shift of its own to open or close: it is the register every
other one mirrors into. Asking for it answers
400.
namees obligatorio. No hay regla de unicidad — no existe ninguna hoy, ni siquiera en la aplicación web.currencyIdno se puede fijar desde este endpoint: la aplicación siempre la pisa con la moneda default de su cuenta en cada guardado.assignedUserIdno está publicado: todavía no hay catálogo de usuarios. En su lugar se exponeassignedUserName, de solo lectura, ya resuelto a texto./deactivateno chequea movimientos existentes — la aplicación web tampoco lo hace. Se replica tal cual, no es un hueco que introduce la API.- Movimientos:
pageSizetiene tope de 100 para este sub-recurso, no el habitual de 200 — el límite propio de la query subyacente, ya ajustado y verificado contra datos reales. - Movimientos: se puede abrir y cerrar un turno, pero no hay ningún otro
POST, ni cancelación ni transferencia — ver las notas deCashMovementDto. /openy/closereciben unamountque tiene que ser cero o positivo. Cero es válido: así se abre un turno sin fondo fijo.- La caja grande no tiene turno propio para abrir ni cerrar: es la caja contra la que se
espeja cada apertura y cierre. Pedirlo responde
400.
PurchasesCompras
These endpoints move stock and money. Every line that points at a supply, a complementary product or a spare part changes the stock on hand, and the purchase is posted to the supplier's current account. That makes them the endpoints where a blind retry costs the most: send an idempotency key on every write.
Estos endpoints mueven stock y dinero. Cada línea que apunta a un insumo, a un producto complementario o a un repuesto cambia el stock disponible, y la compra se imputa a la cuenta corriente del proveedor. Eso los vuelve los endpoints donde un reintento a ciegas sale más caro: mande una clave de idempotencia en toda escritura.
| Endpoint | What it does |
|---|---|
GET /purchases | Paged listing, most recent first, without lines. dateFrom, dateTo, supplierId, purchaseTypeId, search (voucher numbers), page, pageSize, includeCancelled. |
GET /purchases/{id} | One purchase with its lines. |
POST /purchases | Records a purchase or a credit note, with its lines. Answers 201. |
PUT /purchases/{id} | Partial update. What you may change depends on how much has been paid. |
POST /purchases/{id}/cancel | Voids it, reversing the stock and current-account movements. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /purchases | Listado paginado, más recientes primero, sin las líneas. dateFrom, dateTo, supplierId, purchaseTypeId, search (números de comprobante), page, pageSize, includeCancelled. |
GET /purchases/{id} | Una compra con sus líneas. |
POST /purchases | Registra una compra o una nota de crédito, con sus líneas. Responde 201. |
PUT /purchases/{id} | Actualización parcial. Qué se puede cambiar depende de cuánto se pagó. |
POST /purchases/{id}/cancel | La anula, revirtiendo los movimientos de stock y de cuenta corriente. Idempotente. |
LinesLíneas
A line points at exactly one destination, and the destination decides
what moves: supplyId stocks a raw material, complementaryProductId a complementary
product, sparePartId a spare part, serviceId pays for a service and moves
no stock. A line with none of the four is valid too — it is an expense described in text.
Una línea apunta a exactamente un destino, y el destino decide
qué se mueve: supplyId ingresa un insumo, complementaryProductId un producto
complementario, sparePartId un repuesto, serviceId paga un servicio y no
mueve stock. Una línea sin ninguno de los cuatro también es válida: es un gasto
descripto en texto.
Sending lines replaces the whole collection; omitting it
keeps the current lines untouched. There is no per-line merge on purpose: with one, "remove a line"
and "do not mention a line" would be the same request.
Mandar lines reemplaza la colección entera; omitirla
conserva las líneas actuales. No hay fusión línea por línea a
propósito: con una, "borrar una línea" y "no mencionar una línea" serían el
mismo request.
Validation rulesReglas de validación
supplierIdis required.- Either
invoiceNumberordeliveryNoteNumberis required. AndinvoiceNumberspecifically becomes required as soon as the purchase carries any amount: without an invoice there is no voucher to charge the expense to. - The same
invoiceNumbercannot be recorded twice for the same supplier. - Every line needs a
descriptionand aquantitygreater than zero. - When a line stocks a supply, its
unitIdmust be convertible to that supply's own base unit. Kilograms into a supply measured in litres does not convert, and is rejected. - Each number in
externalLotsis limited to 50 characters. - A credit note (
purchaseTypeId= 2) needscreditNoteNumberinstead of an invoice number. purchaseTypeIdcannot be changed after creation: a purchase and a credit note move stock in opposite directions, and the movement has already been applied.- Voiding is rejected when the purchase has payments applied, or credit notes against it. Void those first — the message names them.
- A credit note, and voiding a purchase, take stock out. On an account that blocks negative stock (of supplies or of spare parts), they are rejected if they would leave a supply or a spare part below zero in its warehouse. Nothing is recorded.
purchaseOrderIdis optional. Allowed values:GET /api/v1/purchase-orders. Recording a purchase with it set is what advances that order'sapplied/completedstate.
supplierIdes obligatorio.- Hace falta
invoiceNumberodeliveryNoteNumber. YinvoiceNumberen particular pasa a ser obligatorio en cuanto la compra tiene algún importe: sin factura no hay comprobante contra el que imputar el gasto. - El mismo
invoiceNumberno se puede registrar dos veces para el mismo proveedor. - Cada línea necesita
descriptiony unaquantitymayor que cero. - Cuando una línea ingresa un insumo, su
unitIdtiene que ser convertible a la unidad base de ese insumo. Kilos a un insumo medido en litros no convierte, y se rechaza. - Cada número de
externalLotsadmite hasta 50 caracteres. - Una nota de crédito (
purchaseTypeId= 2) necesitacreditNoteNumberen lugar de número de factura. purchaseTypeIdno se puede cambiar después del alta: una compra y una nota de crédito mueven el stock en sentidos opuestos, y el movimiento ya se aplicó.- La anulación se rechaza si la compra tiene pagos aplicados o notas de crédito asociadas. Anule primero esas: el mensaje las nombra.
- Una nota de crédito, y la anulación de una compra, sacan stock. En una cuenta que bloquea el stock negativo (de insumos o de repuestos), se rechazan si dejarían un insumo o un repuesto por debajo de cero en su depósito. No se graba nada.
purchaseOrderIdes opcional. Valores permitidos:GET /api/v1/purchase-orders. Registrar una compra con este campo es lo que avanza elapplied/completedde esa orden.
Header and lines must agreeLa cabecera y las líneas tienen que coincidir
If the subtotal of the header does not match the sum of the line costs, the
request is rejected with 400 header_detail_mismatch and the message states both amounts
and the difference. This is not a formatting complaint: the mismatch is almost always a data entry
error, and once the purchase is paid it can no longer be corrected. Fix the amounts, or re-send the
same request with "confirmDiscrepancy": true to record it as is. A tolerance of the
larger of 1 or 0.5% is allowed before the guard fires.
Si el subtotal de la cabecera no coincide con la suma de los costos de las
líneas, el request se rechaza con 400 header_detail_mismatch y el mensaje indica
los dos importes y la diferencia. No es una queja de formato: la discrepancia casi siempre es un error
de carga, y una vez que la compra está pagada ya no se puede corregir. Corrija los importes, o
reenvíe el mismo request con "confirmDiscrepancy": true para registrarla tal cual.
Se tolera hasta el mayor entre 1 y el 0,5% antes de que la guarda salte.
What you may change, and whenQué se puede cambiar, y cuándo
| State of the purchase | What PUT accepts |
|---|---|
| Nothing paid | Amounts, lines, voucher numbers, dates and the expense account. The supplier only while the purchase has no lines. Spare-part lines can only be added to a purchase that has no lines yet, and the lines of a purchase that already has a spare part cannot change. |
| Partially paid | Only the dates. |
| Fully paid, or already voided | Nothing. Void it and record it again. |
| Estado de la compra | Qué acepta el PUT |
|---|---|
| Sin pagos | Importes, líneas, números de comprobante, fechas y cuenta contable. El proveedor solo mientras la compra no tenga líneas. Las líneas de repuesto solo se pueden agregar a una compra que todavía no tiene líneas, y las líneas de una compra que ya tiene un repuesto no se pueden cambiar. |
| Con pago parcial | Solo las fechas. |
| Totalmente pagada, o ya anulada | Nada. Anúlela y regiéstrela de nuevo. |
A change the current state does not allow answers 400 business_rule; it is
never silently ignored. Changing amounts or lines reverses the movements of the previous version and
applies the new ones.
Un cambio que el estado actual no permite responde 400 business_rule; nunca
se ignora en silencio. Cambiar importes o líneas revierte los movimientos de la versión
anterior y aplica los nuevos.
Not in v1Fuera de v1
The Argentine perceptions detail, registering payments, and file attachments. The first needs its own resource with its own catalog; the second is a multipart upload, which this API does not accept. Neither is required to record a purchase.
El detalle de percepciones de Argentina, registrar pagos, y los archivos adjuntos. El primero necesita su propio recurso con su catálogo; el segundo es una subida multipart, que esta API no acepta. Ninguno hace falta para registrar una compra.
Purchase ordersÓrdenes de compra
An intent to buy from a supplier, before any stock or money moves — not to be confused
with purchases (which does). Registering a purchase that references this order is what
advances applied/completed; nothing here moves stock or your supplier's
current account by itself.
Una intención de compra a un proveedor, antes de que se mueva stock o dinero
— no confundir con purchases (que sí lo hace). Registrar una compra que
referencia esta orden es lo que avanza applied/completed; nada de esto
mueve stock ni la cuenta corriente del proveedor por sí solo.
| Endpoint | What it does |
|---|---|
GET /purchase-orders | Paged listing, most recent first, without detail lines. search (order number, supplier name), page, pageSize, includeInactive. |
GET /purchase-orders/{id} | One order, active or not, with its detail lines. |
POST /purchase-orders | Creates an order. Answers 201. supplierId and detailLines are required — at least one line. |
PUT /purchase-orders/{id} | Partial update. detailLines absent leaves the lines untouched; present (even empty) replaces every line — but empty is rejected, same rule as create. |
POST /purchase-orders/{id}/deactivate | Deactivation. Idempotent. |
POST /purchase-orders/{id}/activate | Reactivation. Idempotent. |
POST /purchase-orders/{id}/complete | Manual closing. Independent of whether any purchase has been applied against it. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /purchase-orders | Listado paginado, del más reciente al más viejo, sin las líneas de detalle. search (número de orden, nombre del proveedor), page, pageSize, includeInactive. |
GET /purchase-orders/{id} | Una orden, activa o no, con sus líneas de detalle. |
POST /purchase-orders | Crea una orden. Responde 201. supplierId y detailLines son obligatorios — al menos una línea. |
PUT /purchase-orders/{id} | Actualización parcial. detailLines ausente conserva las líneas; presente (incluso vacío) reemplaza todas — pero vacío se rechaza, misma regla que al crear. |
POST /purchase-orders/{id}/deactivate | Baja. Idempotente. |
POST /purchase-orders/{id}/activate | Reactivación. Idempotente. |
POST /purchase-orders/{id}/complete | Cierre manual. Independiente de si se aplicó una compra contra ella. Idempotente. |
LinesLíneas
Same shape as a purchase's lines: a line points at exactly one of
supplyId, complementaryProductId, sparePartId or
serviceId — no warehouseId here, an order does not stock anything yet.
deliveredQuantity/remainingQuantity are read-only: only registering a
purchase against this order moves them.
Misma forma que las líneas de una compra: una línea apunta a
exactamente uno de supplyId, complementaryProductId,
sparePartId o serviceId — sin warehouseId acá,
una orden todavía no ingresa nada a stock. deliveredQuantity/
remainingQuantity son de solo lectura: solo registrar una compra contra esta orden las
mueve.
Validation rulesReglas de validación
supplierIdis required.detailLinesmust have at least one entry.notesis limited to 500 characters.
supplierIdes obligatorio.detailLinestiene que tener al menos un elemento.notesadmite hasta 500 caracteres.
Not in v1Fuera de v1
Emailing the order to the supplier (same optional-follow-up pattern already excluded
elsewhere in this API — the order is complete and valid without the email), the calendar entries
linked to an order (different save semantics, a sub-model shared with other entities), and
keg-purchase-orders (a fully separate entity with no code in common with this one,
despite the similar name).
Enviar la orden por mail al proveedor (mismo patrón de acción opcional
encadenada ya excluido en el resto de esta API — la orden queda completa y válida sin
el mail), la agenda de fechas ligada a una orden (semántica de guardado distinta, un sub-modelo
compartido con otras entidades), y keg-purchase-orders (una entidad completamente
aparte, sin código en común con esta, pese al nombre parecido).
Keg purchase ordersÓrdenes de compra de barriles
An intent to buy kegged product from a distributor's supplier, before any stock
moves — a fully separate resource from purchase-orders, despite the similar name: no
code in common, own model, own module (CompraDistribuidora). Registering a delivery
against this order is what advances applied/completed, but that side is
not published in v1 yet; nothing here moves stock by itself.
Una intención de compra de producto embarrilado a un proveedor de la
distribuidora, antes de que se mueva stock — un recurso completamente aparte de
purchase-orders, pese al nombre parecido: sin código en común, modelo propio,
módulo propio (CompraDistribuidora). Registrar una entrega contra esta orden es lo que
avanza applied/completed, pero ese lado todavía no está
publicado en v1; nada de esto mueve stock por sí solo.
| Endpoint | What it does |
|---|---|
GET /keg-purchase-orders | Paged listing, most recent first, without detail lines. search (order number, supplier name), page, pageSize, includeInactive. |
GET /keg-purchase-orders/{id} | One order, active or not, with its detail lines. |
POST /keg-purchase-orders | Creates an order. Answers 201. supplierId and detailLines are required — at least one line, and every line needs a productId. |
PUT /keg-purchase-orders/{id} | Partial update. detailLines absent leaves the lines untouched; present (even empty) replaces every line — but empty is rejected, same rule as create. |
POST /keg-purchase-orders/{id}/deactivate | Deactivation. Idempotent. |
POST /keg-purchase-orders/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /keg-purchase-orders | Listado paginado, del más reciente al más viejo, sin las líneas de detalle. search (número de orden, nombre del proveedor), page, pageSize, includeInactive. |
GET /keg-purchase-orders/{id} | Una orden, activa o no, con sus líneas de detalle. |
POST /keg-purchase-orders | Crea una orden. Responde 201. supplierId y detailLines son obligatorios — al menos una línea, y cada línea necesita un productId. |
PUT /keg-purchase-orders/{id} | Actualización parcial. detailLines ausente conserva las líneas; presente (incluso vacío) reemplaza todas — pero vacío se rechaza, misma regla que al crear. |
POST /keg-purchase-orders/{id}/deactivate | Baja. Idempotente. |
POST /keg-purchase-orders/{id}/activate | Reactivación. Idempotente. |
LinesLíneas
containerId and caseId are mutually exclusive with a
"loose" keg (free liters) — same criterion as a product's sales formats.
deliveredQuantity/remainingQuantity and costPerLiter are
read-only: only a delivery registered against this order moves the first two, and the product's
cost at save time fills the last one.
containerId y caseId son mutuamente excluyentes con un
barril "suelto" (liters libre) — mismo criterio que un formato de venta de un
producto. deliveredQuantity/remainingQuantity y costPerLiter
son de solo lectura: solo una entrega registrada contra esta orden mueve las dos primeras, y el
costo del producto al momento de guardar completa la última.
Validation rulesReglas de validación
supplierIdis required.detailLinesmust have at least one entry, and every line requiresproductId.
supplierIdes obligatorio.detailLinestiene que tener al menos un elemento, y cada línea requiereproductId.
Not in v1Fuera de v1
Emailing the order to the supplier (same optional-follow-up pattern already excluded
elsewhere in this API — the order is complete and valid without the email), the calendar entries
linked to an order (different save semantics, a sub-model shared with other entities), and
registering a delivery against the order — that is distributor-purchases, a separate
resource not published yet, so applied/completed/deliveredQuantity
only change once it is.
Enviar la orden por mail al proveedor (mismo patrón de acción opcional
encadenada ya excluido en el resto de esta API — la orden queda completa y válida sin
el mail), la agenda de fechas ligada a una orden (semántica de guardado distinta, un sub-modelo
compartido con otras entidades), y registrar una entrega contra la orden — eso es
distributor-purchases, un recurso aparte todavía no publicado, así que
applied/completed/deliveredQuantity solo cambian cuando lo
esté.
ProductsProductos
| Endpoint | What it does |
|---|---|
GET /products | Paged listing, without sales formats. search (name, style, code), complementaryOnly, page, pageSize, includeInactive. |
GET /products/{id} | One product with its containers and cases. |
POST /products | Creates a product, optionally with its prices per container and per case. Answers 201. |
PUT /products/{id} | Partial update. |
POST /products/{id}/deactivate | Deactivation. Idempotent. |
POST /products/{id}/activate | Reactivation. Idempotent. |
GET /products/{id}/categories | Categories assigned to the product. |
GET /products/{id}/stock | Current stock, by warehouse. See below. |
POST /products/{id}/stock/pack | Assembles loose containers into cases. See below. |
POST /products/{id}/stock/unpack | Disassembles cases into loose containers. See below. |
| Endpoint | Qué hace |
|---|---|
GET /products | Listado paginado, sin los formatos de venta. search (nombre, estilo, código), complementaryOnly, page, pageSize, includeInactive. |
GET /products/{id} | Un producto con sus envases y cajas. |
POST /products | Crea un producto, opcionalmente con sus precios por envase y por caja. Responde 201. |
PUT /products/{id} | Actualización parcial. |
POST /products/{id}/deactivate | Baja. Idempotente. |
POST /products/{id}/activate | Reactivación. Idempotente. |
GET /products/{id}/categories | Categorías asignadas al producto. |
GET /products/{id}/stock | Stock actual, por depósito. Ver más abajo. |
POST /products/{id}/stock/pack | Arma cajas a partir de envases sueltos. Ver más abajo. |
POST /products/{id}/stock/unpack | Desarma cajas en envases sueltos. Ver más abajo. |
Sales formats: containers and casesFormatos de venta: envases y cajas
A product has one base price (priceWithoutTax) and, optionally, one price
per format it is sold in. A container is an individual unit — a bottle, a
can, a keg. A case groups several of them: a six-pack of 355 ml cans, a crate of twelve
bottles. Send them in the same request that creates the product:
Un producto tiene un precio base (priceWithoutTax) y, opcionalmente, un
precio por cada formato en el que se vende. Un envase es una unidad
individual: una botella, una lata, un barril. Una caja agrupa varios: un six-pack de latas de
355 ml, un cajón de doce botellas. Se mandan en el mismo request que crea el producto:
POST /api/v1/products
{
"style": "IPA",
"name": "Hoppy Trails",
"priceWithoutTax": 1200,
"containers": [
{ "containerId": 3, "price": 1500, "unitCost": 620, "code": "IPA-500" },
{ "containerId": 7, "price": 9800, "unitCost": 4100, "code": "IPA-KEG20" }
],
"cases": [
{ "caseId": 12, "price": 8200, "unitCost": 3600, "code": "IPA-SIXPACK" }
]
}
containerId comes from GET /api/v1/containers and
caseId from GET /api/v1/cases. An id outside its catalog answers
400 invalid_reference naming the position, as in
containers[1].containerId.
containerId sale de GET /api/v1/containers y
caseId de GET /api/v1/cases. Un id fuera de su catálogo responde
400 invalid_reference nombrando la posición, como
containers[1].containerId.
Sending a collection replaces it whole. A format you leave out of a
containers array you did send is removed, and its price is lost. Omitting
containers altogether keeps every format exactly as it is — so you never need to resend
formats you are not changing. The same applies to cases and to
categoryIds.
Mandar una colección la reemplaza entera. Un formato que quede
afuera de un arreglo containers que sí envió se elimina, y su precio se
pierde. Omitir containers del todo conserva cada formato tal cual está: así
nunca tiene que reenviar formatos que no está cambiando. Lo mismo vale para
cases y para categoryIds.
Validation rulesReglas de validación
styleis required. It is the main part of the product's display name.nameis required whenisComplementaryis true, and must not match another active product.- A discount product (
productTypeIdpointing at the discount type) must havepriceWithoutTaxof zero or less: a positive one would add to the order instead of discounting it. tracksStockcan only be false on a complementary product. On a beer you brew it is ignored — brewed beer always has stock.- Removing a container or a case is rejected while the product appears in an order that has not been delivered yet: the order names that format, and it would be left pointing at nothing.
- Deactivation is rejected while the product is still in play — kegs or containers holding it, batches or batch plans producing it, orders not yet delivered, or stock on hand, including stock of a mix pack that contains it. The message names which one.
stylees obligatorio. Es la parte principal del nombre visible del producto.namees obligatorio cuandoisComplementaryes true, y no puede coincidir con el de otro producto activo.- Un producto de bonificación (con
productTypeIdapuntando al tipo bonificación) tiene que tenerpriceWithoutTaxcero o negativo: uno positivo sumaría al pedido en lugar de descontar. tracksStocksolo puede ser false en un producto complementario. En una cerveza propia se ignora: la cerveza que usted elabora siempre lleva stock.- Quitar un envase o una caja se rechaza mientras el producto aparezca en un pedido sin entregar: el pedido nombra ese formato y quedaría apuntando a nada.
- La baja se rechaza mientras el producto siga en juego: barriles o envases que lo contengan, lotes o planificaciones que lo produzcan, pedidos sin entregar, o stock disponible — incluido el stock de un mix pack que lo contenga. El mensaje indica cuál.
Not in v1Fuera de v1
The flags of the external-user portal, and assigning price lists to customers.
isMixPack is readable but not writable here: defining a mix pack has its own resource,
/mix-packs.
Los flags del portal de usuarios externos, y asignar listas de precio a los clientes.
isMixPack se puede leer pero no escribir acá: definir un mix pack tiene su propio
recurso, /mix-packs.
Stock, by warehouseStock, por depósito
GET /products/{id}/stock requires the Stock module, not
Products. It answers narrowed to the warehouses your integration user is allowed to
use — same rule as /warehouses: a warehouse with stock the
user cannot see is left out, not reported as zero.
GET /products/{id}/stock pide el módulo Stock, no
Products. Responde limitado a los depósitos que su usuario de integración
puede usar — misma regla que /warehouses: un
depósito con stock que el usuario no puede ver queda afuera, no se informa en cero.
productKind (own, mixPack or
complementary) decides which fields of each entry in byWarehouse carry a
value: own sets containers and cases; the other two set
quantity. A complementary product with tracksStock = false — or any
product that does not carry physical stock, such as a discount or surcharge line — answers with an
empty byWarehouse, not an error. minimumStock is not repeated here: read it
from GET /products/{id}, where it applies regardless of productKind.
productKind (own, mixPack o
complementary) decide qué campos de cada entrada de byWarehouse
llevan valor: own completa containers y cases; los otros dos
completan quantity. Un producto complementario con tracksStock = false
—o cualquier producto que no lleve stock físico, como una bonificación o un
recargo— responde con byWarehouse vacío, no con un error.
minimumStock no se repite acá: se lee de GET /products/{id}, donde
vale sin importar el productKind.
Assembling and disassembling casesArmado y desarmado de cajas
POST /products/{id}/stock/pack assembles loose containers into cases;
POST /products/{id}/stock/unpack reverses it. Both take warehouseId,
caseId and cases (how many). There is no containerId: the
container comes from the case format itself (GET /api/v1/cases), so a mismatched pair
can never be sent. Both answer with the product's updated stock in that warehouse, the same shape as
GET /products/{id}/stock.
POST /products/{id}/stock/pack arma cajas a partir de envases sueltos;
POST /products/{id}/stock/unpack hace lo inverso. Los dos piden
warehouseId, caseId y cases (cuántas). No hay
containerId: el envase sale del propio formato de caja (GET /api/v1/cases),
así que nunca se puede mandar un par inconsistente. Los dos responden con el stock
actualizado del producto en ese depósito, la misma forma que
GET /products/{id}/stock.
⚠️ Neither endpoint targets a specific batch, invoice or delivery note. The application's own screen lets you pick one; the API instead consumes across all the stock your account has for that product and case in the warehouse, oldest-expiring-first (FEFO). The containers or cases it creates carry no batch attribution.
⚠️ Ninguno de los dos apunta a un lote, factura o remito puntual. La pantalla de la aplicación deja elegir uno; la API en cambio consume sobre todo el stock que su cuenta tiene de ese producto y esa caja en el depósito, empezando por el que vence antes (FEFO). Los envases o cajas que crea quedan sin atribución de lote.
Only own products support this — a mix pack or a complementary product
answers 400. Disassembling a mix pack splits stock across several different products at
once, which is not a per-product operation, so it is not part of /unpack and is not in
v1.
Solo los productos own lo soportan: un mix pack o un producto
complementario responde 400. Desarmar un mix pack reparte stock entre varios productos
distintos a la vez, que no es una operación por producto, así que no forma parte de
/unpack y no está en v1.
⚠ Not included: kegs or bulk beer in a tank⚠ No incluye: barriles ni cerveza a granel en tanque
Keg stock by warehouse belongs to the future kegs resource, not designed
yet. Bulk beer still fermenting or maturing in a tank belongs to a future
tanks/{id}/content sub-resource, not designed yet either. A product sold both packaged
and kegged, or with an active batch in a tank, only shows its packaged and mix-pack stock here — the
rest is a known gap until those resources exist.
El stock de barriles por depósito es del futuro recurso kegs,
todavía sin diseñar. La cerveza a granel fermentando o madurando en un tanque es de un
futuro sub-recurso tanks/{id}/content, también sin diseñar. Un producto que
se vende envasado y embarrilado a la vez, o que tiene un lote activo en tanque, solo muestra acá su
stock envasado y de mix-pack — el resto es un hueco conocido hasta que esos recursos existan.
Product categoriesCategorías de producto
| Endpoint | What it does |
|---|---|
GET /product-categories | Paged listing. search (name), page, pageSize, includeInactive. This is also the catalog of a product's categoryIds. |
GET /product-categories/{id} | One category, active or not. |
POST /product-categories | Creates a category. Answers 201. name is required. |
PUT /product-categories/{id} | Partial update. active is read-only. |
POST /product-categories/{id}/deactivate | Deactivation. Idempotent. No check for products currently using this category. |
POST /product-categories/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /product-categories | Listado paginado. search (nombre), page, pageSize, includeInactive. Es además el catálogo de categoryIds de un producto. |
GET /product-categories/{id} | Una categoría, activa o no. |
POST /product-categories | Crea una categoría. Responde 201. name es obligatorio. |
PUT /product-categories/{id} | Actualización parcial. active es de solo lectura. |
POST /product-categories/{id}/deactivate | Baja. Idempotente. No chequea productos que usen la categoría. |
POST /product-categories/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required and must be unique among your account's categories, active or not.hasAssociatedProductsis read-only, informational — it does not block/deactivate./deactivatehas no check for products currently using the category — the web application itself has none either.
namees obligatorio y debe ser único entre las categorías de su cuenta, activas o no.hasAssociatedProductses de solo lectura, informativo — no bloquea/deactivate./deactivateno chequea productos que usen la categoría — la aplicación web tampoco lo hace.
Price listsListas de precios
| Endpoint | What it does |
|---|---|
GET /price-lists | Paged listing, without prices. search (name), pointsListsOnly, page, pageSize, includeInactive. |
GET /price-lists/{id} | One list with all of its prices. |
POST /price-lists | Creates a list, optionally with its prices. Answers 201. |
PUT /price-lists/{id} | Partial update. See the note on items below — it does not behave like the other collections. |
POST /price-lists/{id}/deactivate | Deactivation. Idempotent. |
POST /price-lists/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /price-lists | Listado paginado, sin los precios. search (nombre), pointsListsOnly, page, pageSize, includeInactive. |
GET /price-lists/{id} | Una lista con todos sus precios. |
POST /price-lists | Crea una lista, opcionalmente con sus precios. Responde 201. |
PUT /price-lists/{id} | Actualización parcial. Lea la nota sobre items: no se comporta como las demás colecciones. |
POST /price-lists/{id}/deactivate | Baja. Idempotente. |
POST /price-lists/{id}/activate | Reactivación. Idempotente. |
A list prices by percentage, by explicit price, or by bothUna lista trabaja por porcentaje, por precio explícito, o por los dos
percentage applies over the product's base price for everything the list
does not price explicitly. items holds the explicit prices. A price is identified by the
combination of product + container + case: only the product (the loose unit), product
and container (the bottle), or product and case (the pack). Prices are always net of taxes; the taxes
come from the product.
percentage se aplica sobre el precio base del producto para todo lo que la
lista no tarifa explícitamente. items son los precios explícitos. Un precio
se identifica por la combinación producto + envase + caja: solo producto (la
unidad suelta), producto y envase (la botella), o producto y caja (el pack). Los precios siempre van
sin impuestos; los impuestos salen del producto.
POST /api/v1/price-lists
{
"name": "Mayorista",
"percentage": 12.5,
"items": [
{ "productId": 88, "containerId": 3, "priceWithoutTax": 1350.50 },
{ "productId": 88, "caseId": 12, "priceWithoutTax": 7200 }
]
}
⚠ items is merged, not replaced⚠ items se fusiona, no se reemplaza
This is the one place in the API where sending a collection does not
replace it. Each entry is matched by product, container and case: a match is updated, anything else is
added, and prices you do not send are kept. An empty items array
therefore changes nothing.
Es el único lugar de la API donde mandar una colección no
la reemplaza. Cada entrada se busca por producto, envase y caja: la que coincide se actualiza,
cualquier otra se agrega, y los precios que no manda se conservan. Un arreglo
items vacío, entonces, no cambia nada.
It works that way because that is what the application itself does when it saves a list, and an API that deleted what the screen keeps would give the same operation two behaviours. Consequence: removing a price from a list is not possible in this version. Setting it to zero is, which is what the screen offers anyway.
Funciona así porque es lo que hace la aplicación al guardar una lista, y una API que borrara lo que la pantalla conserva le daría dos comportamientos a la misma operación. Consecuencia: sacar un precio de una lista no se puede en esta versión. Ponerlo en cero sí, que es lo que la pantalla ofrece de todos modos.
Validation rulesReglas de validación
nameis required, and must not match another list of your account — including a deactivated one, because reactivating it would leave two lists with the same name.percentagecannot exceed9999.99, and no price can exceed9999999999.99999: those are the limits of the columns.isPointsListmarks a list that prices in loyalty points instead of money. The two are not interchangeable: the customer's balance is counted in different units.- Omitting
currencyIduses your account's currency.
namees obligatorio, y no puede coincidir con el de otra lista de su cuenta —incluida una dada de baja, porque reactivarla dejaría dos listas con el mismo nombre—.percentageno puede pasar de9999.99, y ningún precio puede pasar de9999999999.99999: son los límites de las columnas.isPointsListmarca una lista que tarifa en puntos de fidelización en vez de dinero. No son intercambiables: el saldo del cliente se cuenta en unidades distintas.- Si omite
currencyIdse usa la moneda de su cuenta.
Not in v1Fuera de v1
Assigning a list to a customer — that is the customer's priceListId
— bulk price changes, and removing a price from a list.
Asignarle una lista a un cliente —eso es el priceListId del
cliente—, el cambio masivo de precios, y sacar un precio de una lista.
Mix packsMix packs
| Endpoint | What it does |
|---|---|
GET /mix-packs | Paged listing, without contents. search, page, pageSize, includeInactive. |
GET /mix-packs/{id} | One mix pack with its contents. |
POST /mix-packs | Defines a mix pack. Answers 201. It has to carry something: send items, complementaryItems, or both. |
PUT /mix-packs/{id} | Partial update. |
POST /mix-packs/{id}/deactivate | Deactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /mix-packs | Listado paginado, sin la composición. search, page, pageSize, includeInactive. |
GET /mix-packs/{id} | Un mix pack con su composición. |
POST /mix-packs | Define un mix pack. Responde 201. Tiene que llevar algo: mande items, complementaryItems, o los dos. |
PUT /mix-packs/{id} | Actualización parcial. |
POST /mix-packs/{id}/deactivate | Baja. Idempotente. |
There is no /activate here, and it is not an oversight: the application has
never had a way to reactivate a mix pack. Publishing one would be inventing an operation that does not
exist.
Acá no hay /activate, y no es un olvido: la aplicación nunca
tuvo forma de reactivar un mix pack. Publicar una sería inventar una operación que no
existe.
Defining a pack is not assembling itDefinir un pack no es armarlo
This resource publishes the definition: which beers, in which containers, how many of each, plus any complementary products that come along — a glass, an opener. Producing units of the pack is a different operation: it takes containers out of the warehouse and has its own stock movements and traceability, which this version does not publish.
Este recurso publica la definición: qué cervezas, en qué envases, cuántas de cada una, más los complementarios que lo acompañan —un vaso, un destapador—. Producir unidades del pack es otra operación: saca envases del depósito y tiene sus propios movimientos de stock y trazabilidad, que esta versión no publica.
POST /api/v1/mix-packs
{
"name": "Pack Degustacion",
"priceWithoutTax": 7800,
"caseId": 12,
"items": [
{ "productId": 88, "containerId": 3, "quantity": 4 },
{ "productId": 91, "containerId": 3, "quantity": 2 }
],
"complementaryItems": [
{ "complementaryProductId": 55, "quantity": 1 }
]
}
items and complementaryItems each replace their whole
collection when sent, and keep the current one when omitted. productId comes from
GET /api/v1/products: what a pack may carry is decided by having a container, not by your
brewery producing it.
items y complementaryItems reemplazan su colección
entera cuando se mandan, y conservan la actual cuando se omiten. productId sale de
GET /api/v1/products: lo que un pack puede llevar lo decide tener envase, no que su
cervecería lo produzca.
Validation rulesReglas de validación
nameis required and must not match another product of your account — a mix pack is a product.- The pack has to carry something. An empty definition is rejected.
- The pack's display description, its litres and its alcohol content are derived
from what it carries: the application computes them, they are not fields you set.
alcoholFreeis reported, not written. - Deactivation is rejected while there are orders not yet finished carrying the pack, or units of it in stock: those units exist physically and would be left without a product.
namees obligatorio y no puede coincidir con el de otro producto de su cuenta: un mix pack es un producto.- El pack tiene que llevar algo. Una definición vacía se rechaza.
- La descripción visible del pack, sus litros y su graduación se
derivan de lo que lleva: los calcula la aplicación, no son campos que usted
fije.
alcoholFreese informa, no se escribe. - La baja se rechaza mientras haya pedidos sin finalizar con el pack, o unidades en stock: esas unidades existen físicamente y quedarían sin producto.
RecipesRecetas
| Endpoint | What it does |
|---|---|
GET /recipes | Paged listing, without ingredients. search (name), producedProductId, page, pageSize, includeInactive. |
GET /recipes/{id} | One recipe with its ingredients and its task definitions. |
POST /recipes | Creates a recipe. Answers 201. |
PUT /recipes/{id} | Partial update. |
POST /recipes/{id}/deactivate | Deactivation. Idempotent. |
POST /recipes/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /recipes | Listado paginado, sin los ingredientes. search (nombre), producedProductId, page, pageSize, includeInactive. |
GET /recipes/{id} | Una receta con sus ingredientes y sus definiciones de tarea. |
POST /recipes | Crea una receta. Responde 201. |
PUT /recipes/{id} | Actualización parcial. |
POST /recipes/{id}/deactivate | Baja. Idempotente. |
POST /recipes/{id}/activate | Reactivación. Idempotente. |
A recipe says what a batch of a given beer is made of, and which tasks that batch
schedules. liters is the volume the recipe is written for — a batch scales the
quantities from it. producedProductId comes from
GET /api/v1/brewable-products: a recipe produces a beer your brewery makes, not any
product you sell.
Una receta dice de qué está hecho un lote de una cerveza, y qué
tareas programa ese lote. liters es el volumen para el que está escrita —el
lote escala las cantidades desde ahí—. producedProductId sale de
GET /api/v1/brewable-products: una receta produce una cerveza que su cervecería
elabora, no cualquier producto que venda.
POST /api/v1/recipes
{
"name": "Hoppy Trails v3",
"producedProductId": 88,
"liters": 1000,
"originalGravity": 1055,
"finalGravity": 1012,
"ibu": 45,
"abv": 6.2,
"ingredients": [
{ "supplyId": 12, "useId": 4, "quantity": 3.5, "unitId": 1, "description": "Cascade" }
],
"taskDefinitionIds": [5, 9]
}
⚠ Omitting a collection keeps it — sending an empty one wipes it⚠ Omitir una colección la conserva; mandarla vacía la borra
Omitting ingredients or taskDefinitionIds keeps what the recipe
already has, so you never need to resend a composition you are not changing. Sending either one
replaces it whole, and sending it empty leaves the recipe with none. Be deliberate:
in a recipe this is a real deletion, not a deactivation — what you remove is gone.
Omitir ingredients o taskDefinitionIds conserva lo que la
receta ya tiene, así que nunca necesita reenviar una composición que no está
cambiando. Mandar cualquiera de las dos la reemplaza entera, y mandarla vacía
deja la receta sin ninguna. Sea deliberado: en una receta esto es un borrado real, no una baja
lógica — lo que saca, se pierde.
Whole numbers for OG, FG and IBUOG, FG e IBU van en números enteros
originalGravity, finalGravity and ibu are
integers, because that is what the columns store. They are published that way rather than as decimals
so the API does not promise a precision it cannot keep: 1048.5 would be stored as
1048 and the next GET would hand you back a different number than you
sent.
originalGravity, finalGravity e ibu son enteros,
porque es lo que guardan las columnas. Se publican así y no como decimales para que la API no
prometa una precisión que no puede sostener: 1048.5 se guardaría como
1048 y el GET siguiente le devolvería un número distinto del
que mandó.
Validation rulesReglas de validación
nameis required and unique among your recipes.producedProductIdis required on create.- Each ingredient needs a
supplyIdand aquantity. OmittingsupplyTypeIdtakes the kind the supply itself declares, which is what the application does; omittingdescriptiontakes the supply's own name. discountsStockdecides whether brewing a batch takes the ingredient out of stock. Yeast is always false: the application manages it through its own containers.styleis reported, not written: it belongs to the product the recipe produces.
namees obligatorio y único entre sus recetas.producedProductIdes obligatorio en el alta.- Cada ingrediente necesita
supplyIdyquantity. Si omitesupplyTypeIdse toma el tipo que declara la propia materia prima, que es lo que hace la aplicación; si omitedescriptionse toma el nombre del insumo. discountsStockdecide si elaborar un lote descuenta el ingrediente del stock. La levadura siempre va en false: la aplicación la maneja con sus propios recipientes.stylese informa, no se escribe: es del producto que la receta produce.
SuppliesInsumos
| Endpoint | What it does |
|---|---|
GET /supplies | Paged listing. search (name, brand), supplyTypeId, page, pageSize, includeInactive. This is also the catalog of supplyId. |
GET /supplies/{id} | One supply, active or not. |
POST /supplies | Creates a supply. Answers 201. name and supplyTypeId are required. |
PUT /supplies/{id} | Partial update. |
POST /supplies/{id}/deactivate | Deactivation. Idempotent. force=true goes ahead even when recipes use it. |
POST /supplies/{id}/activate | Reactivation. Idempotent. |
GET /supplies/{id}/stock | Stock on hand, overall and per warehouse. |
POST /supplies/{id}/stock/adjustments | Manual entry or exit, relative to current stock. See below. |
POST /supplies/{id}/stock/counts | Physical stock count, an absolute value. See below. |
GET /supplies/{id}/convertible-units | The units a quantity of this supply may be sent in. |
GET /supplies/{id}/batches | External lots: which lot numbers came in, and where they were used. Read-only. |
GET /supplies/projection | Projected stock day by day. supplyTypeId required. |
| Endpoint | Qué hace |
|---|---|
GET /supplies | Listado paginado. search (nombre, marca), supplyTypeId, page, pageSize, includeInactive. Es además el catálogo de supplyId. |
GET /supplies/{id} | Un insumo, activo o no. |
POST /supplies | Crea un insumo. Responde 201. name y supplyTypeId son obligatorios. |
PUT /supplies/{id} | Actualización parcial. |
POST /supplies/{id}/deactivate | Baja. Idempotente. Con force=true baja igual aunque haya recetas que lo usen. |
POST /supplies/{id}/activate | Reactivación. Idempotente. |
GET /supplies/{id}/stock | Stock disponible, total y por depósito. |
POST /supplies/{id}/stock/adjustments | Ingreso o egreso manual, relativo al stock actual. Ver más abajo. |
POST /supplies/{id}/stock/counts | Control de stock por conteo físico, un valor absoluto. Ver más abajo. |
GET /supplies/{id}/convertible-units | Las unidades en las que se puede mandar una cantidad de este insumo. |
GET /supplies/{id}/batches | Lotes externos: qué números de lote entraron y dónde se usaron. Solo lectura. |
GET /supplies/projection | Stock proyectado día por día. supplyTypeId obligatorio. |
Some supplies belong to the system, not to youAlgunos insumos son del sistema, no suyos
The listing includes supplies that ship with the application and are shared by every
account. You can use them — buy them, put them in a recipe — but you
cannot change them: editing one would affect every other brewery. shared tells you which
is which, and any write against one is rejected with a plain message.
El listado incluye insumos que vienen con la aplicación y son compartidos por
todas las cuentas. Los puede usar —comprarlos, ponerlos en una receta—
pero no modificar: editar uno afectaría a todas las demás cervecerías.
shared le dice cuál es cuál, y cualquier escritura sobre uno se rechaza con
un mensaje claro.
If your account is set up to use only its own supplies, the shared ones do not appear at
all — neither here nor in the supplyId of a purchase.
Si su cuenta está configurada para usar solo insumos propios, los compartidos no
aparecen en absoluto: ni acá ni en el supplyId de una compra.
The unit is the anchor of everything elseLa unidad es el ancla de todo lo demás
unitId is the unit the stock is counted in, and every purchase and every
recipe converts to it. A quantity can only be sent in a unit that converts — kilos and grams do,
litres and kilos do not — so read
GET /api/v1/supplies/{id}/convertible-units before sending anything other than the base
unit. That endpoint is narrower than /units on purpose.
unitId es la unidad en la que se cuenta el stock, y toda compra y toda
receta se convierten a ella. Una cantidad solo se puede mandar en una unidad que convierta —kilos
y gramos sí, litros y kilos no—, así que lea
GET /api/v1/supplies/{id}/convertible-units antes de mandar algo distinto de la unidad
base. Ese endpoint es más acotado que /units a propósito.
Manual adjustments and physical counts: delta vs. absoluteAjustes manuales y conteo físico: delta vs. absoluto
POST /supplies/{id}/stock/adjustments moves stock relative to
what it is now: the sign of quantity decides the direction — positive enters, negative
takes out. It is the manual counterpart of a purchase line that stocks a supply.
POST /supplies/{id}/stock/counts instead replaces stock with the
quantity you actually counted — an absolute value, never a delta — and is the counterpart of the
application's physical stock count screen. They are two endpoints and not one with a
mode flag on purpose: the fields that make sense for an adjustment (why you moved it)
do not make sense for a count (what you found), and mixing them would let a request carry a field
the other branch silently ignores.
POST /supplies/{id}/stock/adjustments mueve el stock
relativo al que tiene ahora: el signo de quantity decide la
dirección — positivo ingresa, negativo egresa. Es el equivalente manual de una línea
de compra que ingresa un insumo. POST /supplies/{id}/stock/counts en cambio
reemplaza el stock por la cantidad que efectivamente contó: un valor
absoluto, nunca un delta, y es el equivalente de la pantalla de control de stock de la
aplicación. Son dos endpoints y no uno con un flag mode a
propósito: los campos que tienen sentido en un ajuste (por qué se movió) no
tienen sentido en un conteo (qué se encontró), y mezclarlos dejaría que un
request llevara un campo que la otra rama ignora en silencio.
Both take an optional unitId (defaults to the supply's own unit — see
GET /supplies/{id}/convertible-units), an optional supplyWarehouseId
(leave it out unless your account uses several supply warehouses), an optional
movementDate in ISO 8601 (defaults to now), and an optional free-text note.
Both answer with the supply's updated stock, the same shape as GET /supplies/{id}/stock.
Neither answers 201: they are actions on an existing resource, not the creation of one
with a GET of its own — same criterion as /products/{id}/stock/pack.
Los dos reciben un unitId opcional (por defecto, la unidad propia del
insumo — ver GET /supplies/{id}/convertible-units), un supplyWarehouseId
opcional (omítalo salvo que su cuenta use varios depósitos de insumos), una
movementDate opcional en ISO 8601 (por defecto, ahora) y una note de texto
libre opcional. Los dos responden con el stock actualizado del insumo, la misma forma que
GET /supplies/{id}/stock. Ninguno responde 201: son acciones sobre un
recurso existente, no el alta de uno con su propio GET — mismo criterio que
/products/{id}/stock/pack.
⚠️ Both are rejected if movementDate is more than 30 days in the
past, if the resulting quantity or stock would leave your account's supported range, or —
when your account blocks negative stock — if it would take the supply below zero. The same 30-day
limit applies to the application's own physical stock count screen and, since this checkpoint, to
the bulk stock import from Excel as well.
⚠️ Los dos se rechazan si movementDate es más de 30
días en el pasado, si la cantidad o el stock resultante saldrían del rango que
admite su cuenta, o —cuando su cuenta bloquea el stock negativo— si dejaría al insumo por
debajo de cero. El mismo límite de 30 días aplica a la pantalla de control de stock de
la aplicación y, desde este checkpoint, también a la importación masiva de
stock por Excel.
Validation rulesReglas de validación
nameis required and must not match another of your supplies.supplyTypeIdis required on create: there is no sensible default, and without it the supply would be saved pointing at nothing.- A supply of kind packaging must use the "unit" unit. Anything else is rejected.
- Once the supply has stock movements, its
nameandunitIdare frozen: the movements already recorded are expressed in that unit and under that name. supplyTypeIdis frozen too once there is stock, and it can never move to or from the kinds that have their own flow — packaging, kegging and yeast — with stock or without.- Deactivation is rejected while the supply is a related input of a product, and — unless you
pass
force=true— while any recipe still uses it. The message names them. - A supply that belongs to the system cannot be modified, deactivated or reactivated.
namees obligatorio y no puede coincidir con el de otro de sus insumos.supplyTypeIdes obligatorio en el alta: no hay default razonable, y sin él el insumo quedaría guardado apuntando a nada.- Un insumo de tipo envasado tiene que usar la unidad "unidad". Cualquier otra se rechaza.
- Una vez que el insumo tiene movimientos de stock, su
namey suunitIdquedan congelados: los movimientos ya registrados están expresados en esa unidad y con ese nombre. supplyTypeIdtambién queda congelado si hay stock, y nunca puede pasar hacia/desde los tipos que tienen flujo propio —envasado, embarrilado y levadura—, con stock o sin stock.- La baja se rechaza si el insumo es insumo relacionado de un producto y —salvo que mande
force=true— si alguna receta lo usa. El mensaje los nombra. - Un insumo del sistema no se puede modificar, ni dar de baja, ni reactivar.
External lots are read-only, and whyLos lotes externos son de solo lectura, y por qué
A lot number is recorded by buying the supply: send it in the
externalLots field of a line of POST /api/v1/purchases. It is consumed by
brewing a batch or running a packaging job. There is no separate way to create one — not in the
API and not in the application — so /supplies/{id}/batches is the traceability
view: which lots came in, on which purchase, and which batches and packaging runs used them.
Un número de lote se registra comprando el insumo: se manda en
el campo externalLots de una línea de POST /api/v1/purchases. Se
consume al cocinar un lote o al envasar. No hay otra forma de crear uno —ni por API ni en la
aplicación—, así que /supplies/{id}/batches es la vista de
trazabilidad: qué lotes entraron, en qué compra, y qué lotes de
producción y envasados los usaron.
The projection, and its one catchLa proyección, y su única trampa
It starts today, takes current stock, subtracts what the planned batches will use on the day each is due to be brewed, and adds what is due to arrive on purchase orders. A negative value means the plan would run that supply out on that day. How many days it covers comes from your configuration.
Arranca hoy, toma el stock actual, resta lo que van a usar los lotes planificados el día en que se cocinan, y suma lo que está por llegar en órdenes de compra. Un valor negativo significa que el plan dejaría ese insumo en cero ese día. Cuántos días cubre sale de su configuración.
⚠ Every series comes back in the same unit — the one in
unitId, which is the unit of the first supply of the list. That is what the application
does, and it means a supply counted in litres appears converted when the first one is counted in kilos.
Read unitId before reading the numbers. This is also the most expensive read published:
it walks the planned batches, their recipes and the open purchase orders. Do not poll it.
⚠ Todas las series vienen en la misma unidad: la de
unitId, que es la del primer insumo de la lista. Es lo que hace la aplicación, y
significa que un insumo que se cuenta en litros aparece convertido si el primero se cuenta en kilos.
Lea unitId antes de leer los números. Es además la lectura más
costosa que se publica: recorre los lotes planificados, sus recetas y las órdenes de compra
abiertas. No la consulte en loop.
Not in v1Fuera de v1
Stock movements of supplies — goods in, goods out, stock counts, write-offs and
transfers between warehouses — and the bulk import from a spreadsheet. Stock changes today by
buying (POST /purchases) and by brewing.
Los movimientos de stock de insumos —ingreso, egreso, control, desecho y
movimientos entre depósitos— y la importación masiva desde planilla. Hoy el stock
cambia comprando (POST /purchases) y cocinando.
WarehousesDepósitos
The places where you keep finished product, kegs and containers — plain warehouses and cold rooms alike. A supply warehouse is a different thing: see Supply warehouses.
Los lugares donde guarda producto terminado, barriles y envases — tanto depósitos comunes como cámaras de frío. Un depósito de insumos es otra cosa: vea Depósitos de insumos.
| Endpoint | What it does |
|---|---|
GET /warehouses | Paged listing. search (name, code, city), page, pageSize, includeInactive. This is also the catalog of warehouseId for a purchase line. Narrowed to the warehouses your integration user is allowed to use. |
GET /warehouses/{id} | One warehouse, active or not. 404 if it exists but your integration user cannot use it. |
POST /warehouses | Creates a warehouse. Answers 201. name, code and warehouseTypeId are all required. |
PUT /warehouses/{id} | Partial update. |
POST /warehouses/{id}/deactivate | Deactivation. Idempotent. Rejects the account's main warehouse. |
POST /warehouses/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /warehouses | Listado paginado. search (nombre, código, localidad), page, pageSize, includeInactive. Es además el catálogo de warehouseId de una línea de compra. Limitado a los depósitos que su usuario de integración puede usar. |
GET /warehouses/{id} | Un depósito, activo o no. 404 si existe pero su usuario de integración no puede usarlo. |
POST /warehouses | Crea un depósito. Responde 201. name, code y warehouseTypeId son todos obligatorios. |
PUT /warehouses/{id} | Actualización parcial. |
POST /warehouses/{id}/deactivate | Baja. Idempotente. Rechaza el depósito principal de la cuenta. |
POST /warehouses/{id}/activate | Reactivación. Idempotente. |
⚠ Narrowed to what your integration user can use⚠ Limitado a lo que su usuario de integración puede usar
If your account assigns warehouses to specific users, an integration user with
assignments only sees those — both in the listing and by id. An integration user with no
assignments sees every warehouse in the account, which is the normal case. This is the same set the
warehouseId of a purchase line validates against: a warehouse the listing does not show
is also rejected there.
Si su cuenta asigna depósitos a usuarios específicos, un usuario de
integración con asignaciones solo ve esos — tanto en el listado como por id. Un usuario de
integración sin asignaciones ve todos los depósitos de la cuenta, que es el caso normal.
Es el mismo set contra el que se valida el warehouseId de una línea de compra: un
depósito que el listado no muestra también se rechaza ahí.
Validation rulesReglas de validación
name,codeandwarehouseTypeIdare required on create.mainis read-only: it marks the warehouse your account treats as its main one, and it is never set through the API, exactly as in the application.- On the main warehouse,
warehouseTypeIdcannot change — a cold room becoming a plain warehouse, or the other way around, changes where it shows up across the application. - The main warehouse cannot be deactivated.
latitudeandlongitudeare the one exception to "null clears it": they are stored as numbers with0meaning "not set", so sending null resets them to0.- Deactivating a warehouse does not move the stock recorded against it, and it permanently deletes which users were assigned to it — reactivating does not bring the assignments back. Both mirror the application.
name,codeywarehouseTypeIdson obligatorios al crear.maines de solo lectura: marca el depósito que su cuenta trata como el principal, y nunca se fija por API, igual que en la aplicación.- En el depósito principal,
warehouseTypeIdno puede cambiar: que una cámara de frío pase a ser un depósito común, o al revés, cambia dónde aparece en toda la aplicación. - El depósito principal no se puede desactivar.
latitudeylongitudeson la única excepción a "null lo vacía": se guardan como números donde0significa "sin asignar", así que mandarlas en null las vuelve a0.- Dar de baja un depósito no mueve el stock que tiene registrado, y elimina permanentemente los usuarios que tenía asignados: reactivarlo no los restaura. Las dos cosas son iguales a la aplicación.
Not in v1Fuera de v1
Movements between warehouses and the delivery notes they generate — that is the separate
stock-movements resource. The users assigned to a warehouse. Logistics and distributor
listings.
Los movimientos entre depósitos y los remitos que generan — eso es el
recurso separado stock-movements. Los usuarios asignados a un depósito. Los
listados de logística y distribuidora.
Supply warehousesDepósitos de insumos
| Endpoint | What it does |
|---|---|
GET /supply-warehouses | Paged listing. search (name, code, city), page, pageSize, includeInactive. This is also the catalog of supplyWarehouseId. |
GET /supply-warehouses/{id} | One warehouse, active or not. |
POST /supply-warehouses | Creates a warehouse. Answers 201. name is required. |
PUT /supply-warehouses/{id} | Partial update. |
POST /supply-warehouses/{id}/deactivate | Deactivation. Idempotent. |
POST /supply-warehouses/{id}/activate | Reactivation. Idempotent. |
GET /supply-warehouses/{id}/supplies | The supplies held there, with their stock in that warehouse. |
POST /supply-warehouses/{id}/transfers | Transfers one or more supplies from this warehouse (the {id}, the source) to another. Answers 201. This is the raw-material counterpart of Stock movements, as its own sub-resource — see the note there on why they are separate. |
| Endpoint | Qué hace |
|---|---|
GET /supply-warehouses | Listado paginado. search (nombre, código, localidad), page, pageSize, includeInactive. Es además el catálogo de supplyWarehouseId. |
GET /supply-warehouses/{id} | Un depósito, activo o no. |
POST /supply-warehouses | Crea un depósito. Responde 201. name es obligatorio. |
PUT /supply-warehouses/{id} | Actualización parcial. |
POST /supply-warehouses/{id}/deactivate | Baja. Idempotente. |
POST /supply-warehouses/{id}/activate | Reactivación. Idempotente. |
GET /supply-warehouses/{id}/supplies | Los insumos que hay ahí, con su stock en ese depósito. |
POST /supply-warehouses/{id}/transfers | Transfiere uno o más insumos desde este depósito (el {id}, el origen) a otro. Responde 201. Es la contraparte de materia prima de Movimientos de stock, como sub-recurso propio — ver ahí la nota de por qué son recursos separados. |
⚠ The whole resource depends on a setting⚠ Todo el recurso depende de una configuración
Multiple supply warehouses are optional per brewery. Where the setting is off there is
nothing to list and nowhere to put a warehouse id: the listing answers an empty page,
reading one by id answers 404, and creating one is rejected. That is deliberate — a
warehouse created through the API on an account without the feature would be a record nobody can see or
manage from the application.
Los múltiples depósitos de insumos son opcionales por cervecería.
Donde la configuración está apagada no hay nada que listar ni dónde poner un id de
depósito: el listado responde una página vacía, leer uno por id
responde 404, y crear uno se rechaza. Es deliberado: un depósito creado por API en
una cuenta sin la funcionalidad sería un registro que nadie puede ver ni administrar desde la
aplicación.
An empty listing is therefore a normal answer, not an error, and it is the same set the
supplyWarehouseId of a purchase line validates against: where there are no warehouses, any
id is rejected.
Un listado vacío es entonces una respuesta normal, no un error, y es el mismo set
contra el que se valida el supplyWarehouseId de una línea de compra: donde no hay
depósitos, cualquier id se rechaza.
Validation rulesReglas de validación
nameis required.latitudeandlongitudeare the one exception to "null clears it": they are stored as numbers with0meaning "not set", so sending null resets them to0.- Deactivating a warehouse does not move the stock recorded against it. That mirrors the application, which deactivates the warehouse and leaves its movements on record.
POST /transfers: the source ({id}in the route) must be active; the destination (toWarehouseId) is validated the same way, through the catalog. Everyquantitymust be positive, and each is rejected with400if the source does not currently hold enough — the transfer does not partially apply.
namees obligatorio.latitudeylongitudeson la única excepción a "null lo vacía": se guardan como números donde0significa "sin asignar", así que mandarlas en null las vuelve a0.- Dar de baja un depósito no mueve el stock que tiene registrado. Es lo mismo que hace la aplicación: lo desactiva y deja sus movimientos como están.
POST /transfers: el origen ({id}de la ruta) tiene que estar activo; el destino (toWarehouseId) se valida igual, por el catálogo. Cadaquantitytiene que ser positiva, y se rechaza con400si el origen no tiene stock suficiente en ese momento — la transferencia no se aplica parcialmente.
Stock movementsMovimientos de stock
Transfers of product or packaging stock between two of your warehouses — the same
operation as Warehouses § Not in v1. Its own resource, not a
sub-resource of warehouses or products: a transfer always involves two
warehouses and one or more products/containers/cases at once.
Transferencias de stock de producto o packaging entre dos de sus depósitos —
la misma operación que quedó anotada en Depósitos §
Fuera de v1. Es su propio recurso, no un sub-recurso de warehouses ni de
products: una transferencia siempre involucra dos depósitos y uno o más
productos/envases/cajas a la vez.
| Endpoint | What it does |
|---|---|
GET /stock-movements | Paged listing, most recent first. Filter with dateFrom, dateTo (ISO 8601) and warehouseId (matches either the source or the destination), plus page and pageSize. One line per product/container/case moved; lines from the same transfer share transferId. |
POST /stock-movements | Transfers product or packaging stock from one warehouse to another. Answers 201 with the lines just created, sharing the same transferId. Consumes stock oldest-expiring-first (FEFO) across the whole source warehouse for each product and container/case — not a specific batch, invoice or delivery note. The stock it creates at the destination carries no batch attribution. |
| Endpoint | Qué hace |
|---|---|
GET /stock-movements | Listado paginado, más reciente primero. Filtre con dateFrom, dateTo (ISO 8601) y warehouseId (coincide con origen o destino), más page y pageSize. Una línea por producto/envase/caja movido; las líneas de una misma transferencia comparten transferId. |
POST /stock-movements | Transfiere stock de producto o packaging de un depósito a otro. Responde 201 con las líneas recién creadas, compartiendo el mismo transferId. Consume stock del que vence antes primero (FEFO) sobre todo el depósito de origen para cada producto y envase/caja — no un lote, factura o remito puntual. El stock que crea en el destino queda sin atribución de lote. |
Not the sales reportNo es el informe de ventas
This is a new, narrow query over the delivery notes that a warehouse-to-warehouse transfer generates — not the existing stock movements report, which mixes invoice number and customer name into the same row as a warehouse movement. A delivery note from this endpoint never carries an order, an invoice number or a customer: those only exist on delivery notes tied to a sale, which this endpoint never returns.
Es una consulta nueva y acotada sobre los remitos que genera una transferencia entre depósitos — no el informe de movimientos de stock existente, que mezcla número de factura y nombre de cliente en la misma fila que un movimiento de depósito. Un remito de este endpoint nunca lleva pedido, número de factura ni cliente: eso solo existe en remitos atados a una venta, que este endpoint nunca devuelve.
Validation rulesReglas de validación
warehouseFromId,warehouseToIdand every line'sproductId(pluscontainerId/caseId) are validated against the same catalogs a warehouse and a price list already validate against — both warehouses must be active, same as their ownGET.itemTypeiscontainer,caseorcomplementary;containerIdis required when it iscontainer,caseIdwhen it iscase.- Every line's
quantitymust be positive. - Rejected with
400if a line's product/container/case does not currently hold enough stock in the source warehouse — the transfer does not partially apply. - The source and the destination may be the same warehouse: nothing currently rejects that.
warehouseFromId,warehouseToIdy elproductIdde cada línea (máscontainerId/caseId) se validan contra los mismos catálogos que ya valida un depósito y una lista de precios — los dos depósitos tienen que estar activos, igual que su propioGET.itemTypeescontainer,caseocomplementary;containerIdes obligatorio cuando escontainer,caseIdcuando escase.- El
quantityde cada línea tiene que ser positivo. - Se rechaza con
400si el producto/envase/caja de una línea no tiene stock suficiente en ese momento en el depósito de origen — la transferencia no se aplica parcialmente. - El origen y el destino pueden ser el mismo depósito: hoy nada lo rechaza.
Not in v1Fuera de v1
Kegs: a transfer that also moved kegs still shows here (and can still be created), just
without its keg lines — movements between warehouses/customers aren't published yet on
Kegs, only its master record. Mix
packs: moving one splits stock between the pack and each of its components at once, which is not a
single-line operation, so POST rejects itemType: "mixPack" (the
GET can still show one, moved before this exclusion or from the application's own
screen). The electronic dispatch guide (Chile): the application's own screen asks, after saving,
whether to generate it; the server never does from here, that stays a web-only follow-up action.
Raw materials: a transfer between raw material warehouses is a separate resource, see
Raw material warehouses.
Barriles: una transferencia que también movió barriles igual aparece
acá (y todavía se puede crear), solo que sin sus líneas de barril — los
movimientos entre depósitos/clientes todavía no están publicados en
Barriles, solo su maestro. Mix packs:
moverlo reparte stock entre el pack y cada uno de sus componentes a la vez, que no es una
operación de una sola línea, así que el POST rechaza
itemType: "mixPack" (el GET sí puede mostrar uno, movido antes de
esta exclusión o desde la pantalla de la aplicación). La guía de despacho
electrónica (Chile): la pantalla de la aplicación pregunta, después de
guardar, si generarla; el servidor nunca lo hace desde acá, eso queda como una acción
de seguimiento solo-web. Materia prima: una transferencia entre depósitos de insumos es un
recurso separado, ver Depósitos de insumos.
Stock valuationValorización de stock
How much your current finished-product stock is worth, at today's sale price — kegs,
loose containers, cases, mix packs and complementary products. A computed view, not an entity with
rows of its own: there is no {id}, no POST, no PUT.
Cuánto vale hoy su stock de producto terminado, al precio de venta corriente
— barriles, envases sueltos, cajas, mix packs y productos complementarios. Es una vista
calculada, no una entidad con filas propias: no tiene {id}, ni POST, ni
PUT.
| Endpoint | What it does |
|---|---|
GET /stock-valuation | The current valuation, one line per product/format/warehouse combination with stock. Optional productId or containerId (not both) narrows it to one product or one loose container; includeZeroStock (default false) also lists formats the account sells but currently has none of. Not paginated: it returns your account's full valuation in one shot, same as the web report it's wired to. |
| Endpoint | Qué hace |
|---|---|
GET /stock-valuation | La valorización actual, una línea por combinación producto/formato/depósito con stock. productId o containerId opcionales (no los dos a la vez) la acotan a un producto o un envase suelto; includeZeroStock (por defecto false) suma también formatos que la cuenta vende pero de los que hoy no tiene stock. Sin paginar: devuelve la valorización completa de la cuenta de una sola vez, igual que el informe web del que sale. |
Validation rulesReglas de validación
productIdandcontainerIdcannot be sent together — rejected with400 business_rule. The underlying query filters by one entity at a time, the same restriction the web report it's wired to already has.typeiskeg,container,case,mixPackorcomplementary— same vocabulary asitemTypeon Stock movements, pluskeg(which that resource excludes on purpose).- A
kegline is valued by liters (pricePerLiter × liters); every other line is valued by units (pricePerUnit × stock).totalalready carries the right one.
productIdycontainerIdno se pueden mandar juntos — se rechaza con400 business_rule. La consulta de base filtra por una sola entidad a la vez, la misma restricción que ya tiene el informe web del que sale.typeeskeg,container,case,mixPackocomplementary— el mismo vocabulario queitemTypede Movimientos de stock, máskeg(que ese recurso excluye a propósito).- Una línea
kegse valoriza por litro (pricePerLiter × liters); cualquier otra se valoriza por unidad (pricePerUnit × stock).totalya trae el que corresponde.
Not in v1Fuera de v1
Valuation at production cost: this endpoint values stock at current sale
price only — see Stock valuation (cost) for the cost-cascade
variant. Per-warehouse / per-price-list breakdown: the web report that variant comes
from generates one dynamic column per price list configured on the account, which is not a stable
JSON shape — not exposed until that has its own design. Raw materials (supplies):
different model — see Raw material valuation, its own
resource. warehouseId: only
warehouseName is available — the underlying query carries the warehouse's name, not
its id.
Valorización a costo de producción: este endpoint
valoriza solo a precio de venta corriente — ver Valorización
de stock (costo) para la variante por cascada de costeo. Desglose por
depósito/lista de precios: el informe web del que sale esa variante genera una columna
dinámica por lista de precios configurada en la cuenta, que no es una forma de JSON estable
— no se expone hasta que eso tenga su propio diseño. Insumos/materia
prima: modelo distinto — ver Valorización de
insumos, su propio recurso. warehouseId: solo hay
warehouseName disponible — la consulta de base trae el nombre del depósito,
no su id.
Stock valuation (cost)Valorización de stock (costo)
How much your current finished-product stock cost to make, not to sell — kegs,
loose containers, cases, mix packs and complementary products, valued through the production costing
cascade (lot costing first, falling back to the product's cost snapshot). Same domain as
Costings (which manages the costings themselves, not this aggregated view of
what stock is worth today). A computed view, not an entity with rows of its own: no {id},
no POST, no PUT.
Cuánto costó producir su stock actual de producto terminado, no cuánto
vale venderlo — barriles, envases sueltos, cajas, mix packs y productos complementarios,
valorizados con la cascada de costeo de producción (primero el costeo del lote, con
respaldo en la foto de costo del producto). Mismo dominio que Costeos (que
gestiona los costeos en sí, no esta vista agregada de cuánto vale el stock hoy). Es una
vista calculada, no una entidad con filas propias: no tiene {id}, ni POST,
ni PUT.
| Endpoint | What it does |
|---|---|
GET /stock-valuation-cost | The current cost valuation, one line per product/format/warehouse combination with stock. Optional productId or containerId (not both) narrows it to one product or one loose container; includeZeroStock (default false) also lists formats the account sells but currently has none of. Not paginated: it returns your account's full valuation in one shot, same as the web report it's wired to. |
| Endpoint | Qué hace |
|---|---|
GET /stock-valuation-cost | La valorización a costo actual, una línea por combinación producto/formato/depósito con stock. productId o containerId opcionales (no los dos a la vez) la acotan a un producto o un envase suelto; includeZeroStock (por defecto false) suma también formatos que la cuenta vende pero de los que hoy no tiene stock. Sin paginar: devuelve la valorización completa de la cuenta de una sola vez, igual que el informe web del que sale. |
Validation rulesReglas de validación
productIdandcontainerIdcannot be sent together — rejected with400 business_rule. The underlying query filters by one entity at a time, the same restriction the web report it's wired to already has.typeiskeg,container,case,mixPackorcomplementary— same vocabulary as Stock valuation. Notankvalue in this version (see Not in v1, below).- A
kegline is valued by liters (costPerLiter × liters); every other line is valued by units (costPerUnit × stock).totalalready carries the right one. costOrigindeclares which level of the costing cascade resolved the cost:lotCosting,imputedSupplies,productSnapshot,manuallySet(mix packs only, today),undetermined(cost is0because none could be resolved, not because it really is zero), or the two recipe-planning levels (recipeCosting,recipeCostingWithoutFixedCosts) used for cost-of-goods-sold estimates elsewhere in the system — declared here for completeness, though this endpoint's own queries never produce them.preliminaryCostingistruewhen the lot costing behind alotCostingline is a preliminary costing that the brewery's automatic batch costing generated on its own: supplies only, no fixed costs, so the line is worth less than it will be once the final costing is entered. It never changescostOrigin, and it is alwaysfalsefor breweries that do not use automatic batch costing.
productIdycontainerIdno se pueden mandar juntos — se rechaza con400 business_rule. La consulta de base filtra por una sola entidad a la vez, la misma restricción que ya tiene el informe web del que sale.typeeskeg,container,case,mixPackocomplementary— el mismo vocabulario que Valorización de stock. Sin valortanken esta versión (ver Fuera de v1, abajo).- Una línea
kegse valoriza por litro (costPerLiter × liters); cualquier otra se valoriza por unidad (costPerUnit × stock).totalya trae el que corresponde. costOrigindeclara qué nivel de la cascada de costeo resolvió el costo:lotCosting,imputedSupplies,productSnapshot,manuallySet(solo mix packs, hoy),undetermined(el costo es0porque no se pudo resolver ninguno, no porque realmente sea cero), o los dos niveles de costeo de receta (recipeCosting,recipeCostingWithoutFixedCosts) que se usan para estimaciones de costo de ventas en otra parte del sistema — declarados acá por completitud, aunque las consultas propias de este endpoint nunca los producen.preliminaryCostingestruecuando el costeo del lote detrás de una línealotCostinges un costeo preliminar que generó solo el autocosteo de lotes de la cervecería: solo insumos, sin costos fijos, así que la línea vale menos de lo que va a valer cuando se cargue el costeo definitivo. Nunca cambiacostOrigin, y siempre esfalseen las cervecerías que no usan el autocosteo.
Not in v1Fuera de v1
Tanks: the query behind the web report's tank valuation
(ProductoService.GetStockCosteadoTanque) returns exactly "which lot is in which tank, how
many liters, at what cost" — the same data Tanks already excludes from its
own contract, on purpose, as territory of batches/product-stock (undesigned).
Publishing it here would route around that same exclusion through a different door; it's a candidate
to add once that design lands, not before. Per-warehouse / per-price-list breakdown:
same reason as Stock valuation. Raw materials
(supplies): see Raw material valuation, its own
resource. warehouseId: only
warehouseName is available, same reason as the sale-price variant.
Tanques: la consulta detrás de la valorización de tanques
del informe web (ProductoService.GetStockCosteadoTanque) devuelve exactamente "qué
lote está en qué tanque, cuántos litros y a qué costo" — el mismo dato
que Tanques ya excluye de su propio contrato, a propósito, por ser
territorio de batches/product-stock (sin diseñar). Publicarlo acá
sería sortear esa misma exclusión por otra puerta; es candidato a sumarse el día
que ese diseño exista, no antes. Desglose por depósito/lista de precios:
mismo motivo que Valorización de stock. Insumos/materia
prima: ver Valorización de insumos, su propio
recurso. warehouseId:
solo hay warehouseName disponible, mismo motivo que la variante a precio de venta.
Raw material valuationValorización de insumos
How much your current raw material (supply) stock is worth. Sister of
Stock valuation/Stock valuation
(cost) (same pattern: no screen of its own, ReportsController off, wired directly
to the tested service method behind the web report). A computed view, not an entity with rows of
its own: no {id}, no POST, no PUT.
Cuánto vale su stock actual de insumos. Hermana de
Valorización de stock/Valorización
de stock (costo) (mismo patrón: sin pantalla propia, ReportsController
apagado, wireado directo al método de servicio probado detrás del informe web). Es
una vista calculada, no una entidad con filas propias: no tiene {id}, ni
POST, ni PUT.
| Endpoint | What it does |
|---|---|
GET /raw-material-valuation | The current valuation, one line per supply with stock. Optional supplyId narrows it to one supply; asOf (yyyy-MM-dd, defaults to now) sets the valuation cutoff date; includeVat (default false) applies VAT to both cost figures. Not paginated: returns your account's full raw material stock in one shot, same as the web report it's wired to. |
| Endpoint | Qué hace |
|---|---|
GET /raw-material-valuation | La valorización actual, una línea por insumo con stock. supplyId opcional la acota a un insumo; asOf (yyyy-MM-dd, por defecto ahora) fija la fecha de corte; includeVat (por defecto false) aplica IVA a ambos costos. Sin paginar: devuelve el stock de insumos completo de la cuenta de una sola vez, igual que el informe web del que sale. |
Validation rulesReglas de validación
- There are two valuations per line, not one:
costPerUnitLastPurchase(cost of the last purchase with a cost on record) andcostPerUnitWeightedAverage(weighted average over the last 3 purchases). The web report this comes from never collapses them into one number — even though an account-level setting exists that picks one on a different screen — so neither does this endpoint: both are always returned. costPerUnitLastPurchasefalls back tomanualCostwhen there is no purchase with a cost on record — same fallback the web report itself applies to this column.costPerUnitWeightedAveragedoes not get that fallback, same as the report.totalLastPurchase/totalWeightedAverageare already computed server-side (stock × costPerUnit...).manualCostis exposed on its own (unitCostofGET /supplies/{id}) so you can tell whether the fallback above happened.costDateis when the cost behindcostPerUnitLastPurchasewas recorded — not the same asasOf, which is the cutoff you asked for.
- Hay dos valorizaciones por línea, no una:
costPerUnitLastPurchase(costo de la última compra con costo cargado) ycostPerUnitWeightedAverage(precio ponderado de las últimas 3 compras). El informe web del que sale este dato nunca las colapsa en un solo número — aunque existe una configuración de cuenta que elige una en otra pantalla — así que este endpoint tampoco: siempre devuelve las dos. costPerUnitLastPurchaserecurre amanualCostcuando no hay ninguna compra con costo cargado — mismo respaldo que aplica el informe web a esta misma columna.costPerUnitWeightedAverageno tiene ese respaldo, igual que el informe.totalLastPurchase/totalWeightedAverageya vienen calculados del lado del servidor (stock × costPerUnit...).manualCostse expone aparte (unitCostdeGET /supplies/{id}) para poder saber si el respaldo de arriba ocurrió.costDatees cuándo se registró el costo detrás decostPerUnitLastPurchase— no es lo mismo queasOf, que es el corte que usted pidió.
KegsBarriles
The master record of a keg — its code, capacity, connector, kind, where it's stored, and who currently has it — plus its movement history, transfers between two of your customers, releasing a reservation, stock in/out, loans and returns, and cleaning.
El maestro de un barril — su código, capacidad, conector, tipo, dónde está guardado y quién lo tiene ahora — más su historial de movimientos, traslados entre dos de sus clientes, la liberación de una reserva, ingreso/egreso de stock, préstamo y devolución, y limpieza.
| Endpoint | What it does |
|---|---|
GET /kegs | Paged listing. search (code, serial number, supplier code), customerId, page, pageSize, includeInactive. |
GET /kegs/{id} | One keg, active or not. |
GET /kegs/{id}/movements | The keg's movement history: fills, empties, cleanings, transfers and more. includeInactive also includes movements later reverted. |
POST /kegs | Creates a keg. Answers 201. code and liters are required; kegTypeId defaults to DIN when omitted. |
PUT /kegs/{id} | Partial update. liters is rejected if the keg holds product or is at a customer. |
POST /kegs/{id}/deactivate | Deactivation. Idempotent. |
POST /kegs/{id}/activate | Reactivation. Idempotent. Rejected with 400 on a starter-plan account over 100 active kegs. |
POST /kegs/transfers | Transfers one or more kegs, currently at a customer, to another of your customers. All must share the same source customer and point of sale. Requires the account's keg-transfer-between-customers feature. |
POST /kegs/{id}/release-reservation | Releases a keg set aside for an order, without moving it. Rejected if it isn't reserved for that order. |
POST /kegs/{id}/empty | Empties a keg: records its product left it, clears its contents. Always empties the whole keg; never credits liters back to any batch/tank. |
POST /kegs/{id}/discard | Discards the product in a keg — a write-off, not a normal emptying. |
POST /kegs/{id}/return | A customer returning a keg to you, full or empty. No electronic step, no current-account entries — see Not in v1. |
POST /kegs/returns-to-supplier | Returns one or more kegs to a supplier. No confirmation email step. |
POST /kegs/clean | Marks one or more kegs clean, ready to be filled again. Each must currently be marked dirty. Optionally records supplies consumed (detergent, sanitizer) in the same call. |
POST /kegs/undo-clean | Undoes the most recent cleaning of one or more kegs. No-op for a keg with no cleaning movement to undo. |
| Endpoint | Qué hace |
|---|---|
GET /kegs | Listado paginado. search (código, número de serie, código de proveedor), customerId, page, pageSize, includeInactive. |
GET /kegs/{id} | Un barril, activo o no. |
GET /kegs/{id}/movements | El historial de movimientos del barril: ingresos, egresos, limpiezas, traslados y más. includeInactive incluye también movimientos deshechos después. |
POST /kegs | Crea un barril. Responde 201. code y liters son obligatorios; kegTypeId por defecto es DIN si se omite. |
PUT /kegs/{id} | Actualización parcial. liters se rechaza si el barril tiene producto o está en un cliente. |
POST /kegs/{id}/deactivate | Baja. Idempotente. |
POST /kegs/{id}/activate | Reactivación. Idempotente. Se rechaza con 400 en una cuenta plan starter que supere 100 barriles activos. |
POST /kegs/transfers | Transfiere uno o más barriles, hoy en un cliente, a otro de sus clientes. Todos tienen que compartir el mismo cliente y punto de venta de origen. Requiere la funcionalidad de traslado de barriles entre clientes de la cuenta. |
POST /kegs/{id}/release-reservation | Libera un barril reservado para un pedido, sin moverlo. Se rechaza si no está reservado para ese pedido. |
POST /kegs/{id}/empty | Vacía un barril: registra que su producto salió, limpia su contenido. Siempre vacía el barril entero; nunca acredita litros a ningún lote/tanque. |
POST /kegs/{id}/discard | Descarta el producto de un barril — un castigo de stock, no un vaciado normal. |
POST /kegs/{id}/return | Un cliente devolviéndole un barril, lleno o vacío. Sin paso electrónico, sin asientos de cuenta corriente — ver Fuera de v1. |
POST /kegs/returns-to-supplier | Devuelve uno o más barriles a un proveedor. Sin el paso de mail de confirmación. |
POST /kegs/clean | Marca uno o más barriles como limpios, listos para volver a llenarse. Cada uno tiene que estar hoy marcado sucio. Opcionalmente registra insumos consumidos (detergente, sanitizante) en el mismo llamado. |
POST /kegs/undo-clean | Deshace la limpieza más reciente de uno o más barriles. Sin efecto si el barril no tiene ningún movimiento de limpieza para deshacer. |
Validation rulesReglas de validación
codeis required, unique among your kegs, at most 50 characters, and must contain at least one letter or digit and not contain;orñ— same rule as the application's screen, just without its "confirm anyway" dialog: an API caller gets a straight400instead.connectoris one ofG,A,S,K,D,CO,CP,U,M— a fixed set, not a catalog endpoint.supplierCodeis required whensupplierIdis set.litersmust be positive on create; on update it's rejected once the keg holds product or is at a customer.POST /transfers:kegIdsmust have at least one entry; all must currently be at the same customer and point of sale.destinationCustomerLocationId, when sent, must be one of the destination customer's own points of sale.POST /release-reservation:orderIdmust match what the keg is actually reserved for.POST /empty: rejected if the keg does not currently hold product, or is reserved for an order.POST /{id}/return:dateis required and rejected if it's in the future, before the keg left for its current customer, before the keg was created, or more than 180 days in the past. Rejected if the keg is reserved for an order.POST /returns-to-supplier:kegsmust have at least one entry. Rejected if any keg is reserved for an order.POST /clean:kegIdsmust have at least one entry, and each keg must currently be marked dirty. Whensuppliesis sent, each line'squantitymust be positive; rejected under the same conditions asPOST /supplies/{id}/stock/adjustments(retroactive beyond 30 days, resulting stock out of range, or negative stock on an account that blocks it).POST /undo-clean:kegIdsmust have at least one entry.
codees obligatorio, único entre sus barriles, de hasta 50 caracteres, y tiene que tener al menos una letra o dígito y no contener;niñ— misma regla que la pantalla de la aplicación, solo que sin su diálogo de "confirmar igual": quien llama a la API recibe un400directo.connectores uno deG,A,S,K,D,CO,CP,U,M— un conjunto fijo, no un endpoint de catálogo.supplierCodees obligatorio cuandosupplierIdestá presente.literstiene que ser positivo al crear; al actualizar se rechaza una vez que el barril tiene producto o está en un cliente.POST /transfers:kegIdstiene que tener al menos un elemento; todos tienen que estar hoy en el mismo cliente y punto de venta.destinationCustomerLocationId, cuando se manda, tiene que ser uno de los puntos de venta del cliente destino.POST /release-reservation:orderIdtiene que coincidir con lo que el barril tiene reservado realmente.POST /empty: se rechaza si el barril no tiene producto actualmente, o está reservado para un pedido.POST /{id}/return:datees obligatorio y se rechaza si es futuro, es anterior a cuándo el barril salió hacia su cliente actual, es anterior a cuándo se dio de alta el barril, o tiene más de 180 días. Se rechaza si el barril está reservado para un pedido.POST /returns-to-supplier:kegstiene que tener al menos un elemento. Se rechaza si algún barril está reservado para un pedido.POST /clean:kegIdstiene que tener al menos un elemento, y cada barril tiene que estar hoy marcado sucio. Cuando se mandasupplies, laquantityde cada línea tiene que ser positiva; se rechaza bajo las mismas condiciones quePOST /supplies/{id}/stock/adjustments(retroactividad de más de 30 días, stock resultante fuera de rango, o stock negativo en una cuenta que lo bloquea).POST /undo-clean:kegIdstiene que tener al menos un elemento.
Not in v1Fuera de v1
Filling an empty keg from a batch/tank: that is packaging in reverse, the same
structural exclusion that keeps envasado out of the whole API. Delivering a keg directly to a
customer without an order: it books stock leaving your account tied to a customer with no order or
delivery note behind it, and whether that belongs in v1 is an open product question — it's why
/transfers only moves kegs already at a customer to another one of your customers, never
from your own stock straight to a first delivery. Kegging content between kegs (there's no
/rack or similar endpoint). Undoing a return: reversing everything a return may have
triggered downstream turned out to have many edge cases, and needs its own dedicated pass. Charging
or crediting a return against an order's current-account balance: the application's own screen can,
this API never does — a return here is always just the keg's own movement. The supplier-return
confirmation email: same exclusion as the electronic dispatch guide of
Stock movements. Transfers between your own warehouses (as opposed to
between customers) aren't published either. The "traffic light" thresholds that color a keg by how
long it's been at a customer (SetSemaforo/SetSemaforoDistribuidora) are
account-wide display settings, not keg data — they fall under the not-yet-designed
settings resource, not this one.
Llenar un barril vacío desde un lote/tanque: eso es envasado a la inversa, la
misma exclusión estructural que deja el envasado fuera de toda la API. Entregar un barril
directo a un cliente sin pedido: registra una salida de stock de la cuenta atada a un cliente sin
ningún pedido o remito detrás, y si eso entra en v1 es una pregunta de producto
abierta — por eso /transfers solo mueve barriles que YA están en un cliente
hacia otro de sus clientes, nunca desde su propio stock directo a una primera entrega. Trasvasar
contenido entre barriles (no hay un endpoint /rack ni similar). Deshacer una
devolución: revertir todo lo que una devolución pudo haber disparado después
resultó tener muchos casos borde, y necesita su propia pasada dedicada. Cobrar o acreditar
una devolución contra el saldo de cuenta corriente de un pedido: la pantalla de la
aplicación puede, esta API nunca lo hace — una devolución acá es siempre
solo el movimiento del barril. El mail de confirmación de la devolución a proveedor:
misma exclusión que la guía de despacho electrónica de
Movimientos de stock. Traslados entre sus propios depósitos (a
diferencia de entre clientes) tampoco están publicados. Los umbrales de "semáforo" que
colorean un barril según cuánto hace que está en un cliente
(SetSemaforo/SetSemaforoDistribuidora) son configuración de cuenta
para la pantalla, no datos del barril — caen dentro del recurso settings,
todavía sin diseñar, no en este.
Tap systemsChoperas
The master record of a tap system (dispenser) — its code, connector, kind, brand, net value, useful life and notes — plus delivering one to a customer, its return, and the delivery note (remito) history.
El maestro de un sistema de tiraje (chopera) — su código, conector, tipo, marca, valor neto, vida útil y notas — más la entrega a un cliente, su devolución, y el historial de remitos.
| Endpoint | What it does |
|---|---|
GET /tap-systems | Paged listing. search (code or name), page, pageSize, includeInactive. |
GET /tap-systems/{id} | One tap system, active or not. |
POST /tap-systems | Creates a tap system. Answers 201. code is required. |
PUT /tap-systems/{id} | Partial update. |
POST /tap-systems/{id}/deactivate | Deactivation. Idempotent. |
POST /tap-systems/{id}/activate | Reactivation. Idempotent. |
POST /tap-systems/deliveries | Delivers one or more tap systems to a customer, for the first time. Only tap systems — never the other kind of asset the application lets you mix into the same delivery. |
GET /tap-systems/deliveries | Paged listing of delivery notes. customerId, page, pageSize, includeInactive (also returns voided ones). Lines aren't included — get one by id for those. |
GET /tap-systems/deliveries/{id} | One delivery note, with its lines. |
POST /tap-systems/deliveries/{id}/void | Voids a delivery note: reverts every tap system on it as if it were never delivered. Idempotent. |
POST /tap-systems/returns | A customer returning one or more tap systems. Rejected if a tap system isn't currently at a customer. |
| Endpoint | Qué hace |
|---|---|
GET /tap-systems | Listado paginado. search (código o nombre), page, pageSize, includeInactive. |
GET /tap-systems/{id} | Un sistema de tiraje, activo o no. |
POST /tap-systems | Crea un sistema de tiraje. Responde 201. code es obligatorio. |
PUT /tap-systems/{id} | Actualización parcial. |
POST /tap-systems/{id}/deactivate | Baja. Idempotente. |
POST /tap-systems/{id}/activate | Reactivación. Idempotente. |
POST /tap-systems/deliveries | Entrega uno o más sistemas de tiraje a un cliente, por primera vez. Solo sistemas de tiraje — nunca el otro tipo de activo que la aplicación deja mezclar en la misma entrega. |
GET /tap-systems/deliveries | Listado paginado de remitos. customerId, page, pageSize, includeInactive (también devuelve los anulados). No incluye las líneas — pedir uno por id para eso. |
GET /tap-systems/deliveries/{id} | Un remito, con sus líneas. |
POST /tap-systems/deliveries/{id}/void | Anula un remito: revierte cada sistema de tiraje como si nunca se hubiera entregado. Idempotente. |
POST /tap-systems/returns | Un cliente devolviendo uno o más sistemas de tiraje. Se rechaza si algún sistema de tiraje no está hoy en un cliente. |
Validation rulesReglas de validación
codeis required on create, and unique among your tap systems.connectoris one ofG,A,S,D,CO— a fixed set, not a catalog endpoint.DandCOare only valid on non-Argentina accounts.usefulLife, when sent, must be ISO 8601.POST /deliveries:tapSystemIdsmust have at least one entry and no duplicates.dateis required and must be ISO 8601. Rejected if a tap system is currently at a customer.customerLocationId, when sent, must be one of the customer's own points of sale.POST /returns:tapSystemIdsmust have at least one entry and no duplicates. Rejected if any tap system isn't currently at a customer.
codees obligatorio al crear, y único entre sus sistemas de tiraje.connectores uno deG,A,S,D,CO— un conjunto fijo, no un endpoint de catálogo.DyCOsolo son válidos en cuentas fuera de Argentina.usefulLife, cuando se manda, tiene que ser ISO 8601.POST /deliveries:tapSystemIdstiene que tener al menos un elemento y sin duplicados.datees obligatorio y tiene que ser ISO 8601. Se rechaza si algún sistema de tiraje ya está en un cliente.customerLocationId, cuando se manda, tiene que ser uno de los puntos de venta del cliente.POST /returns:tapSystemIdstiene que tener al menos un elemento y sin duplicados. Se rechaza si algún sistema de tiraje no está hoy en un cliente.
Not in v1Fuera de v1
This resource is only the rows of the underlying table marked as an actual tap
system — the same table also holds a different kind of asset, published separately as
brewery-assets. POST /deliveries and
/returns only accept tap systems, never that other asset type, even though the
application's own screen lets you mix both in the same delivery or return — same reason a voided
delivery note's lines only ever show the tap systems on it. A delivery tied to an order
(CrearEntregaParaPedido) is excluded permanently — same E1 exclusion as orders
everywhere else in this API. QR/tracking-code helpers for the barcode-scanning screens aren't
published — same idiom already excluded for Kegs.
Este recurso es solo las filas de la tabla de base que son efectivamente un sistema
de tiraje — la misma tabla guarda también otro tipo de activo, publicado aparte como
brewery-assets. POST /deliveries y
/returns solo aceptan sistemas de tiraje, nunca ese otro tipo de activo, aunque la
pantalla de la aplicación deje mezclar los dos en la misma entrega o devolución
— mismo motivo por el que las líneas de un remito anulado solo muestran los sistemas de
tiraje que tenía. Una entrega atada a un pedido (CrearEntregaParaPedido) queda
excluida permanentemente — misma exclusión E1 que pedidos en el resto de esta API. Los
helpers de código QR/seguimiento para las pantallas de escaneo no están publicados
— mismo idiom ya excluido para Barriles.
Brewery assetsActivos de cervecería
The master record of a brewery asset — reusable equipment other than a tap system, tracked the same way: code, name, address, phone, brand, net value, useful life and notes — plus delivering one to a customer, its return, and the delivery note (remito) history. Shares its underlying table and delivery mechanism with Tap systems, filtered to the other kind.
El maestro de un activo de cervecería — equipamiento reutilizable que no es un sistema de tiraje, trackeado igual: código, nombre, dirección, teléfono, marca, valor neto, vida útil y notas — más la entrega a un cliente, su devolución, y el historial de remitos. Comparte tabla y mecanismo de entrega con Choperas, filtrado al otro tipo.
| Endpoint | What it does |
|---|---|
GET /brewery-assets | Paged listing. search (code or name), customerId, page, pageSize, includeInactive. |
GET /brewery-assets/{id} | One brewery asset, active or not. |
POST /brewery-assets | Creates a brewery asset. Answers 201. code is required. |
PUT /brewery-assets/{id} | Partial update. |
POST /brewery-assets/{id}/deactivate | Deactivation. Idempotent. |
POST /brewery-assets/{id}/activate | Reactivation. Idempotent. |
POST /brewery-assets/deliveries | Delivers one or more brewery assets to a customer, for the first time. Only this kind of asset — never tap systems or the complementary products the application lets you mix into the same delivery. |
GET /brewery-assets/deliveries | Paged listing of delivery notes. customerId, page, pageSize, includeInactive (also returns voided ones). Lines aren't included — get one by id for those. |
GET /brewery-assets/deliveries/{id} | One delivery note, with its lines. |
POST /brewery-assets/deliveries/{id}/void | Voids a delivery note: reverts every brewery asset on it as if it were never delivered. Idempotent. |
POST /brewery-assets/returns | A customer returning one or more brewery assets. Rejected if an asset isn't currently at a customer. |
| Endpoint | Qué hace |
|---|---|
GET /brewery-assets | Listado paginado. search (código o nombre), customerId, page, pageSize, includeInactive. |
GET /brewery-assets/{id} | Un activo, activo o no. |
POST /brewery-assets | Crea un activo. Responde 201. code es obligatorio. |
PUT /brewery-assets/{id} | Actualización parcial. |
POST /brewery-assets/{id}/deactivate | Baja. Idempotente. |
POST /brewery-assets/{id}/activate | Reactivación. Idempotente. |
POST /brewery-assets/deliveries | Entrega uno o más activos de cerveceria a un cliente, por primera vez. Solo este tipo de activo — nunca sistemas de tiraje ni los productos complementarios que la aplicación deja mezclar en la misma entrega. |
GET /brewery-assets/deliveries | Listado paginado de remitos. customerId, page, pageSize, includeInactive (también devuelve los anulados). No incluye las líneas — pedir uno por id para eso. |
GET /brewery-assets/deliveries/{id} | Un remito, con sus líneas. |
POST /brewery-assets/deliveries/{id}/void | Anula un remito: revierte cada activo como si nunca se hubiera entregado. Idempotente. |
POST /brewery-assets/returns | Un cliente devolviendo uno o más activos de cerveceria. Se rechaza si algún activo no está hoy en un cliente. |
Validation rulesReglas de validación
codeis required on create, and unique among your brewery assets (shares the uniqueness check withtap-systems: the same code can't be used by either).usefulLife, when sent, must be ISO 8601.POST /deliveries:assetIdsmust have at least one entry and no duplicates.dateis required and must be ISO 8601. Rejected if an asset is currently at a customer.customerLocationId, when sent, must be one of the customer's own points of sale.POST /returns:assetIdsmust have at least one entry and no duplicates. Rejected if any asset isn't currently at a customer.
codees obligatorio al crear, y único entre sus activos de cerveceria (comparte el chequeo de unicidad contap-systems: el mismo código no lo puede usar ninguno de los dos).usefulLife, cuando se manda, tiene que ser ISO 8601.POST /deliveries:assetIdstiene que tener al menos un elemento y sin duplicados.datees obligatorio y tiene que ser ISO 8601. Se rechaza si algún activo ya está en un cliente.customerLocationId, cuando se manda, tiene que ser uno de los puntos de venta del cliente.POST /returns:assetIdstiene que tener al menos un elemento y sin duplicados. Se rechaza si algún activo no está hoy en un cliente.
Not in v1Fuera de v1
This resource is only the rows of the underlying table NOT marked as a tap system —
see Tap systems for the other kind, and why both share the same table and
delivery mechanism. connector, tapSystemTypeId and fullWithCo2
aren't in this DTO: they're tap-system-specific, and the application always clears them server-side
for this kind of row. Complementary products (CO2 canisters, accessories) aren't this resource at all — they're a
different underlying model (a product, not a coded asset); their stock is already readable at
GET /products/{id}/stock (kind "complementary"), and delivering or
returning them to a customer is a stock movement with no order behind it — the same open E1 question
that already blocks Trasvasar/EgresoConCliente in Kegs,
not a new one.
Este recurso es solo las filas de la tabla de base que NO son un sistema de tiraje
— ver Choperas para el otro tipo, y por qué los dos comparten
tabla y mecanismo de entrega. connector, tapSystemTypeId y
fullWithCo2 no están en este DTO: son específicos de sistemas de tiraje, y
la aplicación siempre los limpia server-side para este tipo de fila. Los productos
complementarios (tubos de CO2, accesorios) no son este recurso en absoluto — son
otro modelo de base (un producto, no un activo con código); su stock ya se puede leer en
GET /products/{id}/stock (kind "complementary"), y entregarlos o
devolverlos a un cliente es un movimiento de stock sin ningún pedido detrás — la
misma pregunta abierta de E1 que ya bloquea Trasvasar/EgresoConCliente en
Barriles, no una nueva.
TanksTanques
The master record of a tank: name, kind, wood (for a barrel), capacity, and its
current status. GET /tanks is also the catalog of the tankId field of a
batch or a task.
El maestro de un tanque: nombre, tipo, madera (para una barrica), capacidad, y su
estado actual. GET /tanks es además el catálogo del campo
tankId de un lote o una tarea.
| Endpoint | What it does |
|---|---|
GET /tanks | Paged listing. search (name), page, pageSize, includeInactive. |
GET /tanks/{id} | One tank, active or not. |
POST /tanks | Creates a tank. Answers 201. name and tankTypeId are required. |
PUT /tanks/{id} | Partial update. |
POST /tanks/{id}/deactivate | Deactivation. Idempotent. |
POST /tanks/{id}/activate | Reactivation. Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /tanks | Listado paginado. search (nombre), page, pageSize, includeInactive. |
GET /tanks/{id} | Un tanque, activo o no. |
POST /tanks | Crea un tanque. Responde 201. name y tankTypeId son obligatorios. |
PUT /tanks/{id} | Actualización parcial. |
POST /tanks/{id}/deactivate | Baja. Idempotente. |
POST /tanks/{id}/activate | Reactivación. Idempotente. |
Validation rulesReglas de validación
nameis required, and unique among your tanks — active or not: you cannot reuse the name of a deactivated tank until it is renamed or reactivated.tankTypeIdis required on create; there is no sensible default.- Neither
litersnortankTypeIdcan change, and the tank cannot be deactivated, while it is assigned to a batch that has not finished.
namees obligatorio, y único entre sus tanques — activo o no: no puede reusar el nombre de un tanque desactivado hasta que se renombre o se reactive.tankTypeIdes obligatorio al crear; no hay un valor por defecto razonable.- Ni
litersnitankTypeIdse pueden cambiar, y el tanque no se puede dar de baja, mientras esté asignado a un lote no finalizado.
Read-only fieldsCampos de solo lectura
status is one of empty, withContent, dirty,
underMaintenance, cleaning, reserved. It is never set by
this resource: moving a batch through its stages changes it automatically, and the rest is the
(unpublished) maintenance module. A brand-new tank always starts empty.
status es uno de empty, withContent, dirty,
underMaintenance, cleaning, reserved. Nunca lo escribe este
recurso: mover un lote por sus etapas lo cambia automáticamente, y el resto es el módulo
de mantenimiento (sin publicar). Un tanque recién creado siempre arranca empty.
Not in v1Fuera de v1
Moving a batch's content from one tank to another without changing its stage is an operation of a batch, not of this resource — not published yet, same as the rest of what batches does not cover. What a tank currently holds (which batch, how much) is not published either — same open gap already noted for kegs' tank-held bulk beer. Tank reservations for planned batches, the scheduling (Gantt) view, and pairing a tank with a Waisens hardware sensor are all excluded — the last one is a third-party hardware integration behind an account feature flag, with no catalog or business semantics of its own.
Mover el contenido de un lote de un tanque a otro sin cambiar de etapa es una operación de un lote, no de este recurso — todavía no publicada, igual que el resto de lo que lotes no cubre. Qué tiene hoy un tanque (qué lote, cuánto) tampoco está publicado — mismo hueco ya señalado para la cerveza a granel de barriles. Las reservas de tanque para lotes planificados, la vista de programación (Gantt), y emparejar un tanque con un sensor Waisens quedan afuera — esto último es una integración de hardware de terceros detrás de un feature flag de cuenta, sin catálogo ni semántica de negocio propia.
Batches, tasks and measurementsLotes, tareas y mediciones
| Endpoint | What it does |
|---|---|
GET /batches | Lists your batches, newest first. Filter with search, stageId or unfinishedOnly. Tasks are not included. |
GET /batches/{id} | One batch, active or not. |
POST /batches | Creates a batch. Answers 201. number and productId are required; the number must not match another active batch. |
PUT /batches/{id} | Partial update. Does not change the stage. |
POST /batches/{id}/stage | Moves the batch to another stage. This is the call that advances production. Send discountsStock: true when entering the brewing stage to discount the recipe's supplies. |
GET /batches/{id}/supplies | What the batch consumed, one line per movement, with the supplier's own lot numbers. Not paginated. |
POST /batches/{id}/deactivate | Deactivates the batch, reversing what it put into stock and freeing its tank. |
POST /batches/{id}/activate | Reactivates it. |
GET /batches/{id}/tasks | The tasks of the batch, due day first. Not paginated. |
POST /batches/{id}/tasks/{taskId}/complete | Marks one task done, optionally recording a measurement. |
POST /batches/{id}/tasks/{taskId}/reopen | Undoes the completion. |
GET /batches/{id}/measurements | The measurements recorded on the batch, most recent first. Includes the ones recorded when completing a task. |
GET /batches/{id}/measurements/{measurementId} | One measurement, active or not. |
POST /batches/{id}/measurements | Records a measurement directly, without completing a task. measurementTypeId and value are required. Answers 201. |
POST /batches/{id}/measurements/{measurementId}/deactivate | Deactivates it. There is no PUT — to correct a measurement, deactivate it and record a new one. |
GET /batches/{id}/extended-notes | Long free-form HTML content. Empty (content: null) if none were ever saved. |
PUT /batches/{id}/extended-notes | Saves it. content absent leaves it unchanged; sent as null clears it. |
GET /tasks | Lists standalone tasks. Filter with from, to and completed. |
POST /tasks | Creates a standalone task. taskDefinitionId and dueDate are required. |
PUT /tasks/{id} | Partial update. |
POST /tasks/{id}/complete | Marks it done. Who and when come from your token and the server clock. |
POST /tasks/{id}/deactivate | Deactivates it. |
GET /task-definitions | Lists the reusable task templates, yours and the shared ones. |
POST /task-definitions | Creates one. name is required and must be unique among your active definitions. |
PUT /task-definitions/{id} | Partial update. A shared definition cannot be modified. |
GET /measurements | Lists standalone measurements — not tied to any batch — most recent first. |
GET /measurements/{id} | One standalone measurement, active or not. |
POST /measurements | Records one. measurementTypeId and value are required. Answers 201. |
POST /measurements/{id}/deactivate | Deactivates it. |
GET /batches/{id}/waste | The production losses recorded on the batch, most recent first. Includes losses recorded automatically while packaging or splitting it. |
GET /batches/{id}/waste/{wasteId} | One waste record. |
POST /batches/{id}/waste | Records a loss. stageId, wasteTypeId, liters and recordedOn are required. Answers 201. |
| Endpoint | Qué hace |
|---|---|
GET /batches | Lista sus lotes, del más nuevo al más viejo. Filtre con search, stageId o unfinishedOnly. No incluye las tareas. |
GET /batches/{id} | Un lote, activo o no. |
POST /batches | Crea un lote. Responde 201. number y productId son obligatorios; el número no puede coincidir con el de otro lote activo. |
PUT /batches/{id} | Actualización parcial. No cambia la etapa. |
POST /batches/{id}/stage | Mueve el lote a otra etapa. Es la llamada que hace avanzar la producción. Mande discountsStock: true al entrar en cocción para descontar los insumos de la receta. |
GET /batches/{id}/supplies | Lo que el lote consumió, una línea por movimiento, con los números de lote del proveedor. Sin paginar. |
POST /batches/{id}/deactivate | Da de baja el lote, revirtiendo lo que ingresó a stock y liberando su tanque. |
POST /batches/{id}/activate | Lo reactiva. |
GET /batches/{id}/tasks | Las tareas del lote, por día. Sin paginar. |
POST /batches/{id}/tasks/{taskId}/complete | Marca una tarea como hecha, con una medición opcional. |
POST /batches/{id}/tasks/{taskId}/reopen | Deshace el completado. |
GET /batches/{id}/measurements | Las mediciones registradas en el lote, de la más reciente a la más vieja. Incluye las que se registraron al completar una tarea. |
GET /batches/{id}/measurements/{measurementId} | Una medición, activa o no. |
POST /batches/{id}/measurements | Registra una medición directamente, sin completar una tarea. measurementTypeId y value son obligatorios. Responde 201. |
POST /batches/{id}/measurements/{measurementId}/deactivate | La da de baja. No hay PUT: para corregir una medición, se da de baja y se carga una nueva. |
GET /batches/{id}/extended-notes | Contenido HTML largo. Vacío (content: null) si nunca se guardó. |
PUT /batches/{id}/extended-notes | Lo guarda. content ausente lo conserva; enviado en null lo borra. |
GET /tasks | Lista las tareas sueltas. Filtre con from, to y completed. |
POST /tasks | Crea una tarea suelta. taskDefinitionId y dueDate son obligatorios. |
PUT /tasks/{id} | Actualización parcial. |
POST /tasks/{id}/complete | La marca como hecha. Quién y cuándo salen de su token y del reloj del servidor. |
POST /tasks/{id}/deactivate | La da de baja. |
GET /task-definitions | Lista las plantillas de tarea reutilizables, las suyas y las compartidas. |
POST /task-definitions | Crea una. name es obligatorio y único entre sus definiciones activas. |
PUT /task-definitions/{id} | Actualización parcial. Una definición compartida no se puede modificar. |
GET /measurements | Lista las mediciones sin lote, de la más reciente a la más vieja. |
GET /measurements/{id} | Una medición sin lote, activa o no. |
POST /measurements | Registra una. measurementTypeId y value son obligatorios. Responde 201. |
POST /measurements/{id}/deactivate | La da de baja. |
GET /batches/{id}/waste | Las mermas registradas en el lote, de la más reciente a la más vieja. Incluye las que se registran automáticamente al envasar o dividir el lote. |
GET /batches/{id}/waste/{wasteId} | Una merma. |
POST /batches/{id}/waste | Registra una merma. stageId, wasteTypeId, liters y recordedOn son obligatorios. Responde 201. |
Three kinds of task, and why they are two resourcesTres clases de tarea, y por qué son dos recursos
A task definition (/task-definitions) is a template: "measure gravity",
"clean the tank". It is not something to be done — it is the description of something that gets done
over and over. Definitions marked isShared come with the system and every account uses
them; you may use them but not modify them.
A standalone task (/tasks) is one thing to be done on one date, by
someone, not tied to any batch.
A batch task (/batches/{id}/tasks) is generated together with the
batch, from its recipe. You do not create these one at a time, which is why that route has no
POST — you complete them and you reopen them.
Una definición de tarea (/task-definitions) es una plantilla:
"medir densidad", "limpiar el tanque". No es algo que haya que hacer, es la descripción de algo
que se hace una y otra vez. Las definiciones marcadas isShared vienen con el sistema y
las usan todas las cuentas; usted puede usarlas pero no modificarlas.
Una tarea suelta (/tasks) es una cosa que hay que hacer en una fecha,
por alguien, sin lote asociado.
Una tarea de lote (/batches/{id}/tasks) se genera junto con el lote, a
partir de su receta. Estas no se crean de a una, y por eso esa ruta no tiene POST: se
completan y se reabren.
Advancing a batchCómo avanza un lote
The stage is not a field you set with PUT. Moving a batch records the transition in its history, moves the product's stock, and reserves or frees the tank, so it has its own call:
POST /api/v1/batches/340/stage
{ "stageId": 3, "tankId": 5 }
A batch only moves forward, with one exception the application allows: from the filtering stage it may go back. From brewing it can only go to fermentation or straight to finished. A tank is required from fermentation onwards unless your account does not manage tanks, and a tank already holding another batch is rejected naming that batch.
La etapa no es un campo que se fije con PUT. Mover un lote registra la transición en su historial, mueve el stock del producto, y reserva o libera el tanque, así que tiene su propia llamada:
POST /api/v1/batches/340/stage
{ "stageId": 3, "tankId": 5 }
Un lote solo avanza, con una excepción que la aplicación permite: desde filtrado puede volver. Desde cocción solo puede ir a fermentación o directo a finalizado. El tanque es obligatorio a partir de fermentación salvo que su cuenta no administre tanques, y un tanque que ya tiene otro lote se rechaza nombrando ese lote.
Validation rulesReglas de validación
numberis required and must not match another active batch. This applies to reactivation too: a batch whose number has been taken cannot be brought back until one of them is renumbered.literscannot be lowered by an update. Taking litres out of a batch is done throughPOST /batches/{id}/waste, which keeps the loss accounted for.- A finished batch cannot be updated, and its tasks cannot be reopened.
- The product cannot be changed once the batch has been brewed, unless your account enables it.
- Only a temperature may be reported as a negative measurement — whether recorded by completing a
task or with
POST /batches/{id}/measurementsdirectly. A standalone measurement (POST /measurements) has no such restriction. - A task assigned to another user cannot be completed unless your integration user may see everyone's tasks.
- The due date of a standalone task cannot be in the past. Today is accepted.
- A waste record cannot be greater than the batch's current liters, and its
recordedOncannot be later than today. The batch must have reached the brewing stage.
numberes obligatorio y no puede coincidir con el de otro lote activo. Vale también para la reactivación: un lote cuyo número fue tomado no se puede recuperar hasta que se renumere alguno de los dos.litersno se puede bajar con una actualización. Sacarle litros a un lote se hace conPOST /batches/{id}/waste, que deja la pérdida imputada.- Un lote finalizado no se puede actualizar, y sus tareas no se pueden reabrir.
- El producto no se puede cambiar una vez que el lote pasó por cocción, salvo que su cuenta lo habilite.
- Solo una temperatura puede informarse como medición negativa — ya sea registrada al
completar una tarea o con
POST /batches/{id}/measurementsdirectamente. Una medición sin lote (POST /measurements) no tiene esa restricción. - Una tarea asignada a otro usuario no se puede completar, salvo que su usuario de integración pueda ver las tareas de todos.
- La fecha de una tarea suelta no puede estar en el pasado. Hoy sí se acepta.
- Una merma no puede ser mayor a los litros actuales del lote, y su
recordedOnno puede ser posterior a hoy. El lote tiene que haber llegado a la etapa de cocción.
Read-only fields that look writableCampos que parecen escribibles y no lo son
Three fields of a batch are reported but never written, and sending them has no effect:
stageId— usePOST /batches/{id}/stage.date— the server stamps it on create and never changes it. The date that matters to production isbrewDate.discountsStock— it REPORTS whether the supplies were already taken out of stock. To make it happen, senddiscountsStock: trueonPOST /batches/{id}/stage. If this one were writable, aPUTthat only changed the notes could silently move stock.
Completing a task does not move stock either, even when its definition says it should: the supplies a task consumes are a different sub-resource, not published in this version.
Tres campos del lote se informan pero nunca se escriben, y mandarlos no tiene efecto:
stageId— usePOST /batches/{id}/stage.date— la fija el servidor en el alta y no la cambia nunca. La fecha que importa para producción esbrewDate.discountsStock— INFORMA si los insumos ya salieron de stock. Para que salgan, mandediscountsStock: trueenPOST /batches/{id}/stage. Si este fuera escribible, unPUTque sólo cambia las notas podría mover stock sin que se note.
Completar una tarea tampoco mueve stock, aunque su definición diga que debería: los insumos que consume una tarea son otro sub-recurso, no publicado en esta versión.
Not in v1Fuera de v1
Kegging, splitting and merging batches, reusable yeast and its harvests, tank planning and reservations, and the supplies a task consumes. Each needs its own resource with its own catalogs; none of them is required to record production and move a batch through its stages. Waste groups for sales projection (a resource unrelated to the waste recorded here, despite the name) are their own resource, not published yet.
Embarrilado, división y unión de lotes, levaduras reutilizables y sus cosechas, planificación y reservas de tanque, y los insumos que consume una tarea. Cada uno necesita su propio recurso con sus catálogos; ninguno hace falta para registrar producción y hacer avanzar un lote por sus etapas. Los grupos de merma para proyección de ventas (un recurso sin relación con la merma que se registra acá, pese al nombre) son su propio recurso, todavía no publicado.
CostingsCosteos
What it cost to produce a batch or a recipe — not to be confused with stock
valuation (what your on-hand stock is worth today, not published in this version). Exactly one of
batchId/recipeId is required; productId is resolved from
whichever one you sent.
Cuánto costó producir un lote o una receta — no confundir con la
valorización de stock (cuánto vale su stock hoy, todavía no publicada).
Exactamente uno de batchId/recipeId es obligatorio;
productId se resuelve a partir del que haya mandado.
| Endpoint | What it does |
|---|---|
GET /costings | Paged listing, most recent first. search (name), page, pageSize, includeInactive. Detail lines are not included. |
GET /costings/{id} | One costing, active or not, with its detail lines. |
POST /costings | Creates a costing. Answers 201. detailLines is required, with at least one entry. |
PUT /costings/{id} | Partial update. detailLines absent leaves the lines untouched; present (even empty) replaces every line — but empty is rejected, same rule as create. |
POST /costings/{id}/deactivate | Deactivation. Idempotent. |
POST /costings/{id}/activate | Reactivation. Idempotent. |
GET /costings/{id}/history | Edit history, most recent first. Each entry reports whether it can be restored (hasSnapshot). |
POST /costings/{id}/restore | Restores the costing to a previous version. Body: historyId, from the history listing. Reactivates the costing if it was inactive. |
POST /costings/{id}/recalculate | Recalculates one costing from the batch's current state: canonical liter base, per-litre cost, and the same propagation to the product a plain save does. Only on a finished batch. |
GET /costings/recalculate-count | Impact of a bulk recalculation from a date (from, required): how many costings would be recalculated and how many skipped. |
POST /costings/recalculate | Bulk recalculation from a date (from, required), oldest first. Rejects the whole batch above a fixed limit — check recalculate-count first. |
| Endpoint | Qué hace |
|---|---|
GET /costings | Listado paginado, del más reciente al más viejo. search (nombre), page, pageSize, includeInactive. No incluye las líneas de detalle. |
GET /costings/{id} | Un costeo, activo o no, con sus líneas de detalle. |
POST /costings | Crea un costeo. Responde 201. detailLines es obligatorio, con al menos un elemento. |
PUT /costings/{id} | Actualización parcial. detailLines ausente conserva las líneas; presente (incluso vacío) reemplaza todas — pero vacío se rechaza, misma regla que al crear. |
POST /costings/{id}/deactivate | Baja. Idempotente. |
POST /costings/{id}/activate | Reactivación. Idempotente. |
GET /costings/{id}/history | Historial de ediciones, del más reciente al más viejo. Cada entrada informa si se puede restaurar (hasSnapshot). |
POST /costings/{id}/restore | Restaura el costeo a una versión anterior. Body: historyId, del listado de historial. Reactiva el costeo si estaba inactivo. |
POST /costings/{id}/recalculate | Recalcula un costeo con el estado actual del lote: base de litros canónica, costo por litro, y la misma propagación al producto que un guardado normal. Solo lotes finalizados. |
GET /costings/recalculate-count | Impacto de un recálculo masivo desde una fecha (from, obligatorio): cuántos costeos se recalcularían y cuántos se saltearían. |
POST /costings/recalculate | Recálculo masivo desde una fecha (from, obligatorio), del más viejo al más nuevo. Rechaza toda la tanda por encima de un límite fijo — consultar antes recalculate-count. |
Validation rulesReglas de validación
- Exactly one of
batchId/recipeIdis required. detailLinesmust have at least one entry — a fixed or a variable cost.- A costing on a batch that has not reached the finished stage is rejected unless your account enables costing unfinished batches.
- Es obligatorio exactamente uno de
batchId/recipeId. detailLinestiene que tener al menos un elemento — un costo fijo o variable.- Un costeo sobre un lote que no llegó a la etapa finalizado se rechaza salvo que su cuenta habilite costear lotes sin finalizar.
Preliminary and confirmed costingsCosteos preliminares y confirmados
preliminary(read-only) istruefor a costing generated by the account's automatic lot costing and not yet confirmed. It has no fixed costs and does not update the product costs.confirmedAt(read-only) is the date-time when a person confirmed a preliminary costing as final, on the same costing. It isnullfor any other costing. A confirmed costing is final:preliminaryisfalse.- The history reports the confirmation as
action: "confirmed". - Confirming is not published in v1: the application asks for it after an informed preview with warnings, and a single call would skip that step.
preliminary(solo lectura) estrueen un costeo que generó el autocosteo de lotes de la cuenta y que todavía no se confirmó. No tiene costos fijos y no actualiza los costos del producto.confirmedAt(solo lectura) es la fecha y hora en que una persona confirmó un costeo preliminar como definitivo, sobre el mismo costeo. Esnullen cualquier otro costeo. Un costeo confirmado es definitivo:preliminaryesfalse.- El historial informa la confirmación como
action: "confirmed". - La confirmación no se publica en v1: la aplicación la pide después de una vista previa informada con advertencias, y una sola llamada salteária ese paso.
Not in v1Fuera de v1
The screen's suggestion assistant (deriving detail lines from a recipe's or a
batch's raw materials, with packaging-litre reconciliation and weighted-average-cost logic) is not
published — a consumer supplies its own detail lines. A detail line never references a packaging
run (packaging-runs is out of v1, same E3 exclusion as elsewhere): a line created
through this resource is always a raw material, an expense account, or a manually-typed cost, never
a packaging cost. Creating or updating a costing here never touches a container's or a case's own
cost — the conservative branch. recalculate and restore are a straight
wire-through to the same operation the application's screen uses, so unlike create/update they
do carry that side effect when the batch has packaging runs of its own, exactly like the
screen.
El asistente de sugerencia de la pantalla (armar líneas de detalle a partir de
los insumos de una receta o un lote, con reconciliación de litros de envasado y cálculo
de precio ponderado) no está publicado — un consumidor arma sus propias líneas de
detalle. Una línea nunca referencia un envasado (packaging-runs está fuera
de v1, misma exclusión E3 que en el resto de la API): una línea creada por este recurso
siempre es un insumo, una cuenta de egreso, o un costo cargado a mano, nunca un costo de envasado.
Crear o actualizar un costeo acá nunca toca el costo propio de un envase o una caja — la
rama conservadora. recalculate y restore son wiring directo a la misma
operación que usa la pantalla de la aplicación, así que a diferencia de
crear/actualizar sí arrastran ese efecto colateral cuando el lote tiene envasados
propios, igual que la pantalla.
Waste groupsGrupos de merma
Groups of your own brewed products that share one expected waste percentage, used to
project how many liters a planned brew will actually yield. Not related to
batches/{id}/waste (the actual production losses recorded on a batch) or to
/waste-types (the stages a loss can be attributed to) — despite the similar name,
neither has any connection to this resource: this one groups products, not waste records or waste
types.
Grupos de productos propios que comparten un mismo porcentaje de merma esperado,
usados para proyectar cuántos litros netos rendirá una cocción planificada.
Sin relación con batches/{id}/waste (las mermas reales
registradas en un lote) ni con /waste-types (las etapas a las que se puede imputar una
merma) — pese al nombre parecido, ninguno de los dos tiene conexión con este recurso:
este agrupa productos, no registros ni tipos de merma.
| Endpoint | What it does |
|---|---|
GET /waste-groups | Paged listing. page, pageSize. productIds is not included — one extra query per row. |
GET /waste-groups/{id} | One group, with its product membership. |
POST /waste-groups | Creates a group. Answers 201. name and wastePercentage are required; productIds is optional. |
PUT /waste-groups/{id} | Partial update. productIds absent leaves the membership untouched; present (even empty) replaces it entirely. |
| No deactivation. This is the only resource without one: a waste group is a grouping for a projection percentage, not a record with history. Deleting one is done in the application, which unlinks its products and removes the row cleanly. | |
| Endpoint | Qué hace |
|---|---|
GET /waste-groups | Listado paginado. page, pageSize. No incluye productIds — una consulta extra por fila. |
GET /waste-groups/{id} | Un grupo, con su membresía de productos. |
POST /waste-groups | Crea un grupo. Responde 201. name y wastePercentage son obligatorios; productIds es opcional. |
PUT /waste-groups/{id} | Actualización parcial. productIds ausente conserva la membresía; presente (incluso vacío) la reemplaza entera. |
| No tiene baja. Es el único recurso sin ella: un grupo de merma es una agrupación para un porcentaje de proyección, no un registro con historial. Borrar uno se hace desde la aplicación, que desvincula sus productos y elimina la fila de forma limpia. | |
Validation rulesReglas de validación
- name is required and must be unique among your active groups.
- wastePercentage is required, between 0.01 and 100, and must be unique among your active groups.
- A product already in another active group is rejected, naming the conflicting products.
- name es obligatorio y único entre sus grupos activos.
- wastePercentage es obligatorio, entre 0.01 y 100, y único entre sus grupos activos.
- Un producto que ya está en otro grupo activo se rechaza, nombrando los productos en conflicto.
A soft delete the screen does not shareUna baja blanda que la pantalla no comparte
The application's own screen deletes a group physically — the only resource in this API where
that is true. deactivate/activate use the record's own active
column instead, same as every other resource here, so a group removed through this API keeps its
history. The screen does not filter by that column today, so a group you deactivate here may still
appear there until the screen is updated to respect it too.
La pantalla de la aplicación borra un grupo físicamente — el único
recurso de esta API donde eso es cierto. deactivate/activate usan en
cambio la columna active propia del registro, igual que el resto de los recursos, así
que un grupo dado de baja por acá conserva su historial. La pantalla no filtra por esa columna
hoy, así que un grupo desactivado por acá puede seguir apareciendo ahí hasta que
la pantalla también la respete.
AccountCuenta
Your account — the brewery, distillery, cidery or distributor using this API. A
singleton: there is exactly one per token, resolved from the token itself, so there
is no id in the route and no list. id/country here match the same fields
already returned by POST /auth/login.
Su cuenta — la cervecería, destilería, sidrería o
distribuidora que usa esta API. Un singleton: hay exactamente uno por token,
resuelto del propio token, así que no hay id en la ruta ni un listado.
id/country acá coinciden con los mismos campos que ya devuelve
POST /auth/login.
This is the identity/fiscal side of your account — operational account-wide configuration (invoice numbering, default notes, etc.) is a different, not-yet-published piece of the backlog. Never exposed here, in either direction: the API key that authenticates this very API, and the bank account used to pay your subscription to this platform — neither is a business field of your account.
Este es el lado identidad/fiscal de su cuenta — la configuración operativa de la cuenta (numeración de comprobantes, notas por defecto, etc.) es una pieza distinta del backlog, todavía sin publicar. Nunca expuestos acá, en ninguna dirección: la clave que autentica esta misma API, y la cuenta bancaria con la que se paga la suscripción a esta plataforma — ninguna de las dos es un dato de negocio de su cuenta.
| Endpoint | What it does |
|---|---|
GET /account | Your account. |
PUT /account | Partial update. country, planId and logoUrl are read-only. |
| Endpoint | Qué hace |
|---|---|
GET /account | Su cuenta. |
PUT /account | Actualización parcial. country, planId y logoUrl son de solo lectura. |
Validation rulesReglas de validación
legalNameis required.countryis fixed at account creation — the platform shards some data by country, so changing it is an infrastructure migration, not a field update.planIdchanges only through dedicated billing flows, never through this endpoint.logoUrlis read-only in this version, same criterion asbrands: there is no file-upload endpoint anywhere in this API yet.- If
taxConditionIdstops being Argentina's "Responsable Inscripto" while your account had VAT withholdings enabled, this also turns that setting off, same as the web application does — it is not reported back in the response.
legalNamees obligatorio.countryqueda fijo desde el alta de la cuenta — la plataforma parte algunos datos por país, así que cambiarlo es una migración de infraestructura, no una actualización de campo.planIdcambia solo por flujos de facturación dedicados, nunca por este endpoint.logoUrles de solo lectura en esta versión, mismo criterio quebrands: no hay ningún endpoint de subida de archivos en esta API todavía.- Si
taxConditionIddeja de ser "Responsable Inscripto" (Argentina) mientras su cuenta tenía activadas las percepciones de IVA, esto también apaga esa configuración, igual que hace la aplicación web — no se informa en la respuesta.
MaintenancesMantenimientos
Requires the Maintenance add-on, and is not available on the Homebrewer
plan. Without the add-on the answer is 403 addon_not_contracted; on
Homebrewer, 403 plan_forbidden.
Requiere el addon de Mantenimiento, y no está disponible en el plan
Homebrewer. Sin el addon la respuesta es 403 addon_not_contracted; en
Homebrewer, 403 plan_forbidden.
Scheduled and performed maintenance/cleaning tasks on your tanks, kegs, tap systems and
brewery assets. The underlying record has no explicit status column: status is
calculated from startedAt/finishedAt, never stored as such.
assetType/assetId replace the four separate, mutually-exclusive foreign
keys the real record has (one per kind of asset) with a single pair.
Tareas de mantenimiento/limpieza, programadas o realizadas, sobre sus tanques,
barriles, sistemas de tiraje y activos de fábrica. El registro real no tiene una columna de
estado explícita: status se calcula a partir de
startedAt/finishedAt, nunca se guarda como tal.
assetType/assetId reemplazan las cuatro claves foráneas separadas
y mutuamente excluyentes que tiene el registro real (una por tipo de activo) por un único
par.
This entity is now complete, including the spare-parts sub-resource
(which needed the separate spare-parts entity to publish first, so its
sparePartId would reference a real resource, not just a catalog).
Esta entidad ya está completa, incluido el sub-recurso de
repuestos (que necesitaba que la entidad separada spare-parts se publicara primero,
para que su sparePartId referenciara un recurso real, no solo un catálogo).
| Endpoint | What it does |
|---|---|
GET /maintenances | Paginated list. Filters: search, assetType, assetId, status, from/to (event date range), includeInactive, recurring (lists ONLY templates instead of occurrences). |
GET /maintenances/{id} | A single maintenance, active or not — an occurrence or a template. |
POST /maintenances | Creates a maintenance/cleaning occurrence ("pending", not started), or a recurring template if recurring: true. |
POST /maintenances/{id}/start | Starts a pending maintenance/cleaning. Not idempotent: 400 if already started or finished. |
POST /maintenances/{id}/finish | Finishes a started maintenance/cleaning, discounting the spare parts it used from stock. Not idempotent: 400 if not started yet or already finished. |
POST /maintenances/{id}/reschedule | Changes the scheduled event date. No restriction on the current status. |
POST /maintenances/{id}/recur | Generates the next occurrence of a recurring template. The occurrence is created already "started". |
POST /maintenances/{id}/deactivate | Idempotent. Blocked only if already finished. |
POST /maintenances/{id}/activate | Idempotent. |
GET /maintenances/{id}/spare-parts | The spare part lines loaded, shown as-is regardless of status. |
PUT /maintenances/{id}/spare-parts | Replaces the whole set of lines. Blocked (400) on a finished or deactivated maintenance. Every quantity must be greater than zero (400 business_rule). |
| Endpoint | Qué hace |
|---|---|
GET /maintenances | Listado paginado. Filtros: search, assetType, assetId, status, from/to (rango de fecha de evento), includeInactive, recurring (lista SOLO plantillas en vez de ocurrencias). |
GET /maintenances/{id} | Un mantenimiento, activo o no — una ocurrencia o una plantilla. |
POST /maintenances | Crea una ocurrencia de mantenimiento/limpieza ("pending", sin iniciar), o una plantilla reiterativa si recurring: true. |
POST /maintenances/{id}/start | Inicia un mantenimiento/limpieza pendiente. No idempotente: 400 si ya está iniciado o finalizado. |
POST /maintenances/{id}/finish | Finaliza un mantenimiento/limpieza iniciado, descontando de stock los repuestos usados. No idempotente: 400 si todavía no está iniciado o ya está finalizado. |
POST /maintenances/{id}/reschedule | Cambia la fecha de evento programada. Sin restricción por el estado actual. |
POST /maintenances/{id}/recur | Genera la próxima ocurrencia de una plantilla reiterativa. La ocurrencia se crea ya "started". |
POST /maintenances/{id}/deactivate | Idempotente. Bloqueado solo si ya está finalizado. |
POST /maintenances/{id}/activate | Idempotente. |
GET /maintenances/{id}/spare-parts | Las líneas de repuestos cargadas, tal cual estén, sin importar el estado. |
PUT /maintenances/{id}/spare-parts | Reemplaza el set entero de líneas. Bloqueado (400) sobre un mantenimiento finalizado o desactivado. Cada quantity tiene que ser mayor a cero (400 business_rule). |
Validation rulesReglas de validación
assetType(one oftank,keg,tapSystem,breweryAsset),assetId,category,typeandeventDateare required on create. All four are read-only afterwards.assetIdmust exist in the catalog named byassetType: /tanks, /kegs, /tap-systems or /brewery-assets.category: 1 = maintenance, 2 = cleaning.type's meaning depends on it — if maintenance: 1 = preventive, 2 = corrective; if cleaning: 1 = acidic, 2 = alkaline, 3 = other.notescan only be set at creation — there is no way to edit it afterwards in the web application either./startrequires the maintenance to be "pending" — not already started or finished./finishrequires it to be "started" — not "pending" (never started) nor already "finished". Calling it twice would discount spare-part stock twice, so it is deliberately not idempotent./reschedulerequires a valid, non-emptyeventDate. No restriction on the current status — same as the web application, which allows fixing a wrong scheduled date even after the maintenance started or finished.- Deactivating is blocked only when the maintenance is already finished (both started and finished) — one that was started but never finished can still be deactivated. All actions above are blocked (400) on a deactivated maintenance.
recurring: trueon create requiresrecurrenceEvery(an integer > 0) andrecurrencePeriod(one ofdays,months,years). Creates a template instead of a single occurrence — its ownstatusstays "pending" forever, it never starts/finishes itself./recuronly works on a maintenance withrecurring: true— 400 otherwise. The new occurrence copies the template's asset/category/type/provider/notes, and is created already "started", same as the web application.sparePartIdandwarehouseIdin a spare-part line must exist in your account: /spare-parts and /warehouses respectively.PUT .../spare-partsis blocked (400) on a finished maintenance — those lines are the actual record of what was discounted from stock at/finish, not an editable plan anymore.
assetType(uno detank,keg,tapSystem,breweryAsset),assetId,category,typeyeventDateson obligatorios en el alta. Los cuatro son de solo lectura después.assetIddebe existir en el catálogo que indicaassetType: /tanks, /kegs, /tap-systems o /brewery-assets.category: 1 = mantenimiento, 2 = limpieza. El significado detypedepende de ella — si es mantenimiento: 1 = preventivo, 2 = correctivo; si es limpieza: 1 = ácida, 2 = alcalina, 3 = otro.notessolo se puede fijar en el alta — tampoco hay forma de editarlo después en la aplicación web./startexige que el mantenimiento esté "pending" — no iniciado ni finalizado todavía./finishexige que esté "started" — ni "pending" (nunca iniciado) ni ya "finished". Llamarlo dos veces descontaría stock de repuestos dos veces, por eso es deliberadamente no idempotente./rescheduleexige uneventDateválido y no vacío. Sin restricción por el estado actual — igual que la aplicación web, que permite corregir una fecha mal cargada incluso después de iniciado o finalizado el mantenimiento.- La desactivación se bloquea solo cuando el mantenimiento ya está finalizado (con inicio y fin), uno que fue iniciado pero nunca finalizado todavía se puede desactivar. Todas las acciones de arriba se bloquean (400) sobre un mantenimiento desactivado.
recurring: trueen el alta exigerecurrenceEvery(un entero > 0) yrecurrencePeriod(uno dedays,months,years). Crea una plantilla en vez de una ocurrencia única — su propiostatusqueda "pending" para siempre, nunca se inicia/finaliza a sí misma./recursolo funciona sobre un mantenimiento conrecurring: true— 400 en caso contrario. La nueva ocurrencia copia activo/categoría/tipo/proveedor/notas de la plantilla, y se crea ya "started", igual que la aplicación web.sparePartIdywarehouseIdde una línea de repuesto deben existir en su cuenta: /spare-parts y /warehouses respectivamente.PUT .../spare-partsse bloquea (400) sobre un mantenimiento finalizado — esas líneas son el registro real de qué se descontó de stock en/finish, ya no un plan editable.
Spare partsRepuestos
Requires the Maintenance add-on, and is not available on the Homebrewer
plan — spare parts are part of Maintenance. Without the add-on the answer is
403 addon_not_contracted; on Homebrewer, 403 plan_forbidden.
Requiere el addon de Mantenimiento, y no está disponible en el plan
Homebrewer — los repuestos son parte de Mantenimiento. Sin el addon la respuesta es
403 addon_not_contracted; en Homebrewer, 403 plan_forbidden.
Spare parts used in equipment maintenance. This resource has no foreign keys of its own — unlike most catalogs in this API, there is nothing here to validate against another resource.
Repuestos usados en el mantenimiento de equipos. Este recurso no tiene ninguna clave foránea propia — a diferencia de la mayoría de los catálogos de esta API, no hay nada acá que validar contra otro recurso.
This entity is now complete, including stock, its manual movements and its history.
Esta entidad ya está completa, incluidos el stock, sus movimientos manuales y su histórico.
| Endpoint | What it does |
|---|---|
GET /spare-parts | Paginated list. Filters: search (code/name), includeInactive. With the defaults, this is exactly the catalog of sparePartId used by a purchase line and a supplier item mapping. Without the Maintenance add-on it answers 403, but a purchase line and a mapping still accept a sparePartId. |
GET /spare-parts/{id} | A single spare part, active or not. |
POST /spare-parts | Creates a spare part. Only name is required. |
PUT /spare-parts/{id} | Partial update. |
POST /spare-parts/{id}/deactivate | Idempotent. No business rule blocks it — same as the web application. |
POST /spare-parts/{id}/activate | Idempotent. |
GET /spare-parts/{id}/stock | Stock on hand, overall and per warehouse. |
POST /spare-parts/{id}/stock/adjustments | Manual stock movement. The sign of quantity decides the direction. |
POST /spare-parts/{id}/stock/transfers | Moves stock from one warehouse to another. |
GET /spare-parts/{id}/movements | Paginated stock movement history, most recent first. Filter: warehouseId. |
| Endpoint | Qué hace |
|---|---|
GET /spare-parts | Listado paginado. Filtros: search (código/nombre), includeInactive. Con los valores por defecto, es exactamente el catálogo de sparePartId que usan una línea de compra y un mapeo de ítem de proveedor. Sin el addon de Mantenimiento responde 403, pero una línea de compra y un mapeo siguen aceptando un sparePartId. |
GET /spare-parts/{id} | Un repuesto, activo o no. |
POST /spare-parts | Crea un repuesto. Solo name es obligatorio. |
PUT /spare-parts/{id} | Actualización parcial. |
POST /spare-parts/{id}/deactivate | Idempotente. Ninguna regla de negocio lo bloquea — igual que la aplicación web. |
POST /spare-parts/{id}/activate | Idempotente. |
GET /spare-parts/{id}/stock | Stock disponible, total y por depósito. |
POST /spare-parts/{id}/stock/adjustments | Movimiento manual de stock. El signo de quantity decide la dirección. |
POST /spare-parts/{id}/stock/transfers | Mueve stock de un depósito a otro. |
GET /spare-parts/{id}/movements | Histórico paginado de movimientos, más reciente primero. Filtro: warehouseId. |
Validation rulesReglas de validación
nameis required.description, up to 250 characters if present.codeandminimumStockare free-form, with no uniqueness enforced oncode.- There is no check here for existing stock or maintenances referencing a spare part before deactivating it — the web application itself has none either.
stockis deliberately not part of this DTO: it is not a real stored value on this resource, it is exposed byGET .../stockinstead.warehouseId,fromWarehouseIdandtoWarehouseIdmust exist in your account: /warehouses.POST .../stock/transfers:quantitymust be greater than zero (decimals are allowed), andtoWarehouseIdmust be different fromfromWarehouseId. Either case answers400business_rule. Both legs of the transfer are recorded together or not at all.POST .../stock/transfers: the origin warehouse must have enough stock. A transfer of more than its current stock answers400business_rule, always, like/suppliestransfers.POST .../stock/adjustments:quantitycannot be zero (400business_rule); its sign decides the direction. Unlike/supplies/{id}/stock/adjustments, there is no cap on quantity and no 30-day retroactivity limit. The resulting stock may go negative, unless the account has turned on the setting that blocks negative spare part stock: then an exit that would leave the warehouse below zero answers400business_rule. That setting does not apply to transfers.
namees obligatorio.description, hasta 250 caracteres si se manda.codeyminimumStockson de texto/número libre, sin unicidad exigida sobrecode.- No hay ningún chequeo de stock o mantenimientos que referencien un repuesto antes de desactivarlo — la aplicación web tampoco lo tiene.
stockdeliberadamente no es parte de este DTO: no es un valor realmente almacenado en este recurso, se expone conGET .../stock.warehouseId,fromWarehouseIdytoWarehouseIddeben existir en su cuenta: /warehouses.POST .../stock/transfers:quantitytiene que ser mayor a cero (se aceptan decimales) ytoWarehouseIdtiene que ser distinto defromWarehouseId. Cualquiera de los dos casos responde400business_rule. Las dos patas del traslado se graban juntas o ninguna.POST .../stock/transfers: el depósito de origen tiene que tener stock suficiente. Un traslado de más de lo que tiene responde400business_rule, siempre, igual que los traslados de/supplies.POST .../stock/adjustments:quantityno puede ser cero (400business_rule); el signo decide la dirección. A diferencia de/supplies/{id}/stock/adjustments, no hay tope de cantidad ni límite de retroactividad de 30 días. El stock resultante puede quedar en negativo, salvo que la cuenta haya prendido la configuración que bloquea el stock negativo de repuestos: ahí un egreso que deje el depósito bajo cero responde400business_rule. Esa configuración no aplica a los traslados.
Event categoriesCategorías de evento
Categories used to classify a calendar event — see Calendar events for the events themselves.
Categorías usadas para clasificar un evento de agenda — ver Eventos de agenda para los eventos en sí.
| Endpoint | What it does |
|---|---|
GET /event-categories | Paginated list. Filters: search (name), includeInactive. Includes both your own categories and the global ones the platform uses to reflect due dates from other domains. |
GET /event-categories/{id} | A single category, active or not, own or global. |
POST /event-categories | Creates a category. Only name is required. Always creates one of your own — there is no way to create a global category through this endpoint. |
PUT /event-categories/{id} | Partial update. 404 for a global id. |
POST /event-categories/{id}/deactivate | Idempotent. Blocked (400) for a global category, or one with at least one calendar event currently using it. |
POST /event-categories/{id}/activate | Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /event-categories | Listado paginado. Filtros: search (nombre), includeInactive. Incluye tanto sus propias categorías como las globales que usa la plataforma para reflejar vencimientos de otros dominios. |
GET /event-categories/{id} | Una categoría, activa o no, propia o global. |
POST /event-categories | Crea una categoría. Solo name es obligatorio. Siempre crea una propia — no hay forma de crear una global con este endpoint. |
PUT /event-categories/{id} | Actualización parcial. 404 para un id global. |
POST /event-categories/{id}/deactivate | Idempotente. Bloqueado (400) para una categoría global, o una con al menos un evento de agenda que la use actualmente. |
POST /event-categories/{id}/activate | Idempotente. |
Validation rulesReglas de validación
nameis required and must be unique among your account's categories (including the global ones), active or not.coloris optional. When a calendar event that uses this category does not send its owncolor, it takes this category's instead.isGlobal,hasAssociatedEventsandactiveare read-only.
namees obligatorio y debe ser único entre las categorías de su cuenta (incluidas las globales), activa o no.colores opcional. Cuando un evento de agenda que usa esta categoría no manda su propiocolor, toma el de esta categoría.isGlobal,hasAssociatedEventsyactiveson de solo lectura.
Calendar eventsEventos de agenda
Manually-created calendar events — the web application's "Agregar Evento" button. The
web's agenda screen is a read-only aggregator of 7 heterogeneous sources (batches, tasks, cookings,
plannings, recurring maintenances, and this entity's own rows) flattened only to paint a calendar
widget; this resource is deliberately narrower than that screen. An event reflecting a purchase,
check, cash register or bank account due date, or a maintenance's recurring template, is entirely
out of scope here — neither read nor write — because those already belong (or will belong) to
their own resource. Recurring event templates are /calendar-events/recurring, below.
Eventos de agenda creados a mano — el botón "Agregar Evento" de la
aplicación web. La pantalla de agenda web es un agregador de solo lectura de 7 fuentes
heterogéneas (lotes, tareas, cocciones, planificaciones, mantenimientos reiterativos y las
filas propias de esta entidad) aplanadas solo para pintar un widget de calendario; este recurso es
deliberadamente más angosto que esa pantalla. Un evento que refleja un vencimiento de
compra, cheque, caja o cuenta bancaria, o la plantilla reiterativa de un mantenimiento, queda
completamente fuera de este recurso — ni lectura ni escritura — porque esos ya
pertenecen (o van a pertenecer) a su propio recurso. Las plantillas reiterativas son
/calendar-events/recurring, más abajo.
| Endpoint | What it does |
|---|---|
GET /calendar-events | Paginated list. Filters: from/to (yyyy-MM-dd, inclusive), categoryId, search (description), includeInactive. |
GET /calendar-events/{id} | A single event, active or not. |
POST /calendar-events | Creates an event. categoryId and eventDate are required. |
PUT /calendar-events/{id} | Partial update. |
POST /calendar-events/{id}/deactivate | Idempotent. Blocked (400) once another domain has applied (paid/collected against) this event. |
POST /calendar-events/{id}/activate | Idempotent. |
| Endpoint | Qué hace |
|---|---|
GET /calendar-events | Listado paginado. Filtros: from/to (yyyy-MM-dd, inclusive), categoryId, search (descripción), includeInactive. |
GET /calendar-events/{id} | Un evento, activo o no. |
POST /calendar-events | Crea un evento. categoryId y eventDate son obligatorios. |
PUT /calendar-events/{id} | Actualización parcial. |
POST /calendar-events/{id}/deactivate | Idempotente. Bloqueado (400) una vez que otro dominio aplicó (pagó/cobró contra) este evento. |
POST /calendar-events/{id}/activate | Idempotente. |
Validation rulesReglas de validación
categoryIdis required and must be an active id from /event-categories, own or global.eventDateis required, date only (no time),yyyy-MM-dd.descriptionis optional, up to 200 characters if present.coloris optional. When not sent on create, the event takes its category's color instead. This resource always returns the value actually stored — it does not reproduce the two hardcoded color overrides the calendar widget paints for a paid Vencimiento/Entrega event, that is UI-only rendering.appliedis read-only: other domains set it when they pay/collect against an event, which never happens for one created through this resource (nothing outside this resource links to it).
categoryIdes obligatorio y debe ser un id activo de /event-categories, propio o global.eventDatees obligatoria, solo fecha (sin hora),yyyy-MM-dd.descriptiones opcional, hasta 200 caracteres si se manda.colores opcional. Cuando no se manda al crear, el evento toma el color de su categoría. Este recurso siempre devuelve el valor realmente almacenado — no reproduce los dos overrides de color hardcodeados que pinta el widget de calendario para un evento Vencimiento/Entrega pagado, eso es renderizado de UI, no dato almacenado.appliedes de solo lectura: otros dominios lo setean al pagar/cobrar contra un evento, algo que nunca pasa para uno creado con este recurso (nada fuera de este recurso lo referencia).
Recurring templatesPlantillas reiterativas
Recurring calendar event templates, also scoped to "sueltas" — a template that
belongs to a maintenance is entirely out of scope here (neither read nor write), since it already
publishes its own recurrence through maintenances'
recurring/recurrenceEvery/recurrencePeriod fields.
Plantillas reiterativas de eventos de agenda, también acotadas a "sueltas"
— una plantilla que pertenece a un mantenimiento queda completamente fuera de este recurso
(ni lectura ni escritura), porque ya publica su propia recurrencia a través de los campos
recurring/recurrenceEvery/recurrencePeriod de
maintenances.
| Endpoint | What it does |
|---|---|
GET /calendar-events/recurring | Paginated list. Filters: search (title/description), includeInactive. |
GET /calendar-events/recurring/{id} | A single template, active or not. |
POST /calendar-events/recurring | Creates a template. eventDate, every and period are required. |
PUT /calendar-events/recurring/{id} | Partial update. |
POST /calendar-events/recurring/{id}/deactivate | Idempotent. No business rule blocks it — same as the web application. |
POST /calendar-events/recurring/{id}/activate | Idempotent. |
POST /calendar-events/recurring/{id}/exclude-date | Excludes one occurrence date (body: { "date": "yyyy-MM-dd" }). Idempotent. There is no endpoint to remove an already-excluded date — same as the web application. |
| Endpoint | Qué hace |
|---|---|
GET /calendar-events/recurring | Listado paginado. Filtros: search (título/descripción), includeInactive. |
GET /calendar-events/recurring/{id} | Una plantilla, activa o no. |
POST /calendar-events/recurring | Crea una plantilla. eventDate, every y period son obligatorios. |
PUT /calendar-events/recurring/{id} | Actualización parcial. |
POST /calendar-events/recurring/{id}/deactivate | Idempotente. Ninguna regla de negocio lo bloquea — igual que la aplicación web. |
POST /calendar-events/recurring/{id}/activate | Idempotente. |
POST /calendar-events/recurring/{id}/exclude-date | Excluye una fecha de ocurrencia (body: { "date": "yyyy-MM-dd" }). Idempotente. No hay endpoint para quitar una fecha ya excluida — igual que la aplicación web. |
Validation rulesReglas de validación
eventDateis required, date only (no time),yyyy-MM-dd— date of the first occurrence.everyis required and must be greater than 0.periodis required and must be one of:days,months,years.title,descriptionandcolorare optional, no length limit enforced here — the web application has none either.excludedDatesandactiveare read-only.
eventDatees obligatoria, solo fecha (sin hora),yyyy-MM-dd— fecha de la primera ocurrencia.everyes obligatorio y debe ser mayor a 0.periodes obligatorio y debe ser uno de:days,months,years.title,descriptionycolorson opcionales, sin límite de longitud exigido acá — la aplicación web tampoco lo tiene.excludedDatesyactiveson de solo lectura.
NotificationsNotificaciones
Notifications visible to your account: platform-wide announcements, account-wide ones, and ones aimed at your own integration user specifically. Read-only in this version — the web application lets any logged-in user create a notification with no authorization check at all (no module, nothing forcing who it targets), a pre-existing authorization gap that is not multiplied towards external integrators without a product decision first.
Notificaciones visibles para su cuenta: anuncios de toda la plataforma, de toda la cuenta, y dirigidas puntualmente a su usuario de integración. Solo lectura en esta versión — la aplicación web permite que cualquier usuario logueado cree una notificación sin ningún chequeo de autorización (sin módulo, nada que fuerce a quién apunta), un hueco de autorización preexistente que no se multiplica hacia integradores externos sin una decisión de producto primero.
| Endpoint | What it does |
|---|---|
GET /notifications | Paginated list. Filter: includeInactive. Includes platform-wide notifications, ones for your whole account, and ones aimed at you specifically. |
| Endpoint | Qué hace |
|---|---|
GET /notifications | Listado paginado. Filtro: includeInactive. Incluye notificaciones de toda la plataforma, de toda su cuenta, y dirigidas puntualmente a usted. |
Validation rulesReglas de validación
scopeisglobal(every account on the platform),account(every user of your account) oruser(only you) — computed server-side, never a raw account or user id from someone else.- There is no "unread" concept: the web application tracks that on the client (it remembers the last id it saw), there is no column or table for it on the server — this resource cannot expose what does not exist.
scopeesglobal(toda la plataforma),account(toda su cuenta) ouser(solo usted) — calculado del lado del servidor, nunca un id crudo de otra cuenta o usuario.- No existe un concepto de "no leída": la aplicación web lo trackea del lado del cliente (recuerda el último id que vio), no hay columna ni tabla para eso en el servidor — este recurso no puede exponer algo que no existe.
LeadsLeads
Sales leads — prospective customers captured before they become a real
customer. This entity is still being built: the master
record, its point actions, comments, converting a lead to a customer and its own days-of-inactivity
setting are published so far. There is no generic PUT on the lead itself — the web
application has none either, only specific actions after creation, each its own endpoint below.
There is already a separate channel to create leads in bulk from ad platforms (Facebook/Meta Lead
Ads and similar): a legacy, account-apiKey-authenticated webhook, not this JWT-based
API — POST here is for one lead at a time instead.
Leads de venta — potenciales clientes capturados antes de convertirse en un
cliente real. Esta entidad todavía está en
construcción: por ahora se publicó el maestro, sus acciones puntuales, los
comentarios, la conversión a cliente y su propia configuración de días de
inactividad. No hay PUT genérico sobre el lead en sí — la
aplicación web tampoco lo tiene, solo acciones específicas después de crear un
lead, cada una su propio endpoint abajo. Ya existe un canal aparte para crear leads en lote desde
plataformas de publicidad (Facebook/Meta Lead Ads y similares): un webhook legado autenticado con
apiKey de cuenta, no esta API basada en JWT — el POST de
acá es para un lead a la vez.
| Endpoint | What it does |
|---|---|
GET /leads | Paginated list. Filters: status (active/inactive/converted), salesRepId. |
GET /leads/{id} | A single lead. |
POST /leads | Creates a lead. At least one of name, phone or email is required. |
POST /leads/{id}/assign-sales-rep | Assigns (or, with an empty body, unassigns) the sales rep handling the lead. |
POST /leads/{id}/set-inactive | Sets or clears the manual-inactive flag. { "inactive": true|false }. |
POST /leads/{id}/next-contact | Schedules the next follow-up date, or clears it with an empty body. { "date": "yyyy-MM-dd" }. |
POST /leads/{id}/register-contact | Registers that a sales rep contacted the lead. { "date": "yyyy-MM-dd" }, omit for now. |
GET /leads/{id}/comments | Paginated list of comments logged against the lead, newest first. |
POST /leads/{id}/comments | Logs a comment. { "text": "..." }, required. Also updates lastContactedAt to now. |
POST /leads/{id}/convert | Converts the lead into a customer. { "customerTypeId": ..., "categoryId": ... }, both optional. Fails with 400 if already converted. |
GET /leads/settings | Your (the integration user's own) inactivity threshold in days. |
PUT /leads/settings | Sets it. { "inactiveAfterDays": 0..3650 }, required. |
| Endpoint | Qué hace |
|---|---|
GET /leads | Listado paginado. Filtros: status (active/inactive/converted), salesRepId. |
GET /leads/{id} | Un lead. |
POST /leads | Crea un lead. Al menos uno de name, phone o email es obligatorio. |
POST /leads/{id}/assign-sales-rep | Asigna (o, con un body vacío, desasigna) el vendedor a cargo del lead. |
POST /leads/{id}/set-inactive | Marca o quita la bandera manual de inactivo. { "inactive": true|false }. |
POST /leads/{id}/next-contact | Agenda el próximo contacto, o lo borra con un body vacío. { "date": "yyyy-MM-dd" }. |
POST /leads/{id}/register-contact | Registra que un vendedor contactó al lead. { "date": "yyyy-MM-dd" }, omítalo para usar ahora. |
GET /leads/{id}/comments | Listado paginado de comentarios del lead, más recientes primero. |
POST /leads/{id}/comments | Registra un comentario. { "text": "..." }, obligatorio. También actualiza lastContactedAt a ahora. |
POST /leads/{id}/convert | Convierte el lead en cliente. { "customerTypeId": ..., "categoryId": ... }, ambos opcionales. Falla con 400 si ya estaba convertido. |
GET /leads/settings | Su propio umbral de inactividad en días (por usuario, no por cuenta). |
PUT /leads/settings | Lo establece. { "inactiveAfterDays": 0..3650 }, obligatorio. |
Validation rulesReglas de validación
- At least one of
name,phoneoremailis required on create. sourcedefaults to"Manual"when omitted on create.salesRepId(on create and on/assign-sales-rep) must be an id from/sales-reps, the same catalogcustomersuses for the same field.isInactiveis computed: true when the lead is not converted and eitherinactiveManualis set or too many days passed since the last contact (your own threshold, per integration user — seeGET/PUT /leads/settings).contactedAt,lastContactedAt,nextContactAt,inactiveManual,isInactive,daysSinceLastContact,lastNote,customerId,convertedAtandactiveare all read-only throughPOST /leads— each changes only through its own action above (or not at all yet, forcustomerId/convertedAt).textis required and non-empty onPOST /leads/{id}/comments.customerTypeIdandcategoryId(on/convert) must be ids from/customer-typesand/customer-categoriesrespectively — the same catalogscustomersitself uses. A lead already converted cannot be converted again (400).inactiveAfterDays(onPUT /leads/settings) is required and must be between 0 and 3650.
- Al menos uno de
name,phoneoemailes obligatorio al crear. sourcetoma"Manual"por defecto si no se manda al crear.salesRepId(al crear y en/assign-sales-rep) debe ser un id de/sales-reps, el mismo catálogo que usacustomerspara el mismo campo.isInactivees calculado: verdadero cuando el lead no está convertido y o bieninactiveManualestá marcado o pasaron demasiados días desde el último contacto (su propio umbral, por usuario de integración — verGET/PUT /leads/settings).contactedAt,lastContactedAt,nextContactAt,inactiveManual,isInactive,daysSinceLastContact,lastNote,customerId,convertedAtyactiveson todos de solo lectura víaPOST /leads— cada uno cambia solo con su propia acción de arriba (o todavía no cambia, paracustomerId/convertedAt).textes obligatorio y no vacío enPOST /leads/{id}/comments.customerTypeIdycategoryId(en/convert) deben ser ids de/customer-typesy/customer-categoriesrespectivamente — los mismos catálogos que usacustomers. Un lead ya convertido no puede volver a convertirse (400).inactiveAfterDays(enPUT /leads/settings) es obligatorio y debe estar entre 0 y 3650.
AuditAuditoría
The change log of your account — who changed what type of record, and when.
Metadata only for now: the actual before/after values of each change
(previousJson/newJson) are not published yet — the underlying log is
transversal to the whole application and stores an unfiltered snapshot of whatever entity
changed, including fields this API deliberately hides elsewhere (e.g. a user's password hash).
Publishing that raw diff needs a separate decision first.
El registro de cambios de su cuenta — quién cambió qué
tipo de registro, y cuándo. Solo metadatos por ahora: los valores
concretos de antes/después de cada cambio (previousJson/newJson)
todavía no están publicados — el registro subyacente es transversal a toda la
aplicación y guarda una foto sin filtrar de cualquier entidad que haya cambiado, incluidos
campos que esta API ya oculta deliberadamente en otro lado (por ejemplo, el hash de contraseña
de un usuario). Publicar ese diff crudo necesita antes una decisión aparte.
| Endpoint | What it does |
|---|---|
GET /audit | Paginated list. dateFrom/dateTo required (ISO 8601, at most 365 days apart). Filters: entityType (e.g. Cliente), userId. |
| Endpoint | Qué hace |
|---|---|
GET /audit | Listado paginado. dateFrom/dateTo obligatorios (ISO 8601, a lo sumo 365 días de diferencia). Filtros: entityType (p.ej. Cliente), userId. |
Validation rulesReglas de validación
dateFromanddateToare both required;dateFrommust not be afterdateTo, and the range between them must not exceed 365 days.entityTypeis the internal name of an entity type (e.g.Cliente,Producto) — free text, not a catalog: it is not a foreign key reference.
dateFromydateToson ambos obligatorios;dateFromno puede ser posterior adateTo, y el rango entre ambos no puede superar los 365 días.entityTypees el nombre interno de un tipo de entidad (p.ej.Cliente,Producto) — texto libre, no un catálogo: no es una referencia a otro recurso.
FilesArchivos
File attachments — upload a file and tag it against any entity type/id of your
own. This entity is still being built: upload, read and delete are published so
far — making a file publicly downloadable (bypassing your account entirely) is not, yet, pending a
security decision. No module gates this — same as the web application itself, which requires
nothing beyond being logged in. entityType/entityId are free text, not a
foreign key: this API never validates that the referenced record exists or belongs to your
account — reading, downloading and deleting a file are all scoped to your account regardless of
what you tagged it with.
Archivos adjuntos — suba un archivo y etíquetelo contra cualquier tipo
de entidad/id propio. Esta entidad todavía está en construcción:
por ahora se publicó subir, leer y eliminar — hacer un archivo público (sin
ningún control de cuenta) todavía no, pendiente de una decisión de seguridad.
Ningún módulo gatea esto — igual que la aplicación web, que no pide
nada más que estar logueado. entityType/entityId son texto libre,
no una referencia a otro recurso: esta API nunca valida que el registro referido exista o le
pertenezca — leer, descargar y eliminar un archivo quedan siempre acotados a su cuenta sin
importar con qué los haya etiquetado.
| Endpoint | What it does |
|---|---|
POST /files | Uploads a file. Multipart form: file required, entityType/entityId/fileType/description optional. Max 20 MB. |
GET /files/{id} | A file's metadata. |
GET /files/{id}/content | The file's raw content, with its original content type and name. |
POST /files/{id}/deactivate | Deletes the file. Irreversible — the content is removed from storage, there is no /activate. |
| Endpoint | Qué hace |
|---|---|
POST /files | Sube un archivo. Form multipart: file obligatorio, entityType/entityId/fileType/description opcionales. Máximo 20 MB. |
GET /files/{id} | Metadatos de un archivo. |
GET /files/{id}/content | El contenido crudo del archivo, con su content type y nombre originales. |
POST /files/{id}/deactivate | Elimina el archivo. Irreversible — el contenido se borra del storage, no hay /activate. |
Validation rulesReglas de validación
fileis required onPOST /filesand must not be empty. Max size: 20 MB.entityType/entityId/fileType/descriptionare all free text — no catalog, no foreign key check.
filees obligatorio enPOST /filesy no puede estar vacío. Tamaño máximo: 20 MB.entityType/entityId/fileType/descriptionson todos texto libre — sin catálogo, sin chequeo de referencia.
InvitationsInvitaciones
Invitations for a customer to access their own portal account. Accepting an
invitation is not published — the customer clicks an emailed link, sees a web page and
sets their own password; there is no reasonable way to expose that anonymous, browser-only flow
through a server-to-server JWT. POST here sends the real email. The API does not
enforce the invitation limit: sending more invitations than limit is not blocked.
GET /invitations/quota reports the count for informational purposes.
Invitaciones para que un cliente acceda a su propia cuenta de portal.
Aceptar una invitación no está publicado — el cliente hace
click en un link emailado, ve una página web y define su propia contraseña; no hay
forma razonable de exponer ese flujo anónimo de navegador a través de un JWT
servidor a servidor. El POST de acá envía el email real. La API no
aplica el límite de invitaciones: enviar más invitaciones que limit no se
bloquea. GET /invitations/quota informa el conteo a título informativo.
| Endpoint | What it does |
|---|---|
POST /invitations | Invites a customer to their portal account. customerId/email required, franchise/canViewStock optional. |
GET /invitations/quota | How many invitations your account has sent, and its configured limit. Informational only. |
| Endpoint | Qué hace |
|---|---|
POST /invitations | Invita a un cliente a su cuenta de portal. customerId/email obligatorios, franchise/canViewStock opcionales. |
GET /invitations/quota | Cuántas invitaciones envió su cuenta, y su límite configurado. Solo informativo. |
Validation rulesReglas de validación
customerIdandemailare both required onPOST /invitations.customerIdmust be an id from/customers.emailis rejected (400) if it is already associated with managing a different customer, or if this customer already had a linked account that was deactivated (it must be reactivated instead of re-invited — not published through this API).
customerIdyemailson ambos obligatorios enPOST /invitations.customerIddebe ser un id de/customers.emailse rechaza (400) si ya está asociado a gestionar otro cliente, o si este cliente ya tuvo una cuenta vinculada que fue dada de baja (debe reactivarse en vez de volver a invitar — no publicado por esta API).
External usersUsuarios externos
Customers' links to their own portal accounts in your account. This is the
per-account link (UsuarioExternoCliente), not the customer's global login identity:
the login's own credentials (password, reset token) are a separate concept this API never
exposes. Creating a link happens only through /invitations
— the customer must accept it first, an anonymous browser-only flow not published here either. No
module gates this — same as the web application itself, which requires the Duenio
role for everything except reactivating (Administracion).
Vínculos de clientes a su propia cuenta de portal en su cuenta. Este es el
vínculo por cuenta (UsuarioExternoCliente), no la identidad global de login del
cliente: las credenciales del login (contraseña, token de reset) son un concepto aparte que
esta API nunca expone. Crear un vínculo sucede sólo a través de
/invitations — el cliente debe aceptarla primero,
otro flujo anónimo de navegador tampoco publicado acá. Ningún módulo
gatea esto — igual que la aplicación web, que pide el rol Duenio para
todo salvo reactivar (Administracion).
| Endpoint | What it does |
|---|---|
GET /external-users | Paginated list. includeInactive optional, defaults to false. |
GET /external-users/{id} | A single external user link. |
PUT /external-users/{id} | Partial update of the 7 permission flags, absolute values (never a toggle — a retried request never inverts a flag twice). customerId, email and active are read-only here. |
POST /external-users/{id}/deactivate | Deactivates the link. Idempotent. |
POST /external-users/{id}/activate | Reactivates the link. Idempotent. Fails with 400 if another active link already exists for the same login. Requires Administracion, not Duenio. |
| Endpoint | Qué hace |
|---|---|
GET /external-users | Listado paginado. includeInactive opcional, por defecto false. |
GET /external-users/{id} | Un vínculo de usuario externo. |
PUT /external-users/{id} | Actualización parcial de los 7 flags de permiso, con valores absolutos (nunca un toggle — un reintento nunca invierte un flag dos veces). customerId, email y active son de solo lectura acá. |
POST /external-users/{id}/deactivate | Desactiva el vínculo. Idempotente. |
POST /external-users/{id}/activate | Reactiva el vínculo. Idempotente. Falla con 400 si ya existe otro vínculo activo para el mismo login. Requiere Administracion, no Duenio. |
Portal productsProductos del portal
Which of your products are published to the customer portal, and in which
presentations. Despite the resource name, this is configuration per account, not per
external user: what you set here applies to every customer who logs in to your portal. Do
not confuse it with /external-users, which is the
per-customer link and its permission flags. The only customer-specific dimension is
enabledForCategoryList, which applies price list 3 only to customers in the category
configured for your account.
Qué productos suyos están publicados en el portal de clientes, y en
qué presentaciones. A pesar del nombre del recurso, esto es configuración por
cuenta, no por usuario externo: lo que configure acá aplica a todos los clientes que
entren a su portal. No lo confunda con
/external-users, que es el vínculo por cliente y sus
flags de permiso. La única dimensión por cliente es
enabledForCategoryList, que aplica la lista de precios 3 sólo a los clientes de
la categoría configurada en su cuenta.
Each product carries a presentations collection with one entry per way it
is sold: the product itself (kind: "product", the only one mix packs and complementary
products have), each keg volume (keg, see
/keg-volumes), each container (container, see
/containers) and each case (case, see
/cases). A presentation is published when it has a price list assigned, which
is what enabled reports — the price list ids themselves are not part of this
contract: they come from your account's configuration, so every row stays consistent with every
other.
Cada producto trae una colección presentations con una entrada por
cada forma en que se vende: el producto en sí (kind: "product", la
única que tienen los mixpacks y los complementarios), cada litraje de barril
(keg, ver /keg-volumes), cada envase (container, ver
/containers) y cada caja (case, ver
/cases). Una presentación está publicada cuando tiene lista de
precios asignada, que es lo que informa enabled — los ids de lista no son parte
de este contrato: salen de la configuración de su cuenta, así que todas las filas
quedan consistentes entre sí.
The whole resource is gated by the account setting that enables portal product assignment. With it off, every action here answers 404: for that account the resource simply does not exist, and a 403 would suggest the integration user is missing a permission instead.
In the history, previousValue and newValue are
human-readable text, in the language of whoever made the change — they are what the web screen
shows, stored as text when the change happened. Do not parse them: read the
current state from the resource itself. Minimum purchase quantities and stock checks are not
logged; neither are they in the web application.
portalStock is the stock available to portal customers for a
presentation, and comes back in every GET of this resource. A null means
it has never been set, which is not the same as having been set to zero. Only stock checks are
published — the increases and decreases that portal orders produce are written by the ordering
flow, which this API does not expose.
On the presentations endpoint, send only the entries you want to change
— the ones you leave out keep their values. This is the one collection in this API that is not
replaced whole, and the reason is that you cannot create or delete a presentation: the set is fixed
by the product itself, so "leave it out" and "delete it" could never be the same request. An entry
with none of the three keys is the product-level presentation, and there you may only set
minimumPurchaseQuantity: publishing it is what
PUT /external-user-products/{productId} does, because in the web application that
switch always cascades.
Todo el recurso está gateado por la configuración de cuenta que habilita la asignación de productos al portal. Con esa configuración apagada, todas las acciones responden 404: para esa cuenta el recurso simplemente no existe, y un 403 sugeriría que al usuario de integración le falta un permiso.
En el historial, previousValue y newValue son texto para
leer, en el idioma de quien hizo el cambio: es lo que muestra la pantalla web, guardado como texto
en el momento del cambio. No los parsee: el estado actual se lee del propio
recurso. Los mínimos de compra y los controles de stock no se registran en el historial;
tampoco lo hace la aplicación web.
portalStock es el stock disponible en el portal para una
presentación, y viene en todos los GET de este recurso. Un null
significa que nunca se fijó, que no es lo mismo que haberlo fijado en cero. Sólo se
publican los controles de stock: los ingresos y egresos que generan los pedidos del portal los
escribe el flujo de pedidos, que esta API no expone.
En el endpoint de presentaciones, mande sólo las entradas que quiera
cambiar: las que deje afuera conservan sus valores. Es la única colección de
esta API que no se reemplaza entera, y el motivo es que una presentación no se puede crear ni
borrar: el conjunto lo fija el propio producto, así que "no mandarla" y "borrarla" nunca
podrían ser el mismo request. Una entrada sin ninguna de las tres claves es la
presentación del producto, y ahí sólo puede fijar
minimumPurchaseQuantity: publicarla es lo que hace
PUT /external-user-products/{productId}, porque en la aplicación web ese
interruptor siempre cascadea.
| Endpoint | What it does |
|---|---|
GET /external-user-products | Paginated list of your products with their presentations. onlyEnabled optional, defaults to false (all of them). |
GET /external-user-products/{productId} | One product's portal configuration. 404 if the product does not exist in your account or cannot be published to the portal. |
PUT /external-user-products/{productId} | Publishes or unpublishes the whole product, with enabled and enabledForCategoryList. Partial update: a flag you do not send keeps its value. Cascades to every presentation of the product. 400 if your account has no portal price list configured, because enabling would then do nothing. |
PUT /external-user-products/{productId}/presentations | Changes individual presentations without touching the rest: enabled, enabledForCategoryList and minimumPurchaseQuantity per entry. Send only the ones you want to change. Identify each by exactly one of litres, containerId or caseId. |
POST /external-user-products/{productId}/stock | Records a stock check: sets portalStock to an absolute value for each presentation you send. Read the current values from any GET of this resource. Needs portal stock enabled for your account, otherwise 404. |
GET /external-user-products/history | Paginated log of who published or unpublished what, most recent first. Optional productId and userId filters. |
GET /external-user-products/price-lists | Which price lists the portal publishes against: priceListId1, priceListId2, priceListId3 and restrictedToCustomerCategoryId. Read-only — see the rules below. |
| Endpoint | Qué hace |
|---|---|
GET /external-user-products | Listado paginado de sus productos con sus presentaciones. onlyEnabled opcional, por defecto false (todos). |
GET /external-user-products/{productId} | La configuración de portal de un producto. 404 si el producto no existe en su cuenta o no es publicable en el portal. |
PUT /external-user-products/{productId} | Publica o despublica el producto entero, con enabled y enabledForCategoryList. Actualización parcial: un flag que no mande conserva su valor. Cascadea a todas las presentaciones del producto. 400 si su cuenta no tiene lista de precios de portal configurada, porque publicar no haría nada. |
PUT /external-user-products/{productId}/presentations | Cambia presentaciones sueltas sin tocar el resto: enabled, enabledForCategoryList y minimumPurchaseQuantity por entrada. Mande sólo las que quiera cambiar. Identifique cada una por exactamente uno de litres, containerId o caseId. |
POST /external-user-products/{productId}/stock | Registra un control de stock: fija portalStock a un valor absoluto para cada presentación que mande. Los valores actuales se leen de cualquier GET de este recurso. Necesita el stock de portal habilitado en su cuenta; si no, 404. |
GET /external-user-products/history | Log paginado de quién publicó o despublicó qué, lo más reciente primero. Filtros opcionales productId y userId. |
GET /external-user-products/price-lists | Contra qué listas de precio publica el portal: priceListId1, priceListId2, priceListId3 y restrictedToCustomerCategoryId. Solo lectura — ver las reglas más abajo. |
Validation rulesReglas de validación
/price-listsis READ-ONLY. Changing which lists the portal uses is a web-only operation on purpose: the action that changes them does not only write those four settings, it also rewrites — in one pass, with no preview and no way back — the price list assigned to every product already published on the portal. Enabling and disabling products and presentations one by one is published instead, and covers the common case.- A null id means that slot is not configured. A slot is never reported as
0, which would be indistinguishable from a real list id.
/price-listses de SOLO LECTURA. Cambiar contra qué listas publica el portal es una operación solo de la web, a propósito: la acción que las cambia no escribe solo esas cuatro claves, también reescribe —de una, sin vista previa y sin vuelta atrás— la lista de precio asignada a todos los productos ya publicados en el portal. En su lugar está publicado prender y apagar productos y presentaciones de a uno, que cubre el caso común.- Un id en null significa que ese lugar no está configurado. Nunca se informa
0, que no se distinguiría de un id de lista real.
Distributor purchasesCompras de distribuidora
What a distributor receives from a supplier: kegs, containers, cases and mix packs,
with the stock movements and the supplier's current account entry the purchase produced. Do not
confuse it with /purchases, the general purchase of supplies,
nor with /keg-purchase-orders, the order placed
before the goods arrive — a purchase here may fulfil one, and then carries its
kegPurchaseOrderId.
Lo que una distribuidora recibe de un proveedor: barriles, envases, cajas y mixpacks,
con los movimientos de stock y el asiento en la cuenta corriente del proveedor que la compra
generó. No lo confunda con /purchases, la compra
general de insumos, ni con
/keg-purchase-orders, la orden que se emite
antes de que llegue la mercadería — una compra de acá puede cumplir una,
y entonces lleva su kegPurchaseOrderId.
Each purchase carries a lines collection, one entry per item bought.
kind says what it was — keg, container, case or
mixPack — following the same vocabulary the rest of this API uses for a product's
presentations. Only a keg line carries code and supplierCode:
those identify one physical keg, which is why a purchase of kegs has one line per keg instead of a
single line with a quantity.
Cada compra trae una colección lines, una entrada por cosa
comprada. kind dice qué fue — keg, container,
case o mixPack —, con el mismo vocabulario que el resto de esta API
usa para las presentaciones de un producto. Sólo una línea keg trae
code y supplierCode: identifican un barril físico, y por eso una
compra de barriles tiene una línea por barril en vez de una sola con cantidad.
When you record a purchase, a keg is rejected if it is already registered to a
different supplier, if it is currently at a customer — return it first — or if it is already in
stock with a product. The web application checks these while you type; here they run inside the
call, so a purchase is either recorded whole or not at all. Voiding has its own two guards: a
purchase cannot be voided while one of its kegs is at a customer, nor when the container, case or
mix pack stock it created has already been used. Importing purchases from a spreadsheet stays out
of v1 on purpose — it is a browser flow (upload, preview the errors in a grid, confirm) and the
POST covers the same server-to-server need. Every amount is in the purchase's own
currencyId; this API never converts currencies.
Al registrar una compra, un barril se rechaza si ya está registrado para otro
proveedor, si está en poder de un cliente —hay que devolverlo primero— o si ya
está en stock con un producto. La aplicación web chequea esto mientras usted tipea;
acá corre dentro de la llamada, así que una compra se registra entera o no se registra.
La anulación tiene sus propias dos guardas: no se puede anular una compra mientras uno de sus
barriles esté en un cliente, ni cuando el stock de envases, cajas o mixpacks que generó
ya fue utilizado. El alta por planilla queda fuera de v1 a propósito — es un flujo de
navegador (subir el archivo, previsualizar los errores en una grilla, confirmar) y el
POST cubre la misma necesidad server-to-server. Todos los importes están en el
currencyId de la propia compra; esta API nunca convierte monedas.
| Endpoint | What it does |
|---|---|
GET /distributor-purchases | Paged listing, most recent first, with the lines of each purchase. includeInactive optional, defaults to false. |
GET /distributor-purchases/{purchaseId} | One purchase with its lines. A cancelled purchase is still readable; its active is false. |
POST /distributor-purchases | Records a purchase. Answers 201. This moves stock: in one transaction it brings the goods into warehouseId, posts the total to the supplier's current account and advances the keg purchase order you referenced. |
POST /distributor-purchases/{purchaseId}/cancel | Voids the purchase, reversing everything it created and giving the delivered quantities back to the keg purchase order. Idempotent. The record is never deleted. |
| Endpoint | Qué hace |
|---|---|
GET /distributor-purchases | Listado paginado, del más reciente al más viejo, con las líneas de cada compra. includeInactive opcional, por defecto false. |
GET /distributor-purchases/{purchaseId} | Una compra con sus líneas. Una compra anulada se sigue pudiendo leer; su active es false. |
POST /distributor-purchases | Registra una compra. Responde 201. Mueve stock: en una sola transacción ingresa la mercadería a warehouseId, asienta el total en la cuenta corriente del proveedor y avanza la orden de compra de barriles que haya referenciado. |
POST /distributor-purchases/{purchaseId}/cancel | Anula la compra, revirtiendo todo lo que generó y devolviéndole las cantidades entregadas a la orden de compra. Idempotente. El registro nunca se borra. |
Distributor servicesServicios de distribuidora
What a distributor does on a supplier's behalf, and how it gets paid for it. A service
is a name plus a set of tiers: from this many litres a month onwards, the
distributor is paid this much per litre and this much commission on what it collected. The
settlement picks the highest tier whose litresPerMonth is at or below what was actually
moved in the period, prorated to 30 days.
Lo que hace una distribuidora por cuenta de un proveedor, y cómo se le paga.
Un servicio es un nombre más un conjunto de niveles: a partir de tantos
litros por mes, se le paga tanto por litro y tanta comisión sobre lo que cobró. La
liquidación elige el nivel más alto cuyo litresPerMonth no supere lo que
efectivamente se movió en el período, prorrateado a 30 días.
Every action here needs the Duenio role on top of the Distributor
module. That is the web application's own gate: its service screens refuse outright to a
user who is not the owner. Ask whoever administers your account to grant that role to the
integration user, or these endpoints answer 403.
Todas las acciones de acá necesitan el rol Duenio
además del módulo Distribuidora. Es el gate de la propia aplicación
web: sus pantallas de servicios se niegan directamente a un usuario que no sea el dueño.
Pedí a quien administre su cuenta que le dé ese rol al usuario de integración, o
estos endpoints responden 403.
Assignments belong to a supplier, which is why they hang off
/assignments/{supplierId} and why the supplier is not a field of each entry. The
collection is replaced whole: anything you leave out is deactivated, and an empty array clears them
all. An entry you send with an id is kept exactly as it is — its
customer and service are not updated. To change an assignment, leave the old one out and send a new
entry without an id. That is how the web screen works, and this API does not paper over
it: an update that silently did nothing would be worse than a rule you can read.
Las asignaciones son de un proveedor, por eso cuelgan de
/assignments/{supplierId} y por eso el proveedor no es un campo de cada entrada. La
colección se reemplaza entera: lo que deje afuera se da de baja, y un arreglo vacío las
borra todas. Una entrada que mande con id se conserva tal cual —
su cliente y su servicio no se actualizan. Para cambiar una asignación, deje afuera la vieja y
mande una nueva sin id. Así funciona la pantalla web, y esta API no lo disimula:
una actualización que en silencio no hiciera nada sería peor que una regla que se pueda
leer.
Settlements are read-only here. A run settles every supplier at
once — it issues a delivery note and books a debt in each supplier's current account — so running
one, and undoing one, are not published. What you can read is what was settled: the runs, and each
run broken down supplier by supplier. description is human-readable text written when
the run happened, in the language of whoever ran it; do not parse it.
Las liquidaciones acá son de solo lectura. Una corrida liquida
a todos los proveedores de una —emite un remito y asienta deuda en la cuenta corriente de cada
uno—, así que correr una, y deshacerla, no están publicados. Lo que sí se
puede leer es lo que se liquidó: las corridas, y cada corrida abierta proveedor por
proveedor. description es texto para leer, escrito en el momento de la corrida y en el
idioma de quien la corrió; no lo parsee.
There is no way to remove a service: the web application only creates and edits them, and a service is referenced by its assignments and by every settlement already issued.
No hay forma de eliminar un servicio: la aplicación web sólo los crea y los edita, y un servicio está referenciado por sus asignaciones y por cada liquidación ya emitida.
| Endpoint | What it does |
|---|---|
GET /distributor-services | Paged listing by name, with the tiers of each service. |
GET /distributor-services/{serviceId} | One service with its tiers. |
POST /distributor-services | Creates a service. Answers 201. name is required and unique within your account. |
PUT /distributor-services/{serviceId} | Partial update. levels absent leaves the tiers untouched; present replaces the whole collection — an entry with an id is updated, one without is created, one you leave out is deactivated. |
GET /distributor-services/assignments/{supplierId} | Which services this supplier's customers receive. |
PUT /distributor-services/assignments/{supplierId} | Replaces the supplier's whole set of assignments. An empty array clears them all. |
GET /distributor-services/settlements | Paged listing of settlement runs, most recent first. Each entry is a run's totals across every supplier, and its date identifies it. |
GET /distributor-services/settlements/{date} | Breaks one run down supplier by supplier. 404 if there was no run on that date. |
| Endpoint | Qué hace |
|---|---|
GET /distributor-services | Listado paginado por nombre, con los niveles de cada servicio. |
GET /distributor-services/{serviceId} | Un servicio con sus niveles. |
POST /distributor-services | Crea un servicio. Responde 201. name es obligatorio y único dentro de su cuenta. |
PUT /distributor-services/{serviceId} | Actualización parcial. levels ausente conserva los niveles; presente reemplaza toda la colección — una entrada con id se actualiza, una sin id se crea, y una que deje afuera se da de baja. |
GET /distributor-services/assignments/{supplierId} | Qué servicios reciben los clientes de ese proveedor. |
PUT /distributor-services/assignments/{supplierId} | Reemplaza todo el conjunto de asignaciones del proveedor. Un arreglo vacío las borra todas. |
GET /distributor-services/settlements | Listado paginado de corridas de liquidación, de la más reciente a la más vieja. Cada entrada son los totales de una corrida sobre todos los proveedores, y su date es lo que la identifica. |
GET /distributor-services/settlements/{date} | Abre una corrida proveedor por proveedor. 404 si no hubo corrida esa fecha. |
Payment ordersÓrdenes de pago
The voucher left behind by an outgoing payment. Read-only, and that is structural rather than a gap: a payment order is never created on its own. The application creates it inside the same database transaction that records the payment — either a cash register movement or a bank account movement. Recording that movement is what would create the order, and it is not available in this version. Printing the order is not available either: this API does not render documents.
El comprobante que queda de un pago realizado. Solo lectura, y no es un faltante sino algo estructural: una orden de pago nunca se crea sola. La aplicación la genera dentro de la misma transacción que registra el pago — sea un movimiento de caja o uno de cuenta bancaria. Registrar ese movimiento es lo que crearía la orden, y no está disponible en esta versión. Imprimir la orden tampoco: esta API no genera documentos.
| Endpoint | What it does |
|---|---|
GET /payment-orders | Paginated list, newest first. Filters: supplierId, from/to (ISO 8601, both optional). |
GET /payment-orders/{paymentOrderId} | A single payment order. |
| Endpoint | Qué hace |
|---|---|
GET /payment-orders | Listado paginado, de la más nueva a la más vieja. Filtros: supplierId, from/to (ISO 8601, los dos opcionales). |
GET /payment-orders/{paymentOrderId} | Una orden de pago. |
What you should know before using itLo que conviene saber antes de usarlo
amountis negative. The application stores an outgoing payment as a negative figure and this API reports the stored value rather than flipping it, so summing a period gives a negative total. Measured over the whole production database on 2026-09-21: 161,184 orders negative, 652 exactly zero, 11 positive.origintells you where the payment was recorded —cashRegisterorbankAccount— andoriginMovementIdis the id of that movement, which you can read through/cash-registers/{id}/movementsor/bank-accounts/{id}/movements.origincan benull. A small number of orders outlive the movement that produced it (about 110 across the whole production database). They are still listed, withoriginandoriginMovementIdnull, because hiding them would silently change your totals.supplierIdcan benull, and that is normal: roughly half of all orders are payments not recorded against a supplier account.descriptionis written by the application when the payment is recorded and is in Spanish, like the rows of a report. It is generated content, not a UI label.- There is no
/deactivateor/activate: nothing in the application deactivates a payment order — the movement is deactivated and the order stays.
amountviene negativo. La aplicación guarda un egreso como número negativo y esta API publica el valor guardado sin darlo vuelta, así que sumar un período da un total negativo. Medido sobre toda la base de producción el 2026-09-21: 161.184 órdenes negativas, 652 en cero y 11 positivas.origindice dónde se registró el pago —cashRegisterobankAccount— yoriginMovementIdes el id de ese movimiento, que puede leer por/cash-registers/{id}/movementso/bank-accounts/{id}/movements.originpuede venir ennull. Unas pocas órdenes sobreviven al movimiento que las generó (unas 110 en toda la base de producción). Se listan igual, conoriginyoriginMovementIdnulos, porque ocultarlas cambiaría sus totales en silencio.supplierIdpuede venir ennull, y es normal: alrededor de la mitad de las órdenes son pagos que no se registraron contra una cuenta de proveedor.descriptionla escribe la aplicación al registrar el pago y está en español, igual que las filas de un informe. Es contenido generado, no una etiqueta de interfaz.- No hay
/deactivateni/activate: nada en la aplicación desactiva una orden de pago — se desactiva el movimiento y la orden queda.
ReceiptsRecibos
Returnable packagingEnvases retornables
Which crate or bottle formats come back. This resource is the definition only: which container format is returnable, its brand and colour, and which supply backs its stock. Moving returnables around — assembling and breaking down crates — is not here: that lives in the bottling side of the application and stays out of this version, the same boundary that keeps mix-pack assembly out.
Creating one can create a supply. If your account has no supply
named after the container yet, the application provisions one, because without it there is no
returnable stock to count. Its id comes back as supplyId and is readable at
/supplies.
Qué formatos de cajón o botella vuelven. Este recurso es solo la definición: qué formato de envase es retornable, su marca y su color, y qué insumo respalda su stock. La circulación —armar y desarmar cajas retornables— no está acá: vive del lado de envasado y queda fuera de esta versión, el mismo límite que deja afuera el armado de mix-packs.
Crear una puede crear un insumo. Si su cuenta todavía no
tiene un insumo con el nombre del envase, la aplicación lo provisiona, porque sin él
no hay stock de retornables que contar. Su id vuelve como supplyId y se lee en
/supplies.
| Endpoint | What it does |
|---|---|
GET /returnable-packaging | Paged listing. search (name, brand, colour), includeInactive, page, pageSize. |
GET /returnable-packaging/{id} | One definition, active or not. |
POST /returnable-packaging | Creates a definition. name and containerId are required. Answers 201. May provision a supply. |
PUT /returnable-packaging/{id} | Partial update. supplyId and active are read-only. |
| Endpoint | Qué hace |
|---|---|
GET /returnable-packaging | Listado paginado. search (nombre, marca, color), includeInactive, page, pageSize. |
GET /returnable-packaging/{id} | Una definición, activa o no. |
POST /returnable-packaging | Crea una definición. name y containerId son obligatorios. Responde 201. Puede provisionar un insumo. |
PUT /returnable-packaging/{id} | Actualización parcial. supplyId y active son de solo lectura. |
Validation rulesReglas de validación
containerIdis the same field the rest of this API callscontainerId— the format catalog at /containers. It is not a separate "packaging" catalog.supplyIdis assigned on creation only. An update never reassigns the backing supply.activeis read-only: deactivating a definition stays a web-only operation in this version.
containerIdes el mismo campo que el resto de esta API llamacontainerId— el catálogo de formatos de /containers. No es un catálogo de "packaging" aparte.supplyIdse asigna solo al crear. Una actualización nunca reasigna el insumo de respaldo.activees de solo lectura: dar de baja una definición sigue siendo una operación solo de la web en esta versión.
CollectionsCobranzas
Money received from a customer, in one or more ways at once. Read-only in this version. A collection is not "a cash movement with another name": it is a composite operation that, in one transaction, issues a receipt with its own number, walks a list of payments against different destinations (a cash register, a bank account, a cheque), writes the customer's current account, and — when vouchers are sent — settles orders. That last part is out of scope, and recording the rest through this API is a separate decision that has not been taken.
Collections pending approval are listed. The web application's
own listing cannot show them, because it joins the receipt and a pending collection has none
yet; it uses a separate screen. Hiding them here would mean an integrator records a collection,
gets a 200, and then cannot find it.
Dinero recibido de un cliente, de una o varias formas a la vez. Solo lectura en esta versión. Una cobranza no es «un movimiento de caja con otro nombre»: es una operación compuesta que, en una sola transacción, emite un recibo con número propio, recorre una lista de cobros contra distintos destinos (una caja, una cuenta bancaria, un cheque), escribe la cuenta corriente del cliente y —cuando se mandan comprobantes— salda pedidos. Esa última parte está fuera de alcance, y registrar el resto por esta API es una decisión aparte que todavía no se tomó.
Las cobranzas pendientes de aprobación SÍ se listan.
El listado de la aplicación web no las puede mostrar, porque hace join con el recibo y una
cobranza pendiente todavía no tiene; usa una pantalla aparte. Esconderlas acá
significaría que un integrador registra una cobranza, recibe un 200 y
después no la encuentra.
| Endpoint | What it does |
|---|---|
GET /collections | Paged listing, most recent first. from, to (YYYY-MM-DD), customerId, approved, page, pageSize. Without the movements. |
GET /collections/{id} | One collection WITH the ids of the cash, bank and cheque movements it produced. |
POST /collections | Records money received from a customer, into one or more destinations at once. date, customerId, chartOfAccountId and at least one payments entry are required. Answers 201 with the collection and its movement ids. |
| Endpoint | Qué hace |
|---|---|
GET /collections | Listado paginado, más recientes primero. from, to (YYYY-MM-DD), customerId, approved, page, pageSize. Sin los movimientos. |
GET /collections/{id} | Una cobranza CON los ids de los movimientos de caja, banco y cheques que generó. |
POST /collections | Registra dinero recibido de un cliente, contra uno o varios destinos a la vez. date, customerId, chartOfAccountId y al menos un payments son obligatorios. Responde 201 con la cobranza y los ids de sus movimientos. |
Validation rulesReglas de validación
approvedandreceiptIdmove together: the receipt is issued when the collection is approved. Accounts that do not use the approval flow get both at once.- The movement ids come only from
GET /collections/{id}. A collection can pay into several destinations at once, so returning them in a page would multiply rows and the total would stop matching. orderIdcan be read withGET /orders/{id}(orders are read-only).- The serialised grid state the underlying record carries is not published: it is screen state, not a contract.
Recording a collectionRegistrar una cobranza
- Each entry of
paymentsneeds adestination:cash_register(withcashRegisterId) orbank_account(withbankAccountIdANDbankPaymentTypeId). The total of the collection is the sum of the amounts; it is not sent separately. bankPaymentTypeIdis required on a bank payment and not optional: the column it feeds has a foreign key, and leaving it out used to reach the database as a zero and fail there.- Sending
checkNumbercreates a cheque and links it to the collection. It then needsbankId,checkIssueDateandcheckDueDate. The cheque is readable afterwards atGET /checks. - All dates are ISO 8601 (
YYYY-MM-DD), including the cheque's. - All or nothing. If any payment is rejected — a closed cash register, a cheque without its bank — nothing is written, not even the receipt.
- It never settles orders, whatever you send. The customer's current account is credited; which orders that pays is not decided here. No electronic receipt, no withholdings, no credit notes either.
- Two destinations the web offers are NOT available here, and the reason is measured (collections since 2026-06-01): the main cash register, 9% of use, because the web shows it only to users holding a specific permission and the integration user holds every permission the API declares; and the pure current-account entry, 0.5%, because no money moves and the collection would come back with no movements at all. What is offered covers 90% of real use.
- Cada entrada de
paymentsnecesita undestination:cash_register(concashRegisterId) obank_account(conbankAccountIdYbankPaymentTypeId). El total de la cobranza es la suma de los importes; no se manda aparte. bankPaymentTypeIdes obligatorio en un cobro bancario y no opcional: la columna que alimenta tiene una clave foránea, y omitirlo llegaba a la base como un cero y rompía ahí.- Mandar
checkNumbercrea un cheque y lo liga a la cobranza. Entonces hacen faltabankId,checkIssueDateycheckDueDate. El cheque queda después enGET /checks. - Todas las fechas son ISO 8601 (
YYYY-MM-DD), también las del cheque. - Todo o nada. Si un cobro se rechaza —una caja cerrada, un cheque sin su banco— no se escribe nada, ni siquiera el recibo.
- Nunca salda pedidos, mande lo que mande. Se acredita la cuenta corriente del cliente; qué pedidos paga eso no se decide acá. Tampoco emite comprobante electrónico, ni toma retenciones, ni notas de crédito.
- Dos destinos que la web ofrece NO están acá, y el motivo está medido (cobranzas desde el 2026-06-01): la caja grande, 9% del uso, porque la web la muestra sólo a usuarios con un permiso puntual y el usuario de integración tiene todos los permisos que la API declara; y el asiento manual en cuenta corriente, 0,5%, porque no se mueve dinero a ningún lado y la cobranza volvería sin ningún movimiento. Lo que sí se ofrece cubre el 90% del uso real.
approvedyreceiptIdse mueven juntos: el recibo se emite cuando la cobranza se aprueba. Las cuentas que no usan el circuito de aprobación reciben los dos de una.- Los ids de los movimientos salen únicamente de
GET /collections/{id}. Una cobranza puede pagar contra varios destinos a la vez, así que devolverlos en una página multiplicaría filas y el total dejaría de coincidir. orderIdse puede leer conGET /orders/{id}(los pedidos son de solo lectura).- El estado serializado de la grilla que guarda el registro no se publica: es estado de pantalla, no un contrato.
OrdersPedidos
Sales orders, from the moment they are entered — before any delivery note exists. Built for dashboards that follow what each sales rep sold this week. Read-only. Creating, editing, approving, changing the status of, delivering and invoicing an order are done in the application: the API reads, it never writes an order.
Los pedidos de venta, desde que se cargan — antes de que exista un remito. Pensado para tableros que siguen lo que vendió cada vendedor en la semana. Solo lectura. Crear, editar, aprobar, cambiar de estado, entregar y facturar un pedido se hace desde la aplicación: la API lee, nunca escribe un pedido.
| Endpoint | What it does |
|---|---|
GET /orders | Paged listing, most recent first (order date, then id). Without the items. Rate limit cost 2. |
GET /orders/{id} | One order WITH its items, discounts and taxes. Cost 1. 404 if it is not in your account. |
GET /order-statuses | The statuses an order can be in. |
GET /reasons/order-discount | The discount reasons of an item. |
| Endpoint | Qué hace |
|---|---|
GET /orders | Listado paginado, más recientes primero (fecha del pedido, luego id). Sin los ítems. Costo 2. |
GET /orders/{id} | Un pedido CON sus ítems, bonificaciones e impuestos. Costo 1. 404 si no es de su cuenta. |
GET /order-statuses | Los estados en que puede estar un pedido. |
GET /reasons/order-discount | Los motivos de bonificación de un ítem. |
Filters of the listingFiltros del listado
| Parameter | Default | Behaviour |
|---|---|---|
from, to | no limit | Order date, YYYY-MM-DD or ISO 8601. to includes that whole day. from later than to answers 400 invalid_range |
customerId | — | Orders of one customer |
salesRepId | — | The sales rep recorded on the order, not the customer's current one |
statusId | — | A value of /order-statuses; anything else answers 400 invalid_reference |
includeQuotes | false | Quotes are left out unless you ask for them |
includeCounterSales | false | Counter sales are left out unless you ask for them |
includeInactive | false | With true, cancelled orders come too, with active: false |
page, pageSize | 1, 50 | pageSize is capped at 200 |
| Parámetro | Default | Comportamiento |
|---|---|---|
from, to | sin límite | Fecha del pedido, YYYY-MM-DD o ISO 8601. to incluye todo ese día. from posterior a to responde 400 invalid_range |
customerId | — | Los pedidos de un cliente |
salesRepId | — | El vendedor grabado en el pedido, no el vendedor actual del cliente |
statusId | — | Un valor de /order-statuses; cualquier otro responde 400 invalid_reference |
includeQuotes | false | Las cotizaciones quedan afuera salvo que las pida |
includeCounterSales | false | Las ventas de mostrador quedan afuera salvo que las pida |
includeInactive | false | Con true vienen también los pedidos anulados, con active: false |
page, pageSize | 1, 50 | pageSize tiene tope 200 |
Taxes and roundingImpuestos y redondeo
- On the order,
taxes = vat + internalTaxes + vatPerception(up to rounding of a cent) andtotal = totalWithoutTax + taxes. On the items of orders entered after May 2026 the same holds. vatis plain VAT. The VAT perception (Argentina) travels apart invatPerceptionand is included intaxesand intotal. Elsewhere it is0.- Items of orders entered up to May 2026 are published as they were stored,
and may not meet the invariant:
vatcan be0with the VAT included intaxes, andvatPerceptioncan come filled in without being added to the item'staxesortotal. On those itemstotal = totalWithoutTax + taxesstill holds. The order's own amounts are right in every case: for a historical read, take VAT and totals from the order, not from its items. internalTaxesare the country's excise taxes: Argentine internal taxes, Chilean ILA, Mexican IEPS, Peruvian ISC.- The order's amounts are authoritative: they are the ones that reach the current account and the invoice. In currencies without decimals (Chilean peso) the order is rounded to whole units and its items keep decimals, so the sum of the items can differ from the order by a few units. Never recompute the order from its items.
- The tax rate is not published: read the amounts, do not recompute them.
- En el pedido,
taxes = vat + internalTaxes + vatPerception(al centavo) ytotal = totalWithoutTax + taxes. En los ítems de los pedidos cargados después de mayo de 2026 vale lo mismo. vates el IVA puro. La percepción de IVA (Argentina) viaja aparte envatPerceptiony está incluida entaxesy entotal. Fuera de Argentina es0.- Los ítems de pedidos cargados hasta mayo de 2026 se publican como
quedaron guardados y pueden no cumplir la invariante:
vatpuede venir en0con el IVA incluido entaxes, yvatPerceptionpuede venir con valor sin estar sumada en eltaxesni en eltotaldel ítem. En esos ítemstotal = totalWithoutTax + taxessigue valiendo. Los importes del pedido están bien en todos los casos: para una lectura histórica, tome el IVA y los totales del pedido, no de sus ítems. internalTaxesson los impuestos específicos del país: impuestos internos en Argentina, ILA en Chile, IEPS en México, ISC en Perú.- Los importes del pedido son los que valen: son los que van a la cuenta corriente y a la factura. En monedas sin decimales (peso chileno) el pedido se redondea a unidades enteras y los ítems conservan decimales, así que la suma de los ítems puede diferir del pedido en unas pocas unidades. Nunca recalcule el pedido desde sus ítems.
- La alícuota no se publica: lea los importes, no los recalcule.
Validation rulesReglas de validación
- The items come only from
GET /orders/{id}; in the listingitemsisnull. An order with no lines answersitems: []. - A discount line has
isDiscount: true, a zeroquantityand negative amounts. When it discounts one item,discountedItemIdpoints to it; a discount over the whole order has nodiscountedItemId. - Being a quote, waiting for approval and being cancelled are not statuses: they come as
isQuote,pendingApprovalandactive. - A cancelled order is still returned by
GET /orders/{id}, withactive: falseand itsdeletionReasonId(catalog/reasons/order-deletion). Cancelling switches its items off, so it comes back withitems: []. salesRepIdrefers to/sales-reps, which lists only active sales reps: an old order can point to one that is no longer listed.currencyIdnull means the currency of your account.pointOfSaleIdis the customer's branch (/customers/{id}/points-of-sale), not a counter sale.- Internal notes, payment status, address, phone and the public link token are not published.
- Los ítems salen únicamente de
GET /orders/{id}; en el listadoitemsesnull. Un pedido sin líneas respondeitems: []. - Una línea de bonificación tiene
isDiscount: true,quantityen cero e importes negativos. Si bonifica un ítem,discountedItemIdlo apunta; una bonificación sobre todo el pedido no tienediscountedItemId. - Ser cotización, estar pendiente de aprobación y estar anulado no son estados: vienen
como
isQuote,pendingApprovalyactive. - Un pedido anulado sigue saliendo por
GET /orders/{id}, conactive: falsey sudeletionReasonId(catálogo/reasons/order-deletion). Anular apaga sus ítems, así que vuelve conitems: []. salesRepIdapunta a/sales-reps, que lista solo vendedores activos: un pedido viejo puede traer uno que ya no figura.currencyIdnulo significa la moneda de su cuenta.pointOfSaleIdes la sucursal del cliente (/customers/{id}/points-of-sale), no una venta de mostrador.- Las notas internas, el estado de pago, la dirección, el teléfono y el token del link público no se publican.
Keeping a dashboard in syncCómo mantener un tablero sincronizado
An order does not record when it was last modified, so there is no
modified since filter. Use a window: every few minutes, ask
GET /orders?from=<start of the open window>&pageSize=200 — for example,
the last two or three weeks —, page to the end and replace the whole window on
your side. An edited order brings its new values; a cancelled one disappears (or comes with
active: false if you ask includeInactive=true).
- An order's date can be adjusted afterwards from the application: leave margin at the start of the window.
- Rate limit: 2 per page of the listing, 1 per detail. Ask for the detail only of the orders whose
total,statusIdortotalLiterschanged since your last pass.
Un pedido no guarda cuándo se modificó por última vez, así que
no hay filtro modificado desde. Use una ventana: cada pocos minutos, pida
GET /orders?from=<inicio de la ventana abierta>&pageSize=200 — por ejemplo,
las últimas dos o tres semanas —, pagine hasta el final y reemplace la ventana
entera de su lado. Un pedido editado trae sus valores nuevos; uno anulado desaparece (o viene
con active: false si pide includeInactive=true).
- La fecha de un pedido se puede ajustar después desde la aplicación: deje margen al inicio de la ventana.
- Rate limit: 2 por página del listado, 1 por detalle. Pida el detalle solo de los pedidos
cuyo
total,statusIdototalLiterscambió desde su última pasada.
Delivery notesRemitos
What physically left, and to whom. Read-only in this version. That is not caution, it is where the two ways of creating a delivery note lead: measured in production on 2026-09-21, 2,099,425 of 2,160,909 delivery notes (97.2 %) belong to an order, so issuing one means issuing it for an order, which is out of scope; and the remaining 2.8 % come mostly from the supplier-commission settlement, which is out of scope too. There is no third path an integrator should be able to use.
Not to be confused with dispatch rounds, which are a different thing and also out
of scope. A note with neither customerId nor supplierId is a transfer
between warehouses — a real and common case, 42,622 of them in production.
Qué salió físicamente, y hacia quién. Solo lectura en esta versión. No es prudencia, es adónde llevan los dos caminos de alta que existen: medido en producción el 2026-09-21, 2.099.425 de 2.160.909 remitos (97,2 %) pertenecen a un pedido, así que emitir uno significa emitirlo para un pedido, que está fuera de alcance; y el 2,8 % restante sale mayormente de la liquidación de comisiones a proveedores, que también lo está. No queda una tercera vía que un integrador deba poder usar.
No confundir con las hojas de ruta, que son otra cosa y también están
fuera de alcance. Un remito sin customerId ni supplierId es una
transferencia entre depósitos — un caso real y frecuente, 42.622 en producción.
| Endpoint | What it does |
|---|---|
GET /delivery-notes | Paged listing, most recent first. from, to (YYYY-MM-DD), customerId, supplierId, page, pageSize. Without the items. |
GET /delivery-notes/{id} | One delivery note WITH its items. |
| Endpoint | Qué hace |
|---|---|
GET /delivery-notes | Listado paginado, más recientes primero. from, to (YYYY-MM-DD), customerId, supplierId, page, pageSize. Sin los ítems. |
GET /delivery-notes/{id} | Un remito CON sus ítems. |
Validation rulesReglas de validación
- The items come only from
GET /delivery-notes/{id}. A note has several lines, so returning them inside a page would multiply rows and the total would stop matching. orderIdis the order the note fulfils: read it withGET /orders/{id}.- A line points at exactly one of
productId/supplyId/kegId.descriptionis always there, so a consumer that resolves no ids still knows what went out. - The signed proof of delivery (signature, name, coordinates) and the public link token are not published: they are the mobile app's delivery evidence, not integration data.
- Los ítems salen únicamente de
GET /delivery-notes/{id}. Un remito tiene varias líneas, así que devolverlas dentro de una página multiplicaría filas y el total dejaría de coincidir. orderIdes el pedido que el remito cumple: se lee conGET /orders/{id}.- Una línea apunta a exactamente uno de
productId/supplyId/kegId. Ladescriptionva siempre, para que un consumidor que no resuelva ningún id igual sepa qué salió. - La prueba de entrega firmada (firma, aclaración, coordenadas) y el token del link público no se publican: son la evidencia de entrega de la app, no datos de integración.
The voucher left behind by an incoming payment. Read-only, for the same structural reason as payment orders: a receipt is never created on its own — the application creates it inside the same transaction that records the collection. The electronic receipt and the PDF are out of scope.
El comprobante que queda de un cobro. Solo lectura, por la misma razón estructural que las órdenes de pago: un recibo nunca se crea solo — la aplicación lo genera dentro de la misma transacción que registra la cobranza. El recibo electrónico y el PDF quedan fuera de alcance.
| Endpoint | What it does |
|---|---|
GET /receipts | Paginated list, newest first. Filters: customerId, supplierId, from/to (ISO 8601), includeInactive. |
GET /receipts/{receiptId} | A single receipt, with the movements it covers. |
| Endpoint | Qué hace |
|---|---|
GET /receipts | Listado paginado, del más nuevo al más viejo. Filtros: customerId, supplierId, from/to (ISO 8601), includeInactive. |
GET /receipts/{receiptId} | Un recibo, con los movimientos que cubre. |
What you should know before using itLo que conviene saber antes de usarlo
- A receipt can cover more than one movement. That is why
cashMovementIdsandbankMovementIdsare returned only byGET /receipts/{receiptId}and are always null in the list: resolving them there would multiply rows and break paging. - Exactly one of
customerId/supplierIdis populated. Almost every receipt is issued to a customer; receipts against a supplier are rare. amountis normally positive — unlike a payment order, which is stored negative. A small number are negative (12,727 of 823,931 across the whole production database on 2026-09-21); those are corrections, not a different kind of receipt.- Receipts do get deactivated (unlike payment orders), so
activeis real information. By default only active ones are listed; passincludeInactive=truefor the rest. descriptionis written by the application and is in Spanish, like the rows of a report.
- Un recibo puede cubrir más de un movimiento. Por eso
cashMovementIdsybankMovementIdsse devuelven solo enGET /receipts/{receiptId}y vienen siempre en null en el listado: resolverlos ahí multiplicaría filas y rompería la paginación. - Viene exactamente uno de
customerId/supplierId. Casi todos los recibos son a un cliente; los emitidos contra un proveedor son raros. amountes normalmente positivo — al revés que una orden de pago, que se guarda negativa. Unos pocos son negativos (12.727 de 823.931 en toda la base de producción al 2026-09-21): son correcciones, no otro tipo de recibo.- Los recibos sí se desactivan (a diferencia de las órdenes de pago), así que
activees información real. Por defecto solo se listan los activos; paseincludeInactive=truepara traer el resto. descriptionla escribe la aplicación y está en español, igual que las filas de un informe.
DebtorsDeudores
The customers of your account that owe money, with their debt broken down by age. A calculated view, not a stored entity: read-only, nothing here can be written.
Los clientes de su cuenta que deben plata, con su deuda desglosada por antigüedad. Es una vista calculada, no una entidad guardada: solo lectura, acá no se escribe nada.
| Endpoint | What it does |
|---|---|
GET /debtors | Paginated list, largest debt first. Filters: asOf (ISO 8601, defaults to now), customerTypeId, includeZeroBalance (default false). |
| Endpoint | Qué hace |
|---|---|
GET /debtors | Listado paginado, de mayor a menor deuda. Filtros: asOf (ISO 8601, por defecto ahora), customerTypeId, includeZeroBalance (por defecto false). |
What you should know before using itLo que conviene saber antes de usarlo
- Every page costs the whole computation. Paging bounds the response, not the work behind it: the underlying query walks every active customer of your account and its current account, orders and kegs. That is why this endpoint has a rate-limit cost of 40, the highest of the API. Fetch it and cache it — do not poll it page by page in a loop.
- Only
customerIdis published. The customer's name, sales rep, category and payment terms are not repeated here: read them from/customers/{customerId}, which is the one source that stays current. - The six aging buckets add up to
balance: 1–14, 15–29, 30–44, 45–59, 60–89 and 90+ days. deliveryNoteBalanceis the part of the balance that was delivered on a delivery note and is not invoiced yet;invoicedBalanceis the rest. The two add up tobalance.- By default only customers with a positive balance are returned. Pass
includeZeroBalance=trueto get the rest as well.
- Cada página cuesta el cálculo entero. Paginar acota la respuesta, no el trabajo que hay detrás: la consulta recorre todos los clientes activos de su cuenta con su cuenta corriente, sus pedidos y sus barriles. Por eso este endpoint tiene un costo de rate limit de 40, el más alto de la API. Tráigalo y cachelo — no lo consulte página por página en un bucle.
- Solo se publica
customerId. El nombre del cliente, su vendedor, su categoría y sus condiciones de pago no se repiten acá: léalos de/customers/{customerId}, que es la única fuente que queda al día. - Los seis tramos de antigüedad suman
balance: 1–14, 15–29, 30–44, 45–59, 60–89 y 90+ días. deliveryNoteBalancees la parte del saldo entregada con remito y todavía no facturada;invoicedBalancees el resto. Las dos sumanbalance.- Por defecto solo salen los clientes con saldo positivo. Pase
includeZeroBalance=truepara traer también el resto.
CatalogsCatálogos
Several fields of a customer take their value from a closed list. Read the list, let the user pick, send the value. None of these lists is enumerated in the specification, because none of them is the same for everyone: some depend on your account's country, the rest are your own data. If a catalog answers an empty array, there is nothing to choose from — leave the field unset.
Varios campos de un cliente toman su valor de una lista cerrada. Lea la lista, deje elegir al usuario, mande el valor. Ninguna de estas listas se enumera en la especificación porque ninguna es igual para todos: algunas dependen del país de su cuenta y el resto son datos suyos. Si un catálogo responde un arreglo vacío, no hay nada para elegir: deje el campo sin asignar.
| Catalog | Fills the field | What it depends on |
|---|---|---|
GET /tax-conditions | taxConditionId | Your account's country |
GET /provinces | provinceId | Your account's country — province, state or region |
GET /payment-terms | paymentTermsId | Your account's country |
GET /currencies | currencyId | Your account. null means your default currency |
GET /customer-types | customerTypeId | Your account — standard types plus the ones you defined. Full CRUD, see Customer types |
GET /price-lists | priceListId | Your account. null means the default list |
GET /sales-reps | salesRepId | Your account — active users with a sales role |
GET /logistics-providers | logisticsProviderId | Your account. Empty if you do not use them |
GET /customer-categories | categoryId assigned via /customers/{customerId}/categories | Your account. Full CRUD, see Customer categories |
| Catálogo | Completa el campo | De qué depende |
|---|---|---|
GET /tax-conditions | taxConditionId | El país de su cuenta |
GET /provinces | provinceId | El país de su cuenta — provincia, estado o región |
GET /payment-terms | paymentTermsId | El país de su cuenta |
GET /currencies | currencyId | Su cuenta. null es su moneda por defecto |
GET /customer-types | customerTypeId | Su cuenta — los tipos estándar más los que usted definió. CRUD completo, ver Tipos de cliente |
GET /price-lists | priceListId | Su cuenta. null es la lista por defecto |
GET /sales-reps | salesRepId | Su cuenta — usuarios activos con rol de venta |
GET /logistics-providers | logisticsProviderId | Su cuenta. Vacío si no los usa |
GET /customer-categories | categoryId asignado vía /customers/{customerId}/categories | Su cuenta. CRUD completo, ver Categorías de cliente |
Catalogs for suppliers, purchases, products and production
Catálogos de proveedores, compras, productos y producción
Same shape and same rule as the ones above: read the list, let the user pick, send the
id. Several are shared with the customer — /currencies,
/provinces and /tax-conditions fill the equivalent fields of a supplier.
Misma forma y misma regla que los de arriba: lea la lista, deje elegir al usuario, mande
el id. Varios se comparten con el cliente: /currencies,
/provinces y /tax-conditions completan los campos equivalentes de un
proveedor.
| Catalog | Fills the field | What it depends on |
|---|---|---|
GET /supplier-types | supplierTypeId of a supplier | Fixed set. Only the logistics type can be a customer's logistics provider |
GET /supplier-categories | categoryId of a supplier | Your account |
GET /expense-accounts | defaultAccountId of a supplier, accountId of a purchase | Your account — expense and mixed accounts only |
GET /purchase-types | purchaseTypeId of a purchase | Fixed set: purchase, or credit note |
GET /voucher-types | voucherTypeId of a purchase | The tax rules of your country. Includes retired types, which the application also still offers |
GET /payment-types | paymentTypeId of a purchase | Fixed set |
GET /units | unitId of a purchase line | Fixed set. Must be convertible to the supply's base unit |
GET /complementary-products | complementaryProductId of a purchase line | Your account. The only products a purchase can stock |
GET /purchasable-services | serviceId of a purchase line | Your account. Administered at Services |
GET /spare-parts | sparePartId of a purchase line | Your account. Administered at Spare parts. It is the listing endpoint, not a separate catalog |
GET /warehouses | warehouseId of a purchase line | Your account, narrowed to what your integration user may use. It is the listing endpoint, not a separate catalog |
GET /suppliers | supplierId of a purchase or of a product | Your account. It is the listing endpoint, not a separate catalog |
GET /product-types | productTypeId of a product | Fixed set |
GET /product-categories | categoryIds of a product | Your account — standard categories plus yours |
GET /containers | containerId of a product's container price | Your account — standard containers plus your returnables |
GET /cases | caseId of a product's case price | Your account — standard cases plus yours |
GET /production-stages | stageId of a batch | Fixed set: planned, brewing, fermenting, maturing, filtering, finished |
GET /brewable-products | producedProductId of a batch or of a recipe | Your account — only what your brewery makes itself, so narrower than /products |
GET /tanks | tankId of a batch or of a task | Your account — every active tank, free or not |
GET /recipes | recipeId of a batch | Your account |
GET /measurement-types | measurementTypeId of a task or of a completion | Fixed set. Only a temperature may be negative |
GET /task-definitions | taskDefinitionId of a task, parentTaskId of a definition | Your account plus the shared definitions. It is also a full resource |
GET /users | assignedUserId of a task | Your account — id and name only, never e-mail or role |
GET /raw-material-types | supplyTypeId of a recipe ingredient | Fixed set: malt, hops, yeast, adjuncts |
GET /raw-material-uses | useId of a recipe ingredient | Fixed set: mash, boil, whirlpool, dry hopping |
GET /products | productId of a price and of a mix pack item | Your account. It is the listing endpoint, not a separate catalog |
| Catálogo | Completa el campo | De qué depende |
|---|---|---|
GET /supplier-types | supplierTypeId de un proveedor | Set fijo. Solo el tipo logística puede ser proveedor de logística de un cliente |
GET /supplier-categories | categoryId de un proveedor | Su cuenta |
GET /expense-accounts | defaultAccountId de un proveedor, accountId de una compra | Su cuenta — solo cuentas de egreso y mixtas |
GET /purchase-types | purchaseTypeId de una compra | Set fijo: compra, o nota de crédito |
GET /voucher-types | voucherTypeId de una compra | Las reglas fiscales de su país. Incluye los dados de baja, que la aplicación también sigue ofreciendo |
GET /payment-types | paymentTypeId de una compra | Set fijo |
GET /units | unitId de una línea de compra | Set fijo. Tiene que ser convertible a la unidad base del insumo |
GET /complementary-products | complementaryProductId de una línea de compra | Su cuenta. Son los únicos productos que una compra puede ingresar a stock |
GET /purchasable-services | serviceId de una línea de compra | Su cuenta. Administrado en Servicios |
GET /spare-parts | sparePartId de una línea de compra | Su cuenta. Administrado en Repuestos. Es el endpoint de listado, no un catálogo aparte |
GET /warehouses | warehouseId de una línea de compra | Su cuenta, limitado a lo que su usuario de integración puede usar. Es el endpoint de listado, no un catálogo aparte |
GET /suppliers | supplierId de una compra o de un producto | Su cuenta. Es el endpoint de listado, no un catálogo aparte |
GET /product-types | productTypeId de un producto | Set fijo |
GET /product-categories | categoryIds de un producto | Su cuenta — las categorías estándar más las suyas |
GET /containers | containerId del precio por envase de un producto | Su cuenta — los envases estándar más sus retornables |
GET /cases | caseId del precio por caja de un producto | Su cuenta — las cajas estándar más las suyas |
GET /production-stages | stageId de un lote | Set fijo: planificado, cocción, fermentación, maduración, filtrado, finalizado |
GET /brewable-products | producedProductId de un lote o de una receta | Su cuenta — solo lo que su cervecería produce, así que es más acotado que /products |
GET /tanks | tankId de un lote o de una tarea | Su cuenta — todos los tanques activos, libres u ocupados |
GET /recipes | recipeId de un lote | Su cuenta |
GET /measurement-types | measurementTypeId de una tarea o de un completado | Set fijo. Solo una temperatura puede ser negativa |
GET /task-definitions | taskDefinitionId de una tarea, parentTaskId de una definición | Su cuenta más las definiciones compartidas. Es también un recurso completo |
GET /users | assignedUserId de una tarea | Su cuenta — solo id y nombre, nunca mail ni rol |
GET /raw-material-types | supplyTypeId de un ingrediente de receta | Set fijo: malta, lúpulo, levadura, adjuntos |
GET /raw-material-uses | useId de un ingrediente de receta | Set fijo: macerado, hervor, whirlpool, dry hopping |
GET /products | productId de un precio y de un ítem de mix pack | Su cuenta. Es el endpoint de listado, no un catálogo aparte |
Catalogs published ahead of their resource
Catálogos publicados antes que su recurso
These are readable now, but the resources that consume them — orders, invoices, collections, stock, kegs — are not in this version. They are here so you can map your own identifiers against ours before those endpoints exist, and so that nothing changes underneath you when they arrive: the list you read today is the list the write will validate against.
Estos se pueden leer ya, pero los recursos que los consumen —pedidos, facturas, cobranzas, stock, barriles— no están en esta versión. Están para que pueda mapear sus identificadores contra los nuestros antes de que existan esos endpoints, y para que nada cambie abajo suyo cuando lleguen: la lista que lee hoy es la lista contra la que va a validar la escritura.
Two notes worth reading before you cache any of them. ilaCode on a product
accepts free text today and is not checked against /ila-types —
treat that catalog as guidance, not as an enforced set. And /keg-volumes is the only one
here that is your own data rather than a system table, which is why it is the only one that asks for a
module.
Dos advertencias antes de cachear cualquiera de estos. El ilaCode de un
producto hoy acepta texto libre y no se valida contra /ila-types: ese
catálogo es orientativo, no un set exigido. Y /keg-volumes es el único de
esta lista que son datos suyos y no una tabla del sistema, y por eso es el único que pide
módulo.
| Catalog | Fills the field | What it depends on |
|---|---|---|
GET /sales-taxes | the tax fields of an order or an invoice | Your country. The rate is not published — the system computes each amount |
GET /purchase-taxes | the tax fields of a purchase | Your country. A different set from /sales-taxes |
GET /perceptions | the perception fields of a purchase or an invoice | Your country. Perceptions are part of the document total |
GET /ila-types | ilaCode of a product | Chile only, and on what your account sells. Keyed by code |
GET /keg-types | kegTypeId of a keg | Fixed set |
GET /keg-volumes | the volume of a keg | Your account's configuration. Keyed by code, always in invariant format |
GET /tap-system-types | tapSystemTypeId of a tap system | Fixed set |
GET /reasons/keg-return | the return reason of a keg | Your account: two reasons are only offered to distributors |
GET /reasons/order-deletion | the reason of an order cancellation | Fixed set |
GET /reasons/order-discount | the reason of a discounted order line (discountReasonId of an order item) | Fixed set. Required in Mexico, Chile and Costa Rica |
GET /order-statuses | statusId of an order, and its filter | Fixed set: pending, in process, ready to deliver, delivered |
GET /stock-movement-types | the type of a stock movement | Fixed set: goods in, goods out, stock count, write-off |
GET /warehouse-types | warehouseTypeId of a warehouse | Fixed set: cold room or warehouse |
GET /waste-types | wasteTypeId of a recorded loss | Fixed set |
GET /tank-types | tankTypeId of a tank | Fixed set |
GET /wood-types | woodTypeId of a barrel tank | Fixed set |
GET /banks | bankId of a bank account or a cheque | Your country. Real bank names, not translated |
GET /bank-account-types | bankAccountTypeId of a bank account | Fixed set: current or savings |
GET /bank-payment-types | paymentTypeId of a bank movement | Fixed set. A subset of /payment-types |
GET /bank-movement-types | typeId of a bank movement | Fixed set: income or expense |
GET /account-categories | expenseCategoryId of a chart-of-accounts entry | Your account. Read-only: account categories have their own CRUD in the web application, not published as a resource here |
GET /check-statuses | the status of a cheque | Fixed set: in portfolio, handed over, cashed, deleted |
GET /check-kinds | the kind of a cheque | Fixed set: your own, or a third party's |
GET /withholding-types | withholdingTypeId of a collection | Your country. Empty where withholdings do not exist |
GET /roles | the roles of a user | Fixed set, the same for every account |
| Catálogo | Completa el campo | De qué depende |
|---|---|---|
GET /sales-taxes | los impuestos de un pedido o una factura | Su país. La alícuota no se publica: el importe lo calcula el sistema |
GET /purchase-taxes | los impuestos de una compra | Su país. Es un set distinto de /sales-taxes |
GET /perceptions | las percepciones de una compra o una factura | Su país. Las percepciones están dentro del total del comprobante |
GET /ila-types | ilaCode de un producto | Solo Chile, y de qué vende su cuenta. Va por código |
GET /keg-types | kegTypeId de un barril | Set fijo |
GET /keg-volumes | el volumen de un barril | La configuración de su cuenta. Va por código, siempre en formato invariante |
GET /tap-system-types | tapSystemTypeId de una chopera | Set fijo |
GET /reasons/keg-return | el motivo de devolución de un barril | Su cuenta: dos motivos se ofrecen solo a distribuidoras |
GET /reasons/order-deletion | el motivo de anulación de un pedido | Set fijo |
GET /reasons/order-discount | el motivo de bonificación de una línea (discountReasonId de un ítem de pedido) | Set fijo. Obligatorio en México, Chile y Costa Rica |
GET /order-statuses | statusId de un pedido, y su filtro | Set fijo: pendiente, en proceso, listo para entregar, entregado |
GET /stock-movement-types | el tipo de un movimiento de stock | Set fijo: ingreso, egreso, control, desecho |
GET /warehouse-types | warehouseTypeId de un depósito | Set fijo: cámara o depósito |
GET /waste-types | wasteTypeId de una merma | Set fijo |
GET /tank-types | tankTypeId de un tanque | Set fijo |
GET /wood-types | woodTypeId de un tanque de barrica | Set fijo |
GET /banks | bankId de una cuenta bancaria o un cheque | Su país. Son nombres reales de banco: no se traducen |
GET /bank-account-types | bankAccountTypeId de una cuenta bancaria | Set fijo: cuenta corriente o caja de ahorro |
GET /bank-payment-types | paymentTypeId de un movimiento bancario | Set fijo. Es un subconjunto de /payment-types |
GET /bank-movement-types | typeId de un movimiento bancario | Set fijo: ingreso o egreso |
GET /account-categories | expenseCategoryId de una cuenta del plan de cuentas | Su cuenta. Solo lectura: las categorías de cuenta tienen su propio CRUD en la aplicación web, no se publican como recurso acá |
GET /check-statuses | el estado de un cheque | Set fijo: en cartera, entregado, cobrado, eliminado |
GET /check-kinds | el origen de un cheque | Set fijo: propios o de terceros |
GET /withholding-types | withholdingTypeId de una cobranza | Su país. Vacío donde la figura no existe |
GET /roles | los roles de un usuario | Set fijo, igual para todas las cuentas |
Fiscal catalogs, by country
Catálogos fiscales, según el país
These come from the tax authority, so their key is a code
(code, text) and not a number — send it exactly as returned, leading zeros included.
Outside their country they answer with an empty array, because the field does not apply there.
Estos vienen del organismo fiscal, así que su clave es un código
(code, texto) y no un número: mándelo tal cual, con los ceros a la
izquierda incluidos. Fuera de su país responden un arreglo vacío, porque el campo no
aplica.
| Catalog | Fills the field | Country |
|---|---|---|
GET /tax-systems | taxSystem | Mexico — tax regime |
GET /invoice-uses | invoiceUse | Mexico — CFDI use |
GET /payment-forms | paymentForm | Mexico — SAT payment form |
GET /payment-methods | paymentMethod | Mexico — SAT payment method |
GET /dispatch-types | dispatchType | Chile — dispatch notes |
| Catálogo | Completa el campo | País |
|---|---|---|
GET /tax-systems | taxSystem | México — régimen fiscal |
GET /invoice-uses | invoiceUse | México — uso del CFDI |
GET /payment-forms | paymentForm | México — forma de pago SAT |
GET /payment-methods | paymentMethod | México — método de pago SAT |
GET /dispatch-types | dispatchType | Chile — guías de despacho |
Do not confuse paymentForm with paymentTermsId: the first is the
tax authority's code, the second is the commercial terms you agreed with the customer.
No confunda paymentForm con paymentTermsId: el primero es el
código del organismo fiscal, el segundo es la condición comercial que usted acordó
con el cliente.
All of them answer with the same shape, so one function in your code handles every
catalog: an array of { "id": <number>, "name": <string> }, or
{ "code": <string>, "name": <string> } for the fiscal ones. Send the
id or the code; name is there for you to display.
Todos responden con la misma forma, así que una sola función de su
código resuelve cualquier catálogo: un arreglo de
{ "id": <número>, "name": <texto> }, o
{ "code": <texto>, "name": <texto> } en los fiscales. Mande el id
o el code; name está para que usted lo muestre.
An id that is not in its catalog is rejected with
400 invalid_reference, and the message names both the field and the catalog to read. So
a price list belonging to another account, or a province of another country, never gets written.
Un id que no esté en su catálogo se rechaza con
400 invalid_reference, y el mensaje indica el campo y el catálogo que hay que
leer. Así, una lista de precios de otra cuenta o una provincia de otro país nunca
llegan a escribirse.
Cache them: these lists change rarely — country reference data changes when the tax rules do, and the rest when you edit them in the application. Refetching them on every write is wasted rate limit.
Cachelos: estas listas cambian poco — las de referencia del país cuando cambian las reglas fiscales, y las suyas cuando usted las edita en la aplicación. Volver a pedirlas en cada escritura es gastar límite de tasa al pedo.
AI agents (MCP)Agentes de IA (MCP)
If you are connecting an AI agent rather than writing code, this account also speaks the Model Context Protocol. Point your MCP client at:
https://<your-host>/mcp
Authorization: Bearer <apiKey>
Same API key as POST /api/v1/auth/login — there is nothing extra to request. The
transport is Streamable HTTP; the legacy SSE endpoints are also served for older clients.
Connecting from Claude (OAuth)
Claude's native connectors (web, desktop and mobile) cannot send a fixed header, so this server
also speaks OAuth 2.1. In Claude, go to Settings › Connectors › Add
custom connector, enter https://<your-host>/mcp and leave the client ID and
secret empty. Claude discovers the authorization server on its own, registers itself, and opens a
page where you paste the account's API key once. From then on Claude holds short-lived tokens, never
the key.
- Discovery follows RFC 9728 and RFC 8414:
/.well-known/oauth-protected-resource/mcpand/.well-known/oauth-authorization-server. Dynamic client registration (RFC 7591) and PKCE withS256are supported and required, respectively. - The account needs API access enabled, exactly as for
POST /api/v1/auth/login: the authorization page runs that same login. - Rotating the API key disconnects Claude. The authorization is bound to the key that was pasted; if the account's key changes, the next request is rejected and the user has to connect again.
It exposes 18 tools covering the same customer operations documented above: searching, reading, creating and updating customers, their points of sale and their contacts, plus the catalogs. Writes included — an agent is a client like any other.
It is the same API underneath. Every request the agent makes goes through
/api/v1, so the permissions, the rate limits, the validation rules and the audit trail
are exactly the ones described on this page. Nothing is relaxed because the caller is an agent.
Two things worth knowing before you wire it up:
- The API key never reaches the model. Your MCP client sends it in the header; the model sees tool names, arguments and results. Revoking access means rotating the key, not asking the agent to forget it.
- Writes are real and immediate. They are auditable and reversible —
/deactivateundoes an unwanted customer — but there is no preview step. If you want a human to confirm before each write, that is a setting in your MCP client, not here.
You do not need MCP to use this API. If you are writing an integration, the REST endpoints above are the contract, and they are not going anywhere.
Si lo que va a conectar es un agente de IA en vez de escribir código, esta cuenta también habla Model Context Protocol. Apunte su cliente MCP a:
https://<su-host>/mcp
Authorization: Bearer <apiKey>
La misma API key de POST /api/v1/auth/login: no hay nada extra que pedir. El
transporte es Streamable HTTP; también se sirven los endpoints SSE antiguos para clientes
viejos.
Conectarse desde Claude (OAuth)
Los conectores nativos de Claude (web, desktop y mobile) no pueden mandar una cabecera fija, así
que este servidor también habla OAuth 2.1. En Claude, vaya a Settings ›
Connectors › Add custom connector, ingrese https://<su-host>/mcp y deje
vacíos el client ID y el secret. Claude descubre solo el servidor de autorización, se
registra y abre una página donde se pega una vez la API key de la cuenta. Desde ahí Claude
guarda tokens de vida corta, nunca la clave.
- El descubrimiento sigue RFC 9728 y RFC 8414:
/.well-known/oauth-protected-resource/mcpy/.well-known/oauth-authorization-server. Se soporta el registro dinámico de clientes (RFC 7591) y PKCE conS256es obligatorio. - La cuenta necesita el acceso por API habilitado, igual que para
POST /api/v1/auth/login: la página de autorización hace ese mismo login. - Rotar la API key desconecta a Claude. La autorización queda atada a la clave que se pegó; si la clave de la cuenta cambia, el próximo pedido se rechaza y hay que volver a conectar.
Expone 18 herramientas que cubren las mismas operaciones de clientes documentadas arriba: buscar, leer, crear y modificar clientes, sus puntos de venta y sus contactos, más los catálogos. Escrituras incluidas — un agente es un cliente como cualquier otro.
Por debajo es la misma API. Cada pedido del agente pasa por /api/v1,
así que los permisos, los límites de uso, las reglas de validación y la
auditoría son exactamente los de esta página. No se afloja nada porque quien llama sea
un agente.
Dos cosas que conviene saber antes de conectarlo:
- La API key nunca llega al modelo. Su cliente MCP la manda en la cabecera; el modelo ve nombres de herramientas, argumentos y respuestas. Revocar el acceso es rotar la clave, no pedirle al agente que la olvide.
- Las escrituras son reales e inmediatas. Quedan auditadas y son reversibles
—
/deactivatedeshace un cliente que no iba— pero no hay paso de vista previa. Si quiere que una persona confirme cada escritura, eso se configura en su cliente MCP, no acá.
No hace falta MCP para usar esta API. Si está escribiendo una integración, los endpoints REST de arriba son el contrato, y no se van a ningún lado.