Backoffice manual
The backoffice (/v1/imprenta/backoffice) is the print administration console. Two
roles:
| Role | Can |
|---|---|
ZENTTO_SUPERADMIN (owner) | Generate series, define tariffs, reassign/extend series, manage distributors and commissions, see global metering. |
DISTRIBUIDOR (reseller) | Query/assign already-generated series and see their portfolio’s consumption. Cannot generate series or define tariffs (anti-IDOR: portfolio-scoped). |
Own control-number series
Section titled “Own control-number series”Backoffice → Series.
| Action | Endpoint | Role |
|---|---|---|
| List series | GET /series (filter companyId, q) | Both |
| Generate series | POST /series | SUPERADMIN only |
| Update (name, prefix, state) | PUT /series/{id} | Both (distributor portfolio only) |
| Reassign to another company | POST /series/{id}/reasignar | SUPERADMIN only |
| Extend the range top | POST /series/{id}/extender | SUPERADMIN only |
Each series has Serie, TipoDocumento, Prefijo, range [Desde, Hasta], Correlativo
(last consumed), Restantes and Estado (ACTIVA · AGOTADA · SUSPENDIDA).
Client assignment
Section titled “Client assignment”Series are assigned to a client company (CompanyId). Reassign moves a series to
another company; extend raises the top (Hasta) without reassigning or recreating.
Consumption / metering
Section titled “Consumption / metering”Backoffice → Consumption. Each control number issued creates a billable event in
imprenta."ConsumoControl".
| View | Endpoint |
|---|---|
| Event detail | GET /consumo (filters companyId, desde, hasta) |
| Per-client summary (to bill) | GET /consumo/resumen |
The summary shows per company: Emitidos, Restantes, PrecioPorControl,
IncluidoGratis and MontoEstimado = (Emitidos − IncluidoGratis) × PrecioPorControl, plus
global KPIs (clients, total issued, estimated revenue).
Tariffs
Section titled “Tariffs”Backoffice → Tariffs (GET/POST /tarifas). Each plan (TarifaPlan) defines:
Moneda,PrecioPorControl(price per control number).TamanoBloque+PrecioBloque(volume price).IncluidoGratis(free control numbers per period).
CompanyId = 0 is the global default tariff; companies without their own plan fall back
to it. Creating/updating tariffs is SUPERADMIN only.
Integrators and tokens
Section titled “Integrators and tokens”Backoffice → Integrators. An integrator is a client company that consumes the
third-party API (/api/*).
| Action | Endpoint |
|---|---|
| List / create | GET/POST /integradores |
| Detail / update / suspend | GET/PUT/DELETE /integradores/{id} |
| List tokens | GET /integradores/{id}/tokens |
| Issue token (returns the secret once) | POST /integradores/{id}/tokens |
| Revoke token | POST /integradores/{id}/tokens/{tid}/revocar |
| Integrator users | GET/POST /integradores/{id}/usuarios |
Each token has TokenUsuario (public), Ambiente (demo/production) and Estado
(ACTIVO/REVOCADO). The secret is shown only once at issuance and never recoverable.
Distributors and portfolio
Section titled “Distributors and portfolio”Backoffice → Distributors (SUPERADMIN administers; distributor queries their portfolio).
| Action | Endpoint |
|---|---|
| List / create distributor | GET/POST /distribuidores |
| Suspend distributor | DELETE /distribuidores/{userId} |
| View portfolio | GET /distribuidores/{userId}/cartera |
| Add company to portfolio | POST /distribuidores/{userId}/cartera |
| Remove company from portfolio | DELETE /distribuidores/{userId}/cartera/{companyId} |
The portfolio is a distributor’s set of client companies; their permissions are scoped to those companies.
Commissions
Section titled “Commissions”Backoffice → Commissions. Commissions are computed on the control numbers issued by the distributor’s portfolio.
| Action | Endpoint | Role |
|---|---|---|
| List plans | GET /comisiones/planes | Both (distributor sees own) |
| Define plan | POST /comisiones/planes | SUPERADMIN only |
| Accrued summary | GET /comisiones/resumen (distribuidor, periodo) | Both |
| Settlements | GET /comisiones/liquidaciones | Both |
| Settle (mark PAID) | POST /comisiones/liquidar | SUPERADMIN only |
The plan (ComisionPlan) has Modo (PORCENTAJE or MONTO), Porcentaje,
MontoPorControl/MontoPorBloque. Settlements move through DEVENGADA → PENDIENTE →
PAGADA.