Skip to main content
Finalization is the last stage of the workflow. The compliance rollup transitions to VALID or INVALID, a final invoice is submitted (matching the VAT decision), and NT24 generates the Export File — the signed PDF your customer’s tax authority expects.

Decision branch

Once the earlier modules are complete, compliance settles on a verdict:
complianceStatusdecisionFinal invoice requirement
VALIDVALID_EXPORTVAT-exempt final invoice
INVALIDVAT_APPLICABLEVAT-applied final invoice
Webhook subscribers learn the outcome via compliance.decision_made. Pollers see decision populated on GET .../compliance.

Submit the final invoice

curl -X POST "https://api.novatrade24.com/v1/partners/${SELLER_ID}/orders/${ORDER_UUID}/finalization/final-invoice" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "FINAL",
    "invoiceDate": "2026-04-25",
    "invoiceNumber": "INV-2026-04-00451-F",
    "vatIncluded": false,
    "marginScheme": false,
    "amount": { "value": 1850000, "currency": "EUR" }
  }'
Upload the PDF alongside:
curl -X POST "https://api.novatrade24.com/v1/partners/${SELLER_ID}/orders/${ORDER_UUID}/invoice/documents" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "type=SHIPMENT_INVOICE" \
  -F "documentDate=2026-04-25" \
  -F "file=@/path/to/final-invoice.pdf"
When the final invoice is added, the Export File regenerates to include it — a new document version supersedes the previous.

Export File

The Export File is a signed PDF bundling:
  • Buyer identification and KYC validation results.
  • Transaction details (VIN(s), purchase date, amount).
  • Invoice(s) preliminary and final.
  • Payment validation (amount, IBAN, proof).
  • Transport proof (CMR or pickup declaration, delivery confirmation).
  • VIES check history.
  • Compliance decision rationale (VALID_EXPORT or VAT_APPLICABLE).
It is generated for both VALID and INVALID outcomes — in the INVALID case it documents why VAT was applied, which tax authorities also require as an audit artifact.

Auto-generation

Generation kicks off automatically when:
  • complianceStatus transitions to VALID (first time).
  • complianceStatus transitions to INVALID.
  • Final invoice is added and supersedes the earlier version.
  • complianceStatus recomputes from INCOMPLETE back to a terminal state (e.g. a missing doc was uploaded late).
Each generation is a Temporal workflow. You don’t need to trigger it manually in the happy path.

Force regeneration

For exceptional cases (PDF corrupted, template updated, compliance data manually adjusted):
curl -X POST "https://api.novatrade24.com/v1/partners/${SELLER_ID}/orders/${ORDER_UUID}/finalization/regenerate-export" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Idempotency-Key: $(uuidgen)"
Returns 202 Accepted. New version is available shortly; webhook export_file.generated fires.

Status and download

curl "https://api.novatrade24.com/v1/partners/${SELLER_ID}/orders/${ORDER_UUID}/finalization/export-file" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}"
Response:
{
  "status": "READY",
  "version": 2,
  "downloadUrl": "/v1/documents/doc_xyz123/download",
  "generatedAt": "2026-04-25T14:30:00Z",
  "decision": "VALID_EXPORT",
  "supersededVersions": [
    {
      "version": 1,
      "generatedAt": "2026-04-24T16:00:00Z",
      "archivedReason": "final_invoice_added"
    }
  ]
}
Download the PDF:
curl "https://api.novatrade24.com/v1/documents/doc_xyz123/download" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -o export-file-v2.pdf

Statuses

statusMeaning
NOT_ELIGIBLECompliance not yet terminal. Cannot generate.
GENERATINGWorkflow in progress. Typically < 30s.
READYPDF available for download.
PENDINGQueued for regeneration.
FAILEDTerminal generation failure. Webhook export_file.generation_failed fires (Phase 2+ catalog). Use manual regenerate to retry.

Versioning & immutability

Every generation produces a new document version. Previous versions are marked ARCHIVED (not deleted) so the tax-authority audit trail is preserved. Envers retains full revision history. Your integration should download the latest version (status: READY) by default. Older versions remain accessible if you saved their documentId previously.

Webhook for real-time download

{
  "type": "export_file.generated",
  "data": {
    "orderUuid": "o1p2q3r4-...",
    "documentId": "doc_xyz123",
    "version": 2,
    "downloadUrl": "/v1/documents/doc_xyz123/download",
    "generatedAt": "2026-04-25T14:30:00Z",
    "decision": "VALID_EXPORT"
  }
}
Download immediately on receipt; the URL is stable for the document’s lifetime.

Next

Webhook setup

Subscribe to export_file.generated.

Compliance rollup

Understand what drives the decision.