Passer au contenu

✅ Validate a draft and submit as invoice

Requête

Validate a draft, finalize it with the provided invoice number, and submit it.

Generates XML in the requested format and submits the invoice for processing. The draft record is promoted in-place (same ID).

Sécurité
APIKeyHeader
Chemin
draft_idstring(Draft Id)obligatoire
En-têtes
X-PDP-Client-Idstring(X-Pdp-Client-Id)obligatoire

ID of the PDP Client for which the operation is performed

Examples:
Sandbox client
client_abc123
Corpsapplication/jsonobligatoire
formatstring(InvoiceFormat)obligatoire
Enum:"factur-x""ubl""cii"
invoice_numberstring(Invoice Number)obligatoire
curl -i -X POST \
  'https://pdp.seqino.dev/api/drafts/{draft_id}/validate' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-PDP-Client-Id: client_abc123' \
  -d '{
    "format": "factur-x",
    "invoice_number": "string"
  }'

Réponses

Successful Response

Corpsapplication/json
invoice_idstring(Invoice Id)obligatoire
statusstring(InvoiceStatus)obligatoire

Invoice lifecycle status.

Aligned with DGFIP e-invoicing status codes (statuts de cycle de vie):

  • draft — Pre-submission state
  • submitted (200) — Invoice deposited and validated by the sending PDP (mandatory)
  • received (202) — Invoice received by the receiving PDP
  • processed — Invoice accepted for routing
  • accepted (205) — Recipient accepted the invoice
  • partially_accepted (206) — Recipient approved only part of the invoice
  • refused (210) — Recipient refused the invoice (mandatory)
  • paid (211) — Buyer marked the invoice as paid
  • rejected (213) — PDP detected an anomaly on the invoice (mandatory)
  • cashed (212) — Supplier confirmed receipt of payment (mandatory)
Enum:"draft""submitted""received""processed""accepted""partially_accepted""refused""paid""rejected""cashed"
Response
{ "invoice_id": "string", "status": "draft" }