Passer au contenu

🧾 Create a credit note for an outgoing invoice

Requête

Create a credit note (avoir) cancelling an existing OUTGOING invoice.

The credit note is derived from the original invoice document, keeping the same format and profile (Factur-X, UBL, or CII), the same parties, lines and amount signs. Only the invoice number (BT-1), the type code (BT-3 = 381), the issue date (BT-2) and the reference to the cancelled invoice (BG-3) differ — as per the dominant French practice (XP Z12-012).

The credit note is stored and submitted like any other outgoing invoice; the returned invoice_id can be used with the download and lifecycle endpoints.

Sécurité
APIKeyHeader
Chemin
invoice_idstring(Invoice 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
invoice_numberstring, non-empty(Invoice Number)obligatoire

Invoice number of the credit note (BT-1). Must follow the issuer's chronological invoice numbering sequence.

issue_datestring or null(Issue Date)
Any of:

Issue date of the credit note (BT-2). Defaults to today.

string (date)
curl -i -X POST \
  'https://pdp.seqino.dev/api/invoicing/invoices/{invoice_id}/credit_note' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-PDP-Client-Id: client_abc123' \
  -d '{
    "invoice_number": "string",
    "issue_date": "2019-08-24"
  }'

Réponses

Successful Response

Corpsapplication/json
invoice_idstring(Invoice Id)obligatoire

Generated invoice ID

statusstring(InvoiceStatus)obligatoire

Current invoice status

Enum:"draft""submitted""received""processed""accepted""partially_accepted""refused""paid""rejected""cashed"
file_namestring(File Name)obligatoire

Original file name

file_sizeinteger(File Size)obligatoire

File size in bytes

extracted_dataInvoiceSummary (object) or null
Any of:

Summary of the submitted invoice

en16931_invoiceEN16931InvoiceModel (object) or null
Any of:

Final invoice model with system-generated invoice number and full EN16931 compliance.

Response
{ "invoice_id": "string", "status": "draft", "file_name": "string", "file_size": 0, "extracted_data": { "invoice_id": "string", "invoice_number": "string", "type_code": "string", "status": "draft", "direction": "incoming", "original_invoice_type": "CII_EN16931_FR", "seller": {}, "buyer": {}, "buyer_reference": "string", "currency_code": "string", "total_amount": 0, "issue_date": "2019-08-24", "seller_identifier": "string", "seller_identifier_scheme": "string", "buyer_identifier": "string", "buyer_legal_registration_id": "string", "created_at": "string", "status_details": {} }, "en16931_invoice": { "specification_identifier": "string", "issue_date": "2019-08-24", "due_date": "2019-08-24", "type_code": "380", "currency_code": "string", "tax_currency_code": "string", "tax_point_date": "2019-08-24", "value_added_tax_point_date": "2019-08-24", "business_process_type": "B1", "buyer_reference": "string", "purchase_order_reference": "string", "sales_order_reference": "string", "receiving_advice_reference": "string", "despatch_advice_reference": "string", "tender_or_lot_reference": "string", "invoice_object_identifier": "string", "buyer_accounting_reference": "string", "project_reference": "string", "contract_reference": "string", "seller": {}, "buyer": {}, "payee": {}, "seller_tax_representative": {}, "invoice_lines": [], "vat_breakdowns": [], "document_totals": {}, "payment_terms": {}, "payment_means_type_code": "string", "payment_means_text": "string", "remittance_information": "string", "payment_account_identifier": "string", "payment_account_name": "string", "payment_service_provider_identifier": "string", "notes": [], "order_reference": "string", "invoice_note": "string", "preceding_invoice_reference": "string", "preceding_invoice_issue_date": "2019-08-24", "delivery": {}, "invoice_number": "string", "processing_timestamp": "2019-08-24T14:15:22Z", "invoice_period_start_date": "2019-08-24", "invoice_period_end_date": "2019-08-24", "document_level_allowance_amount": "string", "document_level_charge_amount": "string", "document_allowances": [], "document_charges": [], "en16931_validation_status": "string", "validation_errors": [], "status_details": {} } }