Aller au contenu principal
Facturation

Modifier un brouillon de facture

Modifie un BROUILLON : un champ absent garde sa valeur, un champ présent la remplace. activityIds remplace l’ensemble des lignes (une ligne retirée redevient à facturer). L’échéance est recalculée depuis la condition de paiement, sauf condition custom. Changer de devise sans fxRate retire le taux. Une facture émise rend 409 invoice_not_draft.

PATCH
/v1/invoices/{id}
Authorizationstringheaderobligatoire

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

idstringobligatoire
if-matchstringheader

Version de la facture, telle que l’en-tête ETag l’a rendue à la lecture. Quand elle est fournie, la modification n’est appliquée que si la facture n’a pas changé depuis : sinon la réponse est 412 et le brouillon reste intact.

Corps

application/json
activityIdsstring[]
Required array length: 1 - 200
billingContactIdstring
Motif: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
currencyenum<string>
Options disponibles: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL
dueDatestring | null
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
freeTextstring | null
Maximum string length: 5000
fxRatenumber | null
Plage requise: 0 < x
fxRateSourceenum<string> | null
Options disponibles: ecb, manual
languageenum<string>
Options disponibles: fr, en
paymentTermsenum<string> | null
Options disponibles: on_receipt, net_7, net_15, net_30, net_30_eom, net_45, net_45_eom, net_60, custom

Réponse

application/json
RateLimit-Limitintegerheader

Plafond de requêtes de la fenêtre d’une minute, pour le compteur le plus proche de sa limite (client ou cabinet).

RateLimit-Remainingintegerheader

Requêtes encore permises dans la fenêtre en cours.

RateLimit-Resetintegerheader

Secondes avant la remise à zéro du compteur.

ETagstringheader

Version de la ressource, opaque. À renvoyer dans If-Match pour qu’une modification soit refusée (412) si la ressource a changé depuis.

baseCurrencyenum<string>obligatoire

Devise de base du cabinet : celle de totals, des lignes, des avoirs, de remainingAmountCents, remainingNetCents et du amountCents des règlements. currency est celle du DOCUMENT.

Options disponibles: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL
billingContactIdstring | nullobligatoire
Motif: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
billingContactNamestring | nullobligatoire
createdAtstringobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
createdBystring | nullobligatoire
Motif: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
createdByNamestring | nullobligatoire
creditNoteErrorstring | nullobligatoire
creditNoteNumberstring | nullobligatoire
creditNoteProviderIdstring | nullobligatoire
creditNoteReasonstring | nullobligatoire
creditNotesobject[]obligatoire
creditedAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
currencyenum<string>obligatoire
Options disponibles: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL
currencyRemainingAmountCentsinteger | nullobligatoire

Reste dû du document ; null si la devise est la base, ou inconnu. Entier en unités mineures de currency (devise du document).

Plage requise: -999999999999999 <= x <= 999999999999999
currencyTotalTtcCentsinteger | nullobligatoire

Total TTC du document ; null si la devise est la base, ou inconnu. Entier en unités mineures de currency (devise du document).

Plage requise: -999999999999999 <= x <= 999999999999999
documentsobject[]obligatoire
dueDatestring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
einvoicingBusinessStateenum<string> | nullobligatoire
Options disponibles: pending, delivered, accepted, rejected, paid, not_transmitted
einvoicingInvoiceNumberstring | nullobligatoire
einvoicingProviderInvoiceIdstring | nullobligatoire
einvoicingStatusstring | nullobligatoire
einvoicingSubmittedAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
einvoicingSyncedAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
freeTextstring | nullobligatoire
fxRatenumber | nullobligatoire
Plage requise: 0 < x
fxRateSourceenum<string> | nullobligatoire
Options disponibles: ecb, manual
idstringobligatoire
Motif: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
issueErrorstring | nullobligatoire
issuedAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
languageenum<string>obligatoire
Options disponibles: fr, en
linesobject[]obligatoire
matterIdstringobligatoire
Motif: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
matterNamestring | nullobligatoire
matterReferencestring | nullobligatoire
paidAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
paymentStateenum<string> | nullobligatoire
Options disponibles: paid, partially_paid, unpaid, late, cancelled
paymentStatusenum<string> | nullobligatoire
Options disponibles: paid, partially_paid, unpaid, late, cancelled
paymentStatusRawstring | nullobligatoire
paymentSyncedAtstring | nullobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
paymentTermsenum<string> | nullobligatoire
Options disponibles: on_receipt, net_7, net_15, net_30, net_30_eom, net_45, net_45_eom, net_60, custom
paymentsobject[]obligatoire
providerenum<string> | nullobligatoire
Options disponibles: pennylane, import, sellsy, qonto
providerInvoiceIdstring | nullobligatoire
providerInvoiceNumberstring | nullobligatoire
recurringPlanIdstring | nullobligatoire
Motif: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
remainingAmountCentsinteger | nullobligatoire

Reste dû BRUT (avant avoirs) ; null = inconnu. Entier en unités mineures de baseCurrency.

Plage requise: -999999999999999 <= x <= 999999999999999
remainingNetCentsinteger | nullobligatoire

Reste dû NET des avoirs, plancher à zéro ; null = inconnu. Entier en unités mineures de baseCurrency.

Plage requise: -999999999999999 <= x <= 999999999999999
remindersobject[]obligatoire
remindersEnabledbooleanobligatoire
specialMentionstring | nullobligatoire
statusenum<string>obligatoire
Options disponibles: draft, issuing, issued, crediting, partially_credited, cancelled
totalsobjectobligatoire

Totaux de la facture. Entier en unités mineures de baseCurrency.

updatedAtstringobligatoire
Motif: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$