Passer au contenu

✏️ Update a draft invoice

Requête

Update an existing draft invoice.

Completely replaces the draft content with the provided data. The draft will be re-validated after the update.

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
specification_identifierstring or null(Specification Identifier)
Any of:

Specification identifier (BT-24). None means no profile has been chosen yet - resolved to a concrete value at finalization (see resolve_draft_invoice_type).

string
issue_datestring, (date)(Issue Date)obligatoire

Invoice issue date (BT-2)

due_datestring or null(Due Date)
Any of:

Payment due date (BT-9)

string (date)
type_codestring(InvoiceTypeCode)obligatoire

Invoice type code (BT-3)

Enum:"380""381""383""384""389"
currency_codestring(Currency Code)obligatoire

Invoice currency code (BT-5) - ISO 4217

tax_currency_codestring or null(Tax Currency Code)
Any of:

VAT accounting currency code (BT-6) - ISO 4217

string
tax_point_datestring or null(Tax Point Date)
Any of:

Tax point date (BT-7)

string (date)
value_added_tax_point_datestring or null(Value Added Tax Point Date)
Any of:

Value added tax point date (BT-8)

string (date)
business_process_typeFRBusinessProcessType (string) or PeppolProcessID (string) or null(Business Process Type)
Any of:

BT-23 values for French invoice types (BR-FR-08 cadre de facturation).

First letter: B=Biens, S=Services, M=Mixte (biens+services non accessoires).

string(FRBusinessProcessType)
Enum:"B1""S1""M1""B2""S2""M2""S3""B4""S4""M4"
buyer_referencestring or null(Buyer Reference)
Any of:

Buyer reference (BT-10) - An identifier assigned by the buyer used for internal routing. Either buyer_reference or purchase_order_reference must be provided.

string
purchase_order_referencestring or null(Purchase Order Reference)
Any of:

Purchase order reference (BT-13)

string
sales_order_referencestring or null(Sales Order Reference)
Any of:

Sales order reference (BT-14)

string
receiving_advice_referencestring or null(Receiving Advice Reference)
Any of:

Receiving advice reference (BT-15)

string
despatch_advice_referencestring or null(Despatch Advice Reference)
Any of:

Despatch advice reference (BT-16)

string
tender_or_lot_referencestring or null(Tender Or Lot Reference)
Any of:

Tender or lot reference (BT-17)

string
invoice_object_identifierstring or null(Invoice Object Identifier)
Any of:

Invoiced object identifier (BT-18)

string
buyer_accounting_referencestring or null(Buyer Accounting Reference)
Any of:

Buyer accounting reference (BT-19)

string
project_referencestring or null(Project Reference)
Any of:

Project reference (BT-11)

string
contract_referencestring or null(Contract Reference)
Any of:

Contract reference (BT-12)

string
sellerobject(Seller)obligatoire

Seller party information (BG-4)

buyerobject(Buyer)obligatoire

Buyer party information (BG-7)

payeePayee (object) or null
Any of:

Payee party (BG-10) — only required if different from seller.

seller_tax_representativeSellerTaxRepresentative (object) or null
Any of:

Seller tax representative party (BG-11).

Required when the Seller (BG-4) has appointed a tax representative. EN16931 BR-18/BR-19/BR-20: when present, the name (BT-62), postal address (BG-12) and the country code (BT-69) within it are mandatory; those are modelled here as required fields so construction enforces them.

invoice_linesArray of objects, non-empty(Invoice Lines)obligatoire

Invoice lines (BG-25)

vat_breakdownsArray of objects(Vat Breakdowns)obligatoire

VAT breakdown (BG-23)

document_totalsobject(DocumentTotals)obligatoire

Document level totals (BG-22)

payment_termsPaymentTerms (object) or null
Any of:

Payment instructions (BG-16)

payment_means_type_codestring or null(Payment Means Type Code)
Any of:

Payment means type code (BT-81)

string
payment_means_textstring or null(Payment Means Text)
Any of:

Payment means text (BT-82)

string
remittance_informationstring or null(Remittance Information)
Any of:

Remittance information (BT-83)

string
payment_account_identifierstring or null(Payment Account Identifier)
Any of:

Payment account identifier / IBAN (BT-84)

string
payment_account_namestring or null(Payment Account Name)
Any of:

Payment account name (BT-85)

string
payment_service_provider_identifierstring or null(Payment Service Provider Identifier)
Any of:

Payment service provider identifier / BIC (BT-86)

string
notesArray of objects or null(Notes)
Any of:

Invoice notes with optional subject codes (BT-22)

order_referencestring or null(Order Reference)
Any of:

Deprecated: use purchase_order_reference instead

string
invoice_notestring or null(Invoice Note)
Any of:

Deprecated: use notes instead. Invoice note (BT-22)

string
preceding_invoice_referencestring or null(Preceding Invoice Reference)
Any of:

For credit notes - reference to original invoice (BT-25)

string
preceding_invoice_issue_datestring or null(Preceding Invoice Issue Date)
Any of:

For credit notes - issue date of the referenced original invoice (BT-26)

string (date)
deliveryDelivery (object) or null
Any of:

Delivery information (BG-13) including the deliver to address (BG-15).

Models the EN16931 DELIVERY INFORMATION group end-to-end so it survives UBL/CII round-trips. Excludes the invoicing period (BG-14, BT-73/74) which is tracked separately on the invoice model.

curl -i -X PUT \
  'https://pdp.seqino.dev/api/drafts/{draft_id}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-PDP-Client-Id: client_abc123' \
  -d '{
    "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": {
      "name": "string",
      "postal_address": {
        "street_name": "string",
        "additional_street_name": "string",
        "city_name": "string",
        "postal_zone": "string",
        "country_subdivision": "string",
        "country_code": "string"
      },
      "electronic_address": {
        "scheme_id": "string",
        "value": "string"
      },
      "tax_registrations": [
        {
          "scheme_id": "string",
          "value": "string"
        }
      ],
      "legal_registration_name": "string",
      "trading_name": "string",
      "party_identifier": "string",
      "party_identifier_scheme": "string",
      "seller_identifier": "string",
      "seller_identifier_scheme": "string",
      "seller_vat_identifier": "string",
      "seller_tax_registration_identifier": "string",
      "seller_additional_legal_information": "string"
    },
    "buyer": {
      "name": "string",
      "postal_address": {
        "street_name": "string",
        "additional_street_name": "string",
        "city_name": "string",
        "postal_zone": "string",
        "country_subdivision": "string",
        "country_code": "string"
      },
      "electronic_address": {
        "scheme_id": "string",
        "value": "string"
      },
      "tax_registrations": [
        {
          "scheme_id": "string",
          "value": "string"
        }
      ],
      "legal_registration_name": "string",
      "trading_name": "string",
      "party_identifier": "string",
      "party_identifier_scheme": "string",
      "buyer_identifier": "string",
      "buyer_identifier_scheme": "string",
      "buyer_legal_registration_identifier": "string",
      "buyer_vat_identifier": "string"
    },
    "payee": {
      "name": "string",
      "identifier": "string",
      "identifier_scheme": "string",
      "legal_registration_id": "string",
      "legal_registration_id_scheme": "string"
    },
    "seller_tax_representative": {
      "name": "string",
      "vat_identifier": "string",
      "postal_address": {
        "street_name": "string",
        "additional_street_name": "string",
        "city_name": "string",
        "postal_zone": "string",
        "country_subdivision": "string",
        "country_code": "string"
      }
    },
    "invoice_lines": [
      {
        "line_id": "string",
        "invoiced_quantity": 0,
        "unit_of_measure": "string",
        "line_net_amount": 0,
        "item_name": "string",
        "item_description": "string",
        "item_seller_identifier": "string",
        "item_buyer_identifier": "string",
        "item_standard_identifier": "string",
        "item_standard_identifier_scheme": "string",
        "item_classification_identifiers": [
          "string"
        ],
        "item_price": 0,
        "item_price_discount": 0,
        "item_gross_price": 0,
        "item_price_base_quantity": 0,
        "item_price_base_quantity_unit": "string",
        "vat_category_code": "S",
        "vat_rate": 0,
        "allowances": [
          {
            "amount": 0,
            "base_amount": 0,
            "percentage": 0,
            "reason": "string",
            "reason_code": "string"
          }
        ],
        "charges": [
          {
            "amount": 0,
            "base_amount": 0,
            "percentage": 0,
            "reason": "string",
            "reason_code": "string"
          }
        ]
      }
    ],
    "vat_breakdowns": [
      {
        "category_code": "S",
        "rate": 0,
        "taxable_amount": 0,
        "tax_amount": 0,
        "exemption_reason": "string",
        "exemption_reason_code": "string"
      }
    ],
    "document_totals": {
      "sum_of_line_net_amounts": 0,
      "sum_of_allowances": 0,
      "sum_of_charges": 0,
      "invoice_total_without_vat": 0,
      "invoice_total_vat_amount": 0,
      "invoice_total_with_vat": 0,
      "paid_amount": 0,
      "rounding_amount": 0,
      "amount_due_for_payment": 0
    },
    "payment_terms": {
      "description": "string",
      "due_date": "2019-08-24"
    },
    "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": [
      {
        "content": "string",
        "subject_code": "string"
      }
    ],
    "order_reference": "string",
    "invoice_note": "string",
    "preceding_invoice_reference": "string",
    "preceding_invoice_issue_date": "2019-08-24",
    "delivery": {
      "deliver_to_party_name": "string",
      "location_identifier": "string",
      "location_identifier_scheme": "string",
      "actual_delivery_date": "2019-08-24",
      "deliver_to_address": {
        "address_line_1": "string",
        "address_line_2": "string",
        "address_line_3": "string",
        "city_name": "string",
        "postal_zone": "string",
        "country_subdivision": "string",
        "country_code": "string"
      }
    }
  }'

Réponses

Draft updated successfully

Corpsapplication/json
any
Response
// Aucun exemple de réponse