Skip to content
ES

Backoffice manual

The backoffice (/v1/imprenta/backoffice) is the print administration console. Two roles:

RoleCan
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).

Backoffice → Series.

ActionEndpointRole
List seriesGET /series (filter companyId, q)Both
Generate seriesPOST /seriesSUPERADMIN only
Update (name, prefix, state)PUT /series/{id}Both (distributor portfolio only)
Reassign to another companyPOST /series/{id}/reasignarSUPERADMIN only
Extend the range topPOST /series/{id}/extenderSUPERADMIN only

Each series has Serie, TipoDocumento, Prefijo, range [Desde, Hasta], Correlativo (last consumed), Restantes and Estado (ACTIVA · AGOTADA · SUSPENDIDA).

Series are assigned to a client company (CompanyId). Reassign moves a series to another company; extend raises the top (Hasta) without reassigning or recreating.

Backoffice → Consumption. Each control number issued creates a billable event in imprenta."ConsumoControl".

ViewEndpoint
Event detailGET /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).

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.

Backoffice → Integrators. An integrator is a client company that consumes the third-party API (/api/*).

ActionEndpoint
List / createGET/POST /integradores
Detail / update / suspendGET/PUT/DELETE /integradores/{id}
List tokensGET /integradores/{id}/tokens
Issue token (returns the secret once)POST /integradores/{id}/tokens
Revoke tokenPOST /integradores/{id}/tokens/{tid}/revocar
Integrator usersGET/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.

Backoffice → Distributors (SUPERADMIN administers; distributor queries their portfolio).

ActionEndpoint
List / create distributorGET/POST /distribuidores
Suspend distributorDELETE /distribuidores/{userId}
View portfolioGET /distribuidores/{userId}/cartera
Add company to portfolioPOST /distribuidores/{userId}/cartera
Remove company from portfolioDELETE /distribuidores/{userId}/cartera/{companyId}

The portfolio is a distributor’s set of client companies; their permissions are scoped to those companies.

Backoffice → Commissions. Commissions are computed on the control numbers issued by the distributor’s portfolio.

ActionEndpointRole
List plansGET /comisiones/planesBoth (distributor sees own)
Define planPOST /comisiones/planesSUPERADMIN only
Accrued summaryGET /comisiones/resumen (distribuidor, periodo)Both
SettlementsGET /comisiones/liquidacionesBoth
Settle (mark PAID)POST /comisiones/liquidarSUPERADMIN only

The plan (ComisionPlan) has Modo (PORCENTAJE or MONTO), Porcentaje, MontoPorControl/MontoPorBloque. Settlements move through DEVENGADAPENDIENTEPAGADA.