---
title: "Dua Generate"
method: POST
path: "/api/declarations/dua-generate"
tags: ["Declarations"]
---

# Dua Generate

`POST /api/declarations/dua-generate`

Generate a DUA (Declaração Única Automóvel) PDF document.

Fills a DUA PDF template with buyer/seller data, vehicle info,
banking details, and current date. Creates a Registos record
and uploads the filled PDF to S3.

PARTIAL GENERATION: all four ids are OPTIONAL. The user fills whatever part of
the dossier they have and the rest of the official form is left blank, exactly
as a human hand-filling it would. An id that IS supplied must still resolve
inside the caller's company — an unresolvable id is a 400, never a blank field.

Body (all optional):
    sujeito_ativo_id: int — Buyer client ID
    sujeito_passivo_id: int — Seller client ID
    vehicle_id: int — Vehicle ID
    restituicao_pv_id: int — PV ID for banking/restitution data

Returns:
    {status, registo_id, document_id, s3_url, pdf_url, is_partial, message}

## Headers

- `x-api-token` string, nullable

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
