Preflight the accounting routes of a ledger
Reports whether the plugin can post against one (organization, ledger) of the caller’s tenant, and the state of each canonical flow there: BOLETO_IN, PAYMENT_OUT and DARF_OUT, each complete, absent, incomplete (with the missing route codes), ambiguous (with the repeated codes) or malformed (with the code and the reason).
READ-ONLY. It reads the ledger live, with GET requests only, and bypasses the accounting routes cache: nothing is posted, cached or stored, so it is safe to run right after provisioning and as often as needed.
ready is the verdict on the WHOLE ledger: a flow reported complete in a ledger that is not ready still does not post. reason uses the vocabulary of the accounting_routes check of /readyz/tenant.
The ACCOUNTING_ROUTES_ENABLED knob is REPORTED, NOT OBEYED: the verdict is judged as if it were on, because this is what runs before it is turned on, and its current value is in accountingRoutesEnabled.
The organization comes from the X-Organization-Id header (400 PBP-0025) and the ledger from the ledgerId query parameter (400 PBP-0026). An organization or ledger the ledger does not know, for this tenant, is answered 404 without saying which.
Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
Midaz organization of the ledger to inspect. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025. Declared optional on the schema so that refusal keeps its own code instead of the schema's PBP-0001.
Parámetros de consulta
Midaz ledger to inspect. Required: absent, blank or not a canonical UUID is refused with 400 PBP-0026. Declared optional on the schema so that refusal keeps its own code.
Respuesta
OK
Whether ACCOUNTING_ROUTES_ENABLED is on in this deployment. Reported, not obeyed: the verdict is judged as if it were on.
One entry per canonical flow, in the order BOLETO_IN, PAYMENT_OUT, DARF_OUT. Empty when the route inventory could not be read.
Ledger the preflight read, in canonical form.
Organization the preflight read, in canonical form.
Whether the plugin can post against this ledger as far as accounting routes are concerned. It is the verdict on the whole ledger: a complete flow in a ledger that is not ready does not post.
Ledger routes carrying a plugin marker the contract does not know.
The ledger's validateRoutes setting, or null when the settings could not be read.
Class of the verdict, in the vocabulary of the accounting_routes check of /readyz/tenant.

