Declarations

Dua Readiness

Per-entity readiness check for DUA generation.

For each ID provided, returns the hydrated entity data (already shaped for the DUA template) plus a list of required fields that are empty. Frontend uses this to drive completeness chips and the "what's missing" expandable panel on /dua-declarations.

Multi-tenancy: company_id is taken from the JWT and passed to every DB function. PV identity hydration is gated behind the banking lookup (which enforces IDempresa) so a foreign PV can never leak.

get/api/declarations/dua-readiness

Query parameters

sujeito_ativo_idinteger nullable
sujeito_passivo_idinteger nullable
vehicle_idinteger nullable
restituicao_pv_idinteger nullable

Headers

x-api-tokenstring nullable

Response

Successful Response

{"stackTrail":"paths:/api/declarations/dua-readiness:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes