> For the complete documentation index, see [llms.txt](https://docs.abby.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abby.fr/reference-de-lapi/devis.md).

# Devis

Créez un devis, faites-le signer, puis facturez-le avec ou sans acompte.

Un devis est un document associé à un client : un contact ou une organisation. Il contient des lignes et des informations générales. Les mêmes routes servent aux bons de commande : le champ `estimateType` vaut `estimate` (devis) ou `purchase_order` (bon de commande).

Un devis n'a pas de route de lecture propre. Pour le lire, utilisez la route générique `GET /v2/billing/{documentId}`, décrite sur la page [Documents de facturation](https://docs.abby.fr/reference-de-lapi/documents-de-facturation.md).

## Comprendre le cycle de vie

1. Le devis est créé en brouillon (`draft`).
2. Une fois finalisé (`finalized`), il reçoit son numéro et n'est plus modifiable.
3. Le client le signe (`signed`) ou le refuse (`refused`). Ces deux décisions sont réversibles : `unsign` et `unrefuse` ramènent le devis à l'état `finalized`.
4. Un devis signé peut donner lieu à des acomptes, puis à la facture finale.

Pas à pas : [Du devis à la facture, avec un acompte](https://docs.abby.fr/guides/devis-acompte-facture.md).

## Créer un devis

L'identifiant `customerId` est un `contactId` ou un `organizationId`. Le corps est obligatoire. Son seul champ, `estimateType`, est facultatif : `estimate` (devis, valeur par défaut) ou `purchase_order` (bon de commande). La route répond `201` avec le devis en brouillon.

```bash
curl -X POST "https://api.abby.fr/v2/billing/estimate/$CUSTOMER_ID" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "estimateType": "estimate" }'
```

## POST /v2/billing/estimate/{customerId}

> Create a new estimate with a customerId that can be a contactId or an organizationId

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"CreateEstimateByCustomerIdDto":{"type":"object","properties":{"estimateType":{"default":"estimate","allOf":[{"$ref":"#/components/schemas/EstimateType"}]}}},"EstimateType":{"type":"string","enum":["estimate","purchase_order"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{customerId}":{"post":{"operationId":"EstimateController_createEstimateByContactOrOrganizationId_v2","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEstimateByCustomerIdDto"}}}},"responses":{"201":{"description":"Estimate created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"summary":"Create a new estimate with a customerId that can be a contactId or an organizationId","tags":["estimate"]}}}}
```

## Modifier les lignes

Les lignes d'un devis se modifient avec la route commune à tous les documents. Le détail des champs d'une ligne est sur la page [Documents de facturation](https://docs.abby.fr/reference-de-lapi/documents-de-facturation.md).

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/$ESTIMATE_ID/lines" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lines": [
      {
        "designation": "Création du site vitrine",
        "quantity": 1,
        "quantityUnit": "fixed_rate",
        "unitPrice": 250000,
        "type": "service_delivery",
        "vatCode": "FR_2000"
      }
    ]
  }'
```

## PATCH /v2/billing/{billingId}/lines

> Update billing lines

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateBillingLinesDto":{"type":"object","properties":{"lines":{"description":"Array of billing lines, each representing a product or service","type":"array","items":{"$ref":"#/components/schemas/UpdateLineDto"}},"discount":{"description":"Optional discount to be applied to the entire billing","allOf":[{"$ref":"#/components/schemas/DiscountDto"}]}},"required":["lines"]},"UpdateLineDto":{"type":"object","properties":{"generatedId":{"type":"string","description":"Warning: Client-side generated line id. This field will be deprecated and will be removed in the future."},"productId":{"type":"string","description":"Unique identifier of the product, if applicable. Must be a UUID when it is the only source of the line VAT rate (no vatCode, not a disbursement)."},"unitPrice":{"type":"number","description":"Price per unit in cents (e.g., 1500 for 15.00 euros)"},"quantity":{"type":"number","description":"Quantity of the product or service"},"quantityUnit":{"description":"Unit of measurement for the quantity (e.g., UNIT, HOUR, KILOGRAM)","nullable":true,"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string","description":"Name or short description of the product or service"},"reference":{"type":"string","description":"Product reference or SKU, if applicable"},"description":{"type":"string","description":"Detailed description of the product or service"},"type":{"description":"Type of the product or service (e.g., SALE_OF_GOODS, SERVICE)","nullable":true,"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"description":"VAT code applicable to the product or service. Required on a line without productId, unless its type is DISBURSEMENT (always 0 %). When omitted with a productId, it is resolved from the catalog product — falling back to the standard rate when that product cannot be read.","allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"description":"Personal service activity only available for products compatible with the tax credit","allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"discount":{"description":"Optional discount to be applied to the billing line","allOf":[{"$ref":"#/components/schemas/DiscountDto"}]},"isDeliveryOfGoods":{"type":"boolean","description":"Mark a product line as delivery of goods to display it on document"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT). Requires the tax included unit price feature to be enabled.","default":false}},"required":["unitPrice","quantity","quantityUnit","designation","type"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ReadInvoiceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"isOnlinePaymentActivated":{"type":"boolean"},"isFinalInvoice":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/ReadInvoiceTotalDto"},"reminder":{"$ref":"#/components/schemas/ReminderDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplayBillingSettingsDto"},"paymentRequest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentRequestDto"}]},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceNumbers":{"description":"Numbers of the advances associated with this invoice","type":"array","items":{"type":"string"}},"frequency":{"$ref":"#/components/schemas/FrequencyDto"},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDiscountDisbursement":{"type":"boolean"},"expiredAt":{"type":"number"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","dueAt","isReminderActivated","isOnlinePaymentActivated","isFinalInvoice","lines","total","displaySettings","hasAssociatedTransaction","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ReadInvoiceTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ReadInvoiceTotalWithoutConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ReadInvoiceTotalWithoutConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"ReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean"},"frequency":{"allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number"},"active":{"type":"boolean"},"recipients":{"type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active","recipients"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplayBillingSettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayEstimateNumber":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"PaymentRequestDto":{"type":"object","properties":{"idDemandePaiement":{"type":"string"},"dateDebutEmploi":{"type":"number"},"dateFinEmploi":{"type":"number"},"dateVirement":{"type":"number"},"advanceAlreadyPayed":{"type":"number"},"advancePaymentDate":{"type":"number"},"mntVirement":{"type":"number"},"statut":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestStatusUrssafTp"}]}},"required":["dateDebutEmploi","dateFinEmploi"]},"PaymentRequestStatusUrssafTp":{"type":"string","enum":[0,"10","20","30","40","50","60","70","110","111","120","112","ERR_PARTICULIER_INCONNU","ERR_CMPT_BLOQUE","ERR_FACTURE_DOUBLON","ERR_NBRE_PREST_MAX","ERR_DATE_FUTUR","ERR_DATE_PAIEMENT_AVANT_EXP","ERR_PERIODE_EMPLOI_MOIS_NON_UNIQUE","ERR_DATE_FIN_AVANT_DATE_DEB","ERR_MONTANT_ACOMPTE","ERR_TOTAL_PRESTATIONS","ERR_CODE_NATURE","ERR_CODE_ACTIVITE","ERR_CODE_ACTIVITE_NATURE","ERR_MNT_PREST_HT_TVA","ERR_MNT_PREST_TTC","ERR_VALEUR_NEGATIVE","ERR_PRESTATAIRE_EMETTEUR_INCONNU","ERR_LIEN_PARTICULIER_PRESTATAIRE","ERR_PRESTATAIRE_FACTURATION_INCONNU","ERR_CRITERE_RECHERCHE_VIDE","ERR_DGFIP_R2P_INCONNU","ERR_DATE_NAISSANCE_FUTUR","ERR_LIEU_NAISSANCE_DEPT","ERR_LIEU_NAISSANCE_COMN","ERR_LIEU_NAISSANCE_PAYS","ERR_DGFIP_IMPOTPART_INCONNU","ERR_CONTACT","ERR_CONTACT_ADRESSE_TYPE_VOIE","ERR_CONTACT_ADRESSE_LETTRE_VOIE","ERR_CONTACT_ADRESSE_TYPEVOIE","ERR_CONTACT_ADRESSE_LIBELLEVOIE","ERR_CONTACT_ADRESSE_INFORMATION_SUPPLEMENTAIRE","ERR_CONTACT_ADRESSE_COMMUNE","ERR_COORDONNEES_BANCAIRES","ERR_FORMAT_VALEUR","ERR_NBRE_MAX_RESULTAT","ERR_RECHERCHE_VIDE","ERR_ECV_PARTICULIERS_EXISTENT","ERREUR_REFERENCE_PARTICULIER_EXISTANTE_TYPE","ERR_LIEU_NAISSANCE_OBLIGATOIRE","ERREUR_LIEU_NAISSANCE_INVALIDE","ERR_RECHERCHE_PARTICULIER","ERR_FORMAT_NUMINTERVENANT","ERR_NUMINTERVENANT_MANQUANT","ERR_NUMINTERVENANT_BLOQUE","ERR_MANDAT_ECHU","ERREUR_VALIDATION","ERREUR_TECHNIQUE","ERREUR_INCONNUE"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"FrequencyDto":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"nextBillingAt":{"type":"string","nullable":true},"frequency":{"type":"number"},"interval":{"allOf":[{"$ref":"#/components/schemas/FrequencyInterval"}]},"finalizeInvoice":{"type":"boolean"},"sendByMail":{"type":"boolean"},"inCopy":{"type":"boolean"}},"required":["id","from","to","frequency","interval","finalizeInvoice","sendByMail","inCopy"]},"FrequencyInterval":{"type":"string","enum":["day","week","month","year"]},"ReadAssetDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/ReadInvoiceTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"parent":{"oneOf":[{"$ref":"#/components/schemas/ReadInvoiceDto"},{"$ref":"#/components/schemas/ReadAdvanceDto"}]},"advances":{"description":"Advances deducted from the asset total (for V3+ assets from final invoice)","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"refundAt":{"type":"number"},"latePenalty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLatePenaltyDto"}]},"lumpSumCompensation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"}]},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplayBillingSettingsDto"},"dueAt":{"type":"number"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","lines","total","displaySettings","paymentDelay","includeDiscountDisbursement"]}}},"paths":{"/v2/billing/{billingId}/lines":{"patch":{"operationId":"BillingController_updateLines_v2","parameters":[{"name":"billingId","required":true,"in":"path","description":"ID of the billing to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLinesDto"}}}},"responses":{"200":{"description":"Billing lines updated successfully","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReadInvoiceDto"},{"$ref":"#/components/schemas/ReadEstimateDto"},{"$ref":"#/components/schemas/ReadAssetDto"}]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Billing not found"}},"summary":"Update billing lines","tags":["Billing"]}}}}
```

## Modifier les informations générales

Tous les champs sont facultatifs : notes, conditions générales, moyens de paiement, pénalités de retard, indemnité forfaitaire. La route répond `400` sur un devis finalisé.

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/general-informations" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "headerNote": "Devis valable 30 jours." }'
```

## PATCH /v2/billing/estimate/{estimateId}/general-informations

> Update estimate general informations

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateEstimateGeneralInformationsDto":{"type":"object","properties":{"headerNote":{"type":"string","description":"Custom note to be displayed in the header of the billing"},"footerNote":{"type":"string","description":"Custom note to be displayed in the footer of the billing"},"generalTermsAndConditionsOfSale":{"type":"string","description":"General terms and conditions of sale to be included in the billing"},"mentionMediator":{"type":"string","description":"Mention mediateur to be included in the billing"},"paymentMethods":{"type":"array","description":"Array of accepted payment methods for the billing","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"},"vatMention":{"description":"Vat mention applicable for a billing","allOf":[{"$ref":"#/components/schemas/VatMention"}]},"latePenalty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLatePenaltyDto"}]},"lumpSumCompensation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"}]},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]}}},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/general-informations":{"patch":{"operationId":"EstimateController_updateGeneralInformations_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEstimateGeneralInformationsDto"}}}},"responses":{"200":{"description":"Estimate general informations updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Estimate not found"}},"summary":"Update estimate general informations","tags":["estimate"]}}}}
```

## Modifier les dates

`emittedAt` (date d'émission), `paymentDelay` (délai de paiement) et `expiredAt` (fin de validité du devis) sont obligatoires. Les dates sont en secondes Unix. Avec `paymentDelay` à `other`, indiquez l'échéance dans `customDueDate`.

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/timeline" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "emittedAt": 1794960000,
    "paymentDelay": "thirty_days",
    "expiredAt": 1797552000
  }'
```

## PATCH /v2/billing/estimate/{estimateId}/timeline

> Update estimate timeline

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateEstimateTimelineDto":{"type":"object","properties":{"emittedAt":{"type":"number","description":"The timestamp when the invoice was emitted, in seconds","minimum":0,"maximum":4102444800},"paymentDelay":{"description":"The payment delay for the invoice","allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"customDueDate":{"type":"number","description":"Custom due date for the invoice when payment delay is OTHER, in seconds","minimum":0,"maximum":4102444800},"deliveryDate":{"type":"number","description":"The timestamp for delivery date, in seconds","nullable":true,"minimum":0,"maximum":4102444800},"expiredAt":{"type":"number","description":"The timestamp when the estimate expired, in seconds","minimum":0,"maximum":4102444800}},"required":["emittedAt","paymentDelay","expiredAt"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/timeline":{"patch":{"operationId":"EstimateController_updateTimeline_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEstimateTimelineDto"}}}},"responses":{"200":{"description":"Estimate timeline updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Update estimate timeline","tags":["estimate"]}}}}
```

## Changer la langue

Le corps contient `locale`, parmi `fr`, `en`, `de`, `it`, `nl`, `pt`, `es`. La route répond `400` si votre offre n'inclut pas les documents multilingues ou si le devis n'est plus en brouillon.

```bash
curl -X PUT "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/locale" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "locale": "fr" }'
```

## PUT /v2/billing/estimate/{estimateId}/locale

> Update estimate locale

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateBillingLocaleDto":{"type":"object","properties":{"locale":{"description":"The locale of the billing document","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]}},"required":["locale"]},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/locale":{"put":{"operationId":"EstimateController_updateLocale_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLocaleDto"}}}},"responses":{"200":{"description":"Estimate locale updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Estimate not found"}},"summary":"Update estimate locale","tags":["estimate"]}}}}
```

## Changer la devise

Le corps contient `currency`, un code comme `EUR`, `GBP`, `CHF` ou `USD`, et en option `currencyRate`, le taux de conversion vers la nouvelle devise. La route répond `400` si votre offre n'inclut pas le multidevise ou si le devis n'est plus en brouillon. Le résumé de la spécification dit « Update asset currency » : c'est une erreur, la route change bien la devise du devis.

```bash
curl -X PUT "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/currency" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "currency": "EUR" }'
```

## PUT /v2/billing/estimate/{estimateId}/currency

> Update asset currency

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateBillingCurrencyDto":{"type":"object","properties":{"currency":{"description":"The currency which will be used with the billing","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyRate":{"type":"number","description":"The conversion rate from the billing currency to the new currency"}},"required":["currency"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/currency":{"put":{"operationId":"EstimateController_updateCurrency_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingCurrencyDto"}}}},"responses":{"200":{"description":"Asset currency updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Estimate not found"}},"summary":"Update asset currency","tags":["estimate"]}}}}
```

## Prévoir l'échéancier d'acomptes

La route enregistre sur le devis la liste des acomptes prévus. Chaque élément de `advances` a une `value` (montant ou pourcentage) et un `mode` (`AMOUNT` ou `PERCENTAGE`), tous deux obligatoires. `paymentCondition` (`SIGNATURE`, `ORDER` ou `OTHER`) et `customPaymentCondition` sont facultatifs. La route répond `400` (`billing.estimate.not_editable`) quand le devis n'est plus modifiable.

La création d'un acompte avec `POST /v2/billing/estimate/{id}/advance` ne lit pas ces lignes.

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/advance-lines" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "advances": [
      { "value": 30, "mode": "PERCENTAGE", "paymentCondition": "SIGNATURE" }
    ]
  }'
```

## PATCH /v2/billing/estimate/{estimateId}/advance-lines

> Update estimate advance lines

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"UpdateEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/AdvanceItemDto"}}},"required":["advances"]},"AdvanceItemDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/advance-lines":{"patch":{"operationId":"EstimateController_updateAdvanceLines_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEstimateAdvanceLinesDto"}}}},"responses":{"200":{"description":"Estimate advance lines updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"404":{"description":"Estimate not found"}},"summary":"Update estimate advance lines","tags":["estimate"]}}}}
```

## The ReadEstimateDto object

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"components":{"schemas":{"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]}}}}
```

## The ReadAdvanceDto object

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"components":{"schemas":{"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}}}
```

## Finaliser un devis

La finalisation attribue son numéro au devis. Un devis finalisé ne peut plus être modifié. La route est commune à tous les documents : voir [Documents de facturation](https://docs.abby.fr/reference-de-lapi/documents-de-facturation.md).

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/$ESTIMATE_ID/finalize" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## PATCH /v2/billing/{billingId}/finalize

> Finalize a billing document

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadInvoiceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"isOnlinePaymentActivated":{"type":"boolean"},"isFinalInvoice":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/ReadInvoiceTotalDto"},"reminder":{"$ref":"#/components/schemas/ReminderDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplayBillingSettingsDto"},"paymentRequest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentRequestDto"}]},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceNumbers":{"description":"Numbers of the advances associated with this invoice","type":"array","items":{"type":"string"}},"frequency":{"$ref":"#/components/schemas/FrequencyDto"},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDiscountDisbursement":{"type":"boolean"},"expiredAt":{"type":"number"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","dueAt","isReminderActivated","isOnlinePaymentActivated","isFinalInvoice","lines","total","displaySettings","hasAssociatedTransaction","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ReadInvoiceTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ReadInvoiceTotalWithoutConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ReadInvoiceTotalWithoutConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"ReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean"},"frequency":{"allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number"},"active":{"type":"boolean"},"recipients":{"type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active","recipients"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplayBillingSettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayEstimateNumber":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"PaymentRequestDto":{"type":"object","properties":{"idDemandePaiement":{"type":"string"},"dateDebutEmploi":{"type":"number"},"dateFinEmploi":{"type":"number"},"dateVirement":{"type":"number"},"advanceAlreadyPayed":{"type":"number"},"advancePaymentDate":{"type":"number"},"mntVirement":{"type":"number"},"statut":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestStatusUrssafTp"}]}},"required":["dateDebutEmploi","dateFinEmploi"]},"PaymentRequestStatusUrssafTp":{"type":"string","enum":[0,"10","20","30","40","50","60","70","110","111","120","112","ERR_PARTICULIER_INCONNU","ERR_CMPT_BLOQUE","ERR_FACTURE_DOUBLON","ERR_NBRE_PREST_MAX","ERR_DATE_FUTUR","ERR_DATE_PAIEMENT_AVANT_EXP","ERR_PERIODE_EMPLOI_MOIS_NON_UNIQUE","ERR_DATE_FIN_AVANT_DATE_DEB","ERR_MONTANT_ACOMPTE","ERR_TOTAL_PRESTATIONS","ERR_CODE_NATURE","ERR_CODE_ACTIVITE","ERR_CODE_ACTIVITE_NATURE","ERR_MNT_PREST_HT_TVA","ERR_MNT_PREST_TTC","ERR_VALEUR_NEGATIVE","ERR_PRESTATAIRE_EMETTEUR_INCONNU","ERR_LIEN_PARTICULIER_PRESTATAIRE","ERR_PRESTATAIRE_FACTURATION_INCONNU","ERR_CRITERE_RECHERCHE_VIDE","ERR_DGFIP_R2P_INCONNU","ERR_DATE_NAISSANCE_FUTUR","ERR_LIEU_NAISSANCE_DEPT","ERR_LIEU_NAISSANCE_COMN","ERR_LIEU_NAISSANCE_PAYS","ERR_DGFIP_IMPOTPART_INCONNU","ERR_CONTACT","ERR_CONTACT_ADRESSE_TYPE_VOIE","ERR_CONTACT_ADRESSE_LETTRE_VOIE","ERR_CONTACT_ADRESSE_TYPEVOIE","ERR_CONTACT_ADRESSE_LIBELLEVOIE","ERR_CONTACT_ADRESSE_INFORMATION_SUPPLEMENTAIRE","ERR_CONTACT_ADRESSE_COMMUNE","ERR_COORDONNEES_BANCAIRES","ERR_FORMAT_VALEUR","ERR_NBRE_MAX_RESULTAT","ERR_RECHERCHE_VIDE","ERR_ECV_PARTICULIERS_EXISTENT","ERREUR_REFERENCE_PARTICULIER_EXISTANTE_TYPE","ERR_LIEU_NAISSANCE_OBLIGATOIRE","ERREUR_LIEU_NAISSANCE_INVALIDE","ERR_RECHERCHE_PARTICULIER","ERR_FORMAT_NUMINTERVENANT","ERR_NUMINTERVENANT_MANQUANT","ERR_NUMINTERVENANT_BLOQUE","ERR_MANDAT_ECHU","ERREUR_VALIDATION","ERREUR_TECHNIQUE","ERREUR_INCONNUE"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"FrequencyDto":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"nextBillingAt":{"type":"string","nullable":true},"frequency":{"type":"number"},"interval":{"allOf":[{"$ref":"#/components/schemas/FrequencyInterval"}]},"finalizeInvoice":{"type":"boolean"},"sendByMail":{"type":"boolean"},"inCopy":{"type":"boolean"}},"required":["id","from","to","frequency","interval","finalizeInvoice","sendByMail","inCopy"]},"FrequencyInterval":{"type":"string","enum":["day","week","month","year"]},"ReadAssetDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/ReadInvoiceTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"parent":{"oneOf":[{"$ref":"#/components/schemas/ReadInvoiceDto"},{"$ref":"#/components/schemas/ReadAdvanceDto"}]},"advances":{"description":"Advances deducted from the asset total (for V3+ assets from final invoice)","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"refundAt":{"type":"number"},"latePenalty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLatePenaltyDto"}]},"lumpSumCompensation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"}]},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplayBillingSettingsDto"},"dueAt":{"type":"number"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","lines","total","displaySettings","paymentDelay","includeDiscountDisbursement"]}}},"paths":{"/v2/billing/{billingId}/finalize":{"patch":{"operationId":"BillingController_finalize_v2","parameters":[{"name":"billingId","required":true,"in":"path","description":"ID of the billing to finalize","schema":{"type":"string"}}],"responses":{"200":{"description":"Billing finalized successfully","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReadInvoiceDto"},{"$ref":"#/components/schemas/ReadEstimateDto"},{"$ref":"#/components/schemas/ReadAdvanceDto"},{"$ref":"#/components/schemas/ReadAssetDto"}]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Finalize a billing document","tags":["Billing"]}}}}
```

## Signer ou refuser un devis

Un devis ou un bon de commande doit être finalisé avant d'être signé ou refusé. Les opérations inverses, `unsign` et `unrefuse`, le ramènent à l'état `finalized` ; elles échouent si le devis n'est pas signé, ou pas refusé. Ces quatre routes n'ont pas de corps et répondent par le devis.

### Signer

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/sign" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## PATCH /v2/billing/estimate/{estimateId}/sign

> Sign estimate or purchase order

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/sign":{"patch":{"operationId":"EstimateController_sign_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate or purchase order to sign","schema":{"type":"string"}}],"responses":{"200":{"description":"Estimate or purchase order signed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Sign estimate or purchase order","tags":["estimate"]}}}}
```

### Annuler la signature

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/unsign" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## PATCH /v2/billing/estimate/{estimateId}/unsign

> Unsign estimate or purchase order

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/unsign":{"patch":{"operationId":"EstimateController_unsign_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate or purchase order to unsign","schema":{"type":"string"}}],"responses":{"200":{"description":"Estimate or purchase order unsigned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Unsign estimate or purchase order","tags":["estimate"]}}}}
```

### Refuser

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/refuse" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## PATCH /v2/billing/estimate/{estimateId}/refuse

> Refuse estimate or purchase order

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/refuse":{"patch":{"operationId":"EstimateController_refuse_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate or purchase order to refuse","schema":{"type":"string"}}],"responses":{"200":{"description":"Estimate or purchase order refused successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Refuse estimate or purchase order","tags":["estimate"]}}}}
```

### Annuler le refus

```bash
curl -X PATCH "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/unrefuse" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## PATCH /v2/billing/estimate/{estimateId}/unrefuse

> Unrefuse estimate or purchase order

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]}}},"paths":{"/v2/billing/estimate/{estimateId}/unrefuse":{"patch":{"operationId":"EstimateController_unrefuse_v2","parameters":[{"name":"estimateId","required":true,"in":"path","description":"ID of the estimate or purchase order to unrefuse","schema":{"type":"string"}}],"responses":{"200":{"description":"Estimate or purchase order unrefused successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadEstimateDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Unrefuse estimate or purchase order","tags":["estimate"]}}}}
```

## Créer une facture d'acompte depuis un devis

La route crée un acompte en brouillon à partir d'un devis signé qui n'a pas encore de facture finale. Le corps est facultatif et accepte :

* `mode` `AMOUNT` avec `amount`, un entier en centimes hors taxes (`100` vaut 1,00 euro HT) ;
* `mode` `PERCENTAGE` avec `percentage`, supérieur à 0 et au plus 100.

Le montant obtenu ne doit pas dépasser le reste à facturer du devis. Sans corps, l'acompte vaut 30 % du devis, ou 50 % du reste à partir du quatrième acompte. Quand vous n'envoyez pas de corps, omettez l'en-tête `Content-Type` ou envoyez `{}` : un corps vide avec `Content-Type: application/json` est refusé.

La suite se passe sur la page [Acomptes](https://docs.abby.fr/reference-de-lapi/acomptes.md).

```bash
curl -X POST "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/advance" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "PERCENTAGE", "percentage": 30 }'
```

## Create invoice advance

> Creates a draft advance from a signed estimate. Optional JSON body, same shape as PATCH /v2/billing/advance/{advanceId}/amount: { mode: "AMOUNT", amount } with an integer amount in cents HT, or { mode: "PERCENTAGE", percentage } with 0 < percentage <= 100 (lowercase mode accepted). The resulting amount must not exceed the remaining amount of the estimate. Without body, the default is 30% of the estimate (or 50% of the remaining amount after the third advance). When sending no body, omit the Content-Type header or send {}: an empty body with Content-Type application/json is rejected. This does not read advanceEstimateLines.

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"CreateAdvanceDto":{"type":"object","properties":{"mode":{"description":"Advance mode, same shape as PATCH /v2/billing/advance/{advanceId}/amount. AMOUNT requires amount, PERCENTAGE requires percentage. Lowercase \"amount\" / \"percentage\" are accepted. When omitted, the advance is 30% of the estimate (50% of the remaining amount from the fourth advance).","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"amount":{"type":"number","description":"Advance amount in cents HT (100 = 1.00 € HT), integer. Required when mode is AMOUNT, forbidden otherwise. Must not exceed the remaining amount of the estimate."},"percentage":{"type":"number","description":"Advance percentage of the estimate (30 = 30%), greater than 0 and at most 100. Required when mode is PERCENTAGE, forbidden otherwise."}}},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]}}},"paths":{"/v2/billing/estimate/{id}/advance":{"post":{"description":"Creates a draft advance from a signed estimate. Optional JSON body, same shape as PATCH /v2/billing/advance/{advanceId}/amount: { mode: \"AMOUNT\", amount } with an integer amount in cents HT, or { mode: \"PERCENTAGE\", percentage } with 0 < percentage <= 100 (lowercase mode accepted). The resulting amount must not exceed the remaining amount of the estimate. Without body, the default is 30% of the estimate (or 50% of the remaining amount after the third advance). When sending no body, omit the Content-Type header or send {}: an empty body with Content-Type application/json is rejected. This does not read advanceEstimateLines.","operationId":"EstimateController_createAdvance_v2","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the signed estimate","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdvanceDto"}}}},"responses":{"200":{"description":"Invoice advance created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAdvanceDto"}}}},"201":{"description":"Invoice advance created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAdvanceDto"}}}},"400":{"description":"Payload is invalid, or the requested amount exceeds the remaining amount of the estimate"},"401":{"description":"Unauthorized"},"404":{"description":"Invoice not found"}},"summary":"Create invoice advance","tags":["estimate"]}}}}
```

## Créer la facture finale

La route crée une facture finale en brouillon, liée au devis. Elle n'a pas de corps. Deux règles :

* le devis doit être signé et ne doit pas déjà avoir de facture finale ;
* les acomptes finalisés ou payés sont déduits automatiquement du montant restant.

Un acompte en brouillon bloque la finalisation de la facture finale : l'exigence `advancesAreAllFinalized` apparaît alors dans `finalizeRequirements`. La réponse est la facture (`ReadInvoiceDto`). Finalisez-la ensuite avec `PATCH /v2/billing/{billingId}/finalize`, puis marquez-la comme payée : voir [Paiements](https://docs.abby.fr/reference-de-lapi/paiements.md).

```bash
curl -X POST "https://api.abby.fr/v2/billing/estimate/$ESTIMATE_ID/final-invoice" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## Create a final invoice from a signed estimate

> Creates a draft final invoice linked to the estimate. No body. The estimate must be signed and must not already have a final invoice. Finalized or paid advances on the estimate are deducted automatically from the remaining amount. Use the returned invoice id with PATCH /v2/billing/{invoiceId}/finalize then POST /v2/accounting-billing/invoice/{invoiceId}/reconciliate.

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"ReadInvoiceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"isOnlinePaymentActivated":{"type":"boolean"},"isFinalInvoice":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/ReadInvoiceTotalDto"},"reminder":{"$ref":"#/components/schemas/ReminderDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplayBillingSettingsDto"},"paymentRequest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentRequestDto"}]},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceNumbers":{"description":"Numbers of the advances associated with this invoice","type":"array","items":{"type":"string"}},"frequency":{"$ref":"#/components/schemas/FrequencyDto"},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDiscountDisbursement":{"type":"boolean"},"expiredAt":{"type":"number"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","dueAt","isReminderActivated","isOnlinePaymentActivated","isFinalInvoice","lines","total","displaySettings","hasAssociatedTransaction","includeDiscountDisbursement"]},"BillingType":{"type":"string","enum":["estimate","invoice","asset","advance","purchase_order"]},"BillingState":{"type":"string","enum":["draft","finalized","signed","refused","paid"]},"ReadBillingCustomerDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer"},"legacyId":{"type":"string","description":"Legacy identifier of the customer"},"currency":{"description":"Preferred currency of the customer","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"firstname":{"type":"string","description":"First name of the customer"},"lastname":{"type":"string","description":"Last name of the customer"},"phoneNumber":{"type":"string","description":"Phone number of the customer"},"emails":{"description":"Email addresses of the customer","type":"array","items":{"type":"string"}},"billingAddress":{"description":"Billing address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddress":{"description":"Delivery address of the customer","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"deliveryAddressIsSame":{"type":"boolean","description":"Tell if delivery and billing address are deep equal or not"},"language":{"type":"string","description":"Preferred language of the customer"},"name":{"type":"string","description":"Full name of the customer"},"commercialName":{"type":"string","description":"Commercial name of the customer"},"siren":{"type":"string","description":"SIREN number of the customer"},"siret":{"type":"string","description":"SIRET number of the customer"},"nafCode":{"type":"string","description":"NAF code of the customer"},"vatNumber":{"type":"string","description":"VAT number of the customer"},"token":{"type":"string","description":"Token associated with the customer"},"parent":{"description":"Parent customer information","allOf":[{"$ref":"#/components/schemas/ReadBillingCustomerDto"}]},"contactId":{"type":"string","description":"Contact identifier associated with the customer"},"organizationId":{"type":"string","description":"Organization identifier associated with the customer"},"isDefault":{"type":"boolean","description":"Indicates if this is the default customer"},"test":{"type":"boolean","description":"Indicates if this is a test customer"}},"required":["id","legacyId","billingAddress","deliveryAddressIsSame","token","test"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN","XPF","XOF","XAF"],"description":"Preferred currency of the customer"},"AddressDto":{"type":"object","properties":{"line1":{"type":"string","description":"First line of the address"},"line2":{"type":"string","description":"Second line of the address"},"city":{"type":"string","description":"City of the address"},"zipCode":{"type":"string","description":"Zip code of the address"},"country":{"description":"Country code of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["line1","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"OpportunityDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ReadCurrencyDto":{"type":"object","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currencyDate":{"type":"number"},"currencyRate":{"type":"number"},"origin":{"allOf":[{"$ref":"#/components/schemas/CurrencyOrigin"}]}},"required":["currencyCode","currencyDate","currencyRate","origin"]},"CurrencyOrigin":{"type":"string","enum":["ECB","USER","FIXED"]},"ReadFileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"mimeType":{"type":"string"},"url":{"type":"string"},"relativeUrl":{"type":"string"},"isCertified":{"type":"boolean"},"isCertifiable":{"type":"boolean"}},"required":["id","name","extension","mimeType","url","relativeUrl"]},"FinalizeRequirementDto":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/FinalizeRequirementName"}]},"message":{"type":"string"},"metadata":{"description":"Only present on the `hasNoUrssafRoundingDrift` requirement.","allOf":[{"$ref":"#/components/schemas/UrssafRoundingDriftMetadataDto"}]}},"required":["name","message"]},"FinalizeRequirementName":{"type":"string","enum":["hasValidLines","hasLineDesignation","hasQuantityGreaterThanOrEqualToZero","hasValidLineType","hasValidPersonalServiceActivityLines","advancesAreAllFinalized","HasValidLineDiscountAmount","HasValidLineDiscountPercentage","HasValidGlobalDiscountAmount","HasValidGlobalDiscountPercentage","hasValidProductQuantityUnitForPersonalServiceActivity","hasConsistentVatRateForEuMention","isNotAlreadyFinalized","hasValidElectronicSignature","validateEmittedDate","hasValidEmittedAt","hasValidAmount","hasPositiveAmount","hasValidReminder","hasValidPaymentRequestAdvanceAmount","hasNoUrssafRoundingDrift"]},"UrssafRoundingDriftMetadataDto":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UrssafRoundingDriftLineDto"}},"totalDriftHtCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals excl. tax and the invoice total."},"totalDriftTtcCents":{"type":"number","description":"Difference in cents between the sum of transmitted line totals incl. tax and the invoice total."}},"required":["lines","totalDriftHtCents","totalDriftTtcCents"]},"UrssafRoundingDriftLineDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Id of the invoice line whose transmitted amounts do not add up."},"driftHtCents":{"type":"number","description":"Difference in cents between the transmitted line total excl. tax and the stored one."},"driftTtcCents":{"type":"number","description":"Difference in cents between the transmitted line total incl. tax and the stored one."},"suggestedUnitAmountCents":{"type":"number","nullable":true,"description":"Quantity-1 unit amount, in cents, that clears the drift for the whole invoice. Null when no amount was found."},"suggestedIsTaxIncluded":{"type":"boolean","description":"Whether the suggested amount is expressed tax-included."}},"required":["lineId","driftHtCents","driftTtcCents","suggestedUnitAmountCents","suggestedIsTaxIncluded"]},"BillingWarningDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"}},"required":["title","message"]},"ReadBillingEmitterDto":{"type":"object","properties":{"name":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"commercialName":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"rcsNumber":{"type":"string","nullable":true},"rsacNumber":{"type":"string","nullable":true},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegalStatus"}]},"sapAgreementNumber":{"type":"string"},"hasVat":{"type":"boolean"}}},"LegalStatus":{"type":"string","enum":["micro_enterprise","sas","sarl","sasu","ei","eurl","eirl","sa","snc","other","sasu_sas","eurl_sarl","sci","association"]},"ReadBankInformationDto":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"},"holder":{"type":"string"}},"required":["bic","iban","holder"]},"BillingLegalsDto":{"type":"object","properties":{"headerNote":{"type":"string"},"footerNote":{"type":"string"},"generalTermsAndConditionsOfSale":{"type":"string"},"mentionMediator":{"type":"string"},"vatMention":{"allOf":[{"$ref":"#/components/schemas/VatMention"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"otherPaymentMethod":{"type":"string","description":"Other payment method"}},"required":["vatMention","paymentMethods"]},"VatMention":{"type":"string","enum":["not_subject","second_hand_good","art_object","collection_antique","travel_agency","vat_not_applicable","vat_not_applicable_2","vat_exemption","vat_exemption_eu_sale","vat_exemption_eu_service","vat_construction","vat_psychologist","vat_psychologist_2","vat_reverse_charge","vat_reverse_charge_2","vat_reverse_charge_3","vat_reverse_charge_4","vat_reduced_rate","vat_reduced_rate_2","vat_article_261c_cgi","vat_exemption_294_cgi"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"BillingCompatibilityVersion":{"type":"string","enum":["V1","V2","V3"]},"PaymentDelay":{"type":"string","enum":["at_reception","end_of_month","seven_days","ten_days","fifteen_days","thirty_days","thirty_days_end_of_month","forty_five_days","forty_five_days_end_of_month","sixty_days","sixty_days_end_of_month","ninety_days","ninety_days_end_of_month","one_hundred_and_twenty_days","other"]},"ReadBillingDetailsLineDto":{"type":"object","properties":{"generatedId":{"type":"string"},"id":{"type":"string"},"unitPrice":{"type":"number"},"unitPriceHT":{"type":"number"},"productId":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"allOf":[{"$ref":"#/components/schemas/ProductUnit"}]},"designation":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"isDeliveryOfGoods":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"personalServiceActivity":{"allOf":[{"$ref":"#/components/schemas/PersonalServiceActivity"}]},"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"discount":{"$ref":"#/components/schemas/DiscountLineDto"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsLineDto"},"isTaxIncluded":{"type":"boolean","description":"Indicates whether the unit price includes tax (TTC) or excludes tax (HT)"}},"required":["unitPrice","unitPriceHT","designation","isDeliveryOfGoods","priceWithoutTaxBeforeDiscount","discountAmount","discount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ProductUnit":{"type":"string","enum":["unit","gram","hour","day","week","fixed_rate","year","character","line","license","article","month","kilogram","kilometer","liter","batch","meter","square_meter","cubic_meter","linear_meter","person","ton","word","page","leaflet","paragraph","minute","overnight_stay"]},"ProductType":{"type":"string","enum":["sale_of_goods","service_delivery","commercial_or_craft_services","sale_of_manufactured_goods","disbursement"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]},"PersonalServiceActivity":{"type":"string","enum":["GARDE_ENFANT_HANDICAPE","ACCOMPAGNEMENT_ENFANT_HANDICAPE","AIDE_HUMAINE","CONDUITE_VEHICULE_PERSONNEL","AIDE_AU_DEPLACEMENT","ENTRETIEN_DE_LA_MAISON","JARDINAGE","BRICOLAGE","GARDE_ENFANT_PLUS_DE_6_ANS","SOUTIEN_SCOLAIRE_COURS_A_DOMICILE","SOIN_ESTHETIQUE_A_DOMICILE","PREPARATION_REPAS_A_DOMICILE","LIVRAISON_REPAS_A_DOMICILE","COLLECTE_ET_LIVRAISON_DE_LINGE_REPASSE","LIVRAISON_COURSES_A_DOMICILE","ASSISTANCE_INFORMATIQUE","SOINS_ET_PROMENADES_ANIMAUX_DE_COMPAGNIE_POUR_PERSONNES_DEPENDANTES","MAINTENANCE_ENTRETIEN_ET_VIGILANCE_DE_LA_RESIDENCE_PRINCIPALE","ASSISTANCE_ADMINISTRATIVE","ACCOMPAGNEMENT_ENFANT_PLUS_DE_6_ANS","TELEASSISTANCE","INTERPRETE_LANGUE_DES_SIGNES","CONDUITE_VEHICULE_PERSONNEL_EN_CAS_INVALIDITE_TEMPORAIRE","ACCOMPAGNEMENT_DEPLACEMENTS_EN_DEHORS_DU_DOMICILE","ASSISTANCE_PERSONNES_TEMPORAIREMENT_DEPENDANTES_A_DOMICILE","COORDINATION_ET_GESTION","DIVERS_NON_ELIGIBLE"]},"DiscountLineDto":{"type":"object","properties":{"amount":{"type":"number","description":"Montant de la remise, 1000 pour 10% ou 10€"},"mode":{"description":"Mode de la réduction en pourcentage ou en euros","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]}},"required":["amount","mode"]},"DiscountMode":{"type":"string","enum":["PERCENTAGE","AMOUNT"],"description":"Mode de la réduction en pourcentage ou en euros"},"ConvertedAmountsLineDto":{"type":"object","properties":{"priceWithoutTaxBeforeDiscount":{"type":"number"},"discountAmount":{"type":"number"},"priceWithoutTaxAfterDiscount":{"type":"number"},"vatAmount":{"type":"number"},"priceTotalTax":{"type":"number"}},"required":["priceWithoutTaxBeforeDiscount","priceWithoutTaxAfterDiscount","vatAmount","priceTotalTax"]},"ReadInvoiceTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ReadInvoiceTotalWithoutConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"VatDetailDto":{"type":"object","properties":{"vatCode":{"allOf":[{"$ref":"#/components/schemas/VatCode"}]},"amount":{"type":"number"},"vatRate":{"type":"number"}},"required":["vatCode","amount","vatRate"]},"ReadInvoiceTotalWithoutConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"discountAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"ReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean"},"frequency":{"allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number"},"active":{"type":"boolean"},"recipients":{"type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active","recipients"]},"ReminderFrequency":{"type":"string","enum":["on_due_date","every_week"],"description":"The frequency at which reminders should be sent"},"DiscountDto":{"type":"object","properties":{"mode":{"description":"The mode of discount application, either percentage or fixed amount","allOf":[{"$ref":"#/components/schemas/DiscountMode"}]},"amount":{"type":"number","description":"The amount for the discount (1000 for 10% or 10€)"}},"required":["mode","amount"]},"LatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LatePenalty":{"type":"string","enum":["three_time_legal_rate","bce_director_rate_plus_ten_points","other"]},"BillingLumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"LumpSumCompensation":{"type":"string","enum":["forty_euros","other"]},"BillingDiscountAdvancePaymentDto":{"type":"object","properties":{"value":{"description":"Type de remise sur acompte","allOf":[{"$ref":"#/components/schemas/DiscountAdvancePayment"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DiscountAdvancePayment":{"type":"string","enum":["none","other"],"description":"Type de remise sur acompte"},"DisplayBillingSettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayEstimateNumber":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"PaymentRequestDto":{"type":"object","properties":{"idDemandePaiement":{"type":"string"},"dateDebutEmploi":{"type":"number"},"dateFinEmploi":{"type":"number"},"dateVirement":{"type":"number"},"advanceAlreadyPayed":{"type":"number"},"advancePaymentDate":{"type":"number"},"mntVirement":{"type":"number"},"statut":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestStatusUrssafTp"}]}},"required":["dateDebutEmploi","dateFinEmploi"]},"PaymentRequestStatusUrssafTp":{"type":"string","enum":[0,"10","20","30","40","50","60","70","110","111","120","112","ERR_PARTICULIER_INCONNU","ERR_CMPT_BLOQUE","ERR_FACTURE_DOUBLON","ERR_NBRE_PREST_MAX","ERR_DATE_FUTUR","ERR_DATE_PAIEMENT_AVANT_EXP","ERR_PERIODE_EMPLOI_MOIS_NON_UNIQUE","ERR_DATE_FIN_AVANT_DATE_DEB","ERR_MONTANT_ACOMPTE","ERR_TOTAL_PRESTATIONS","ERR_CODE_NATURE","ERR_CODE_ACTIVITE","ERR_CODE_ACTIVITE_NATURE","ERR_MNT_PREST_HT_TVA","ERR_MNT_PREST_TTC","ERR_VALEUR_NEGATIVE","ERR_PRESTATAIRE_EMETTEUR_INCONNU","ERR_LIEN_PARTICULIER_PRESTATAIRE","ERR_PRESTATAIRE_FACTURATION_INCONNU","ERR_CRITERE_RECHERCHE_VIDE","ERR_DGFIP_R2P_INCONNU","ERR_DATE_NAISSANCE_FUTUR","ERR_LIEU_NAISSANCE_DEPT","ERR_LIEU_NAISSANCE_COMN","ERR_LIEU_NAISSANCE_PAYS","ERR_DGFIP_IMPOTPART_INCONNU","ERR_CONTACT","ERR_CONTACT_ADRESSE_TYPE_VOIE","ERR_CONTACT_ADRESSE_LETTRE_VOIE","ERR_CONTACT_ADRESSE_TYPEVOIE","ERR_CONTACT_ADRESSE_LIBELLEVOIE","ERR_CONTACT_ADRESSE_INFORMATION_SUPPLEMENTAIRE","ERR_CONTACT_ADRESSE_COMMUNE","ERR_COORDONNEES_BANCAIRES","ERR_FORMAT_VALEUR","ERR_NBRE_MAX_RESULTAT","ERR_RECHERCHE_VIDE","ERR_ECV_PARTICULIERS_EXISTENT","ERREUR_REFERENCE_PARTICULIER_EXISTANTE_TYPE","ERR_LIEU_NAISSANCE_OBLIGATOIRE","ERREUR_LIEU_NAISSANCE_INVALIDE","ERR_RECHERCHE_PARTICULIER","ERR_FORMAT_NUMINTERVENANT","ERR_NUMINTERVENANT_MANQUANT","ERR_NUMINTERVENANT_BLOQUE","ERR_MANDAT_ECHU","ERREUR_VALIDATION","ERREUR_TECHNIQUE","ERREUR_INCONNUE"]},"ReadEstimateDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"expiredAt":{"type":"number"},"refusedAt":{"type":"number"},"signedAt":{"type":"number"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ReadBillingDetailsLineDto"}},"total":{"$ref":"#/components/schemas/EstimateTotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"latePenalty":{"$ref":"#/components/schemas/LatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/LumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"advances":{"type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceDto"}},"advanceEstimateLines":{"$ref":"#/components/schemas/ReadEstimateAdvanceLinesDto"},"withElectronicSignature":{"type":"boolean"},"electronicSignature":{"$ref":"#/components/schemas/EstimateElectronicSignatureDto"},"dueAt":{"type":"number"},"electronicSignatureRequirements":{"type":"array","items":{"$ref":"#/components/schemas/ElectronicSignatureRequirementDto"}},"hasFinalInvoice":{"type":"boolean"},"includeDiscountDisbursement":{"type":"boolean"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","expiredAt","lines","total","displaySettings","advances","advanceEstimateLines","withElectronicSignature","electronicSignature","electronicSignatureRequirements","hasFinalInvoice","includeDiscountDisbursement"]},"EstimateTotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","amountWithoutTaxBeforeDiscountWithoutDisbursement","remainingAmountWithoutTaxWithoutDisbursement"]},"ConvertedAmountsDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingAmountToBill":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"billedAmountWithoutTax":{"type":"number"},"billedAmountWithTax":{"type":"number"},"remainingAmountWithoutTaxWithoutDisbursement":{"type":"number"},"amountWithoutTaxBeforeDiscountWithoutDisbursement":{"type":"number"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingAmountToBill","vatDetails","billedAmountWithoutTax","billedAmountWithTax","remainingAmountWithoutTaxWithoutDisbursement","amountWithoutTaxBeforeDiscountWithoutDisbursement"]},"LumpSumCompensationDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LumpSumCompensation"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"DisplaySettingsDto":{"type":"object","properties":{"displayFullName":{"type":"boolean"},"displayEmail":{"type":"boolean"},"displayPhoneNumber":{"type":"boolean"},"displaySAPAgreement":{"type":"boolean"},"displayLegalStatus":{"type":"boolean"},"displayRequiredMentionsProduct":{"type":"boolean"},"displayGoodForApproval":{"type":"boolean"},"displayMemberOfAnApprovedAssociation":{"type":"boolean"},"displayAbbyLogo":{"type":"boolean"},"displayTitle":{"type":"boolean"}},"required":["displayFullName","displayEmail","displayPhoneNumber","displaySAPAgreement","displayLegalStatus","displayRequiredMentionsProduct","displayMemberOfAnApprovedAssociation","displayAbbyLogo","displayTitle"]},"ReadAdvanceDto":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string","description":"Title of the billing document"},"type":{"allOf":[{"$ref":"#/components/schemas/BillingType"}]},"state":{"allOf":[{"$ref":"#/components/schemas/BillingState"}]},"customer":{"$ref":"#/components/schemas/ReadBillingCustomerDto"},"locale":{"allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"emittedAt":{"type":"number"},"archivedAt":{"type":"number"},"opportunity":{"$ref":"#/components/schemas/OpportunityDto"},"locked":{"type":"boolean"},"finalizable":{"type":"boolean"},"test":{"type":"boolean"},"isEditable":{"type":"boolean"},"currencyCode":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"currency":{"$ref":"#/components/schemas/ReadCurrencyDto"},"lastDownloadAt":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReadFileDto"}},"finalizeRequirements":{"type":"array","items":{"$ref":"#/components/schemas/FinalizeRequirementDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BillingWarningDto"}},"emitter":{"$ref":"#/components/schemas/ReadBillingEmitterDto"},"bankInformation":{"$ref":"#/components/schemas/ReadBankInformationDto"},"billingLegals":{"$ref":"#/components/schemas/BillingLegalsDto"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"deliveryDate":{"type":"number"},"compatibilityVersion":{"allOf":[{"$ref":"#/components/schemas/BillingCompatibilityVersion"}]},"isDeletable":{"type":"boolean"},"displayDeliveryAddress":{"type":"boolean"},"finalizedAt":{"type":"number"},"lastSendByEmailAt":{"type":"number"},"themeId":{"type":"string","description":"ID of the theme applied to this document when set"},"paymentDelay":{"allOf":[{"$ref":"#/components/schemas/PaymentDelay"}]},"dueAt":{"type":"number"},"paidAt":{"type":"number"},"lastReminderSentAt":{"type":"number"},"isReminderActivated":{"type":"boolean"},"designation":{"type":"string"},"isOnlinePaymentActivated":{"type":"boolean"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/TotalDto"},"discount":{"$ref":"#/components/schemas/DiscountDto"},"displaySettings":{"$ref":"#/components/schemas/DisplaySettingsDto"},"parent":{"$ref":"#/components/schemas/ReadEstimateDto"},"advanceMode":{"allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"advancePercentage":{"type":"number"},"advanceAmount":{"type":"number"},"reminder":{"$ref":"#/components/schemas/BillingReminderDto"},"latePenalty":{"$ref":"#/components/schemas/BillingLatePenaltyDto"},"lumpSumCompensation":{"$ref":"#/components/schemas/BillingLumpSumCompensationDto"},"discountAdvancePayment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BillingDiscountAdvancePaymentDto"}]},"hasAssociatedTransaction":{"type":"boolean","description":"Indicates if the customer has an associated transaction"},"includeDisbursement":{"type":"boolean","description":"Indicates if the advance includes disbursement"},"canceledAt":{"type":"number"}},"required":["id","type","state","customer","locale","emittedAt","finalizable","test","isEditable","currencyCode","currency","attachments","finalizeRequirements","warnings","emitter","billingLegals","createdAt","updatedAt","compatibilityVersion","isDeletable","displayDeliveryAddress","paymentDelay","isReminderActivated","designation","isOnlinePaymentActivated","total","displaySettings","advanceMode","advancePercentage","advanceAmount","hasAssociatedTransaction","includeDisbursement"]},"TotalDto":{"type":"object","properties":{"amountWithoutTaxBeforeDiscount":{"type":"number"},"amountWithoutTaxAfterDiscount":{"type":"number"},"amountWithTaxAfterDiscount":{"type":"number"},"remainingAmountWithoutTax":{"type":"number"},"remainingAmountWithTax":{"type":"number"},"remainingReconciliateAmount":{"type":"number"},"vatDetails":{"type":"array","items":{"$ref":"#/components/schemas/VatDetailDto"}},"discountAmount":{"type":"number"},"convertedAmounts":{"$ref":"#/components/schemas/ConvertedAmountsDto"}},"required":["amountWithoutTaxBeforeDiscount","amountWithoutTaxAfterDiscount","amountWithTaxAfterDiscount","remainingAmountWithoutTax","remainingAmountWithTax","remainingReconciliateAmount","vatDetails"]},"AdvanceMode":{"type":"string","enum":["AMOUNT","PERCENTAGE"],"description":"The mode of the advance (amount or percentage)"},"BillingReminderDto":{"type":"object","properties":{"inCopy":{"type":"boolean","description":"Indicates if the sender should be in copy of the reminder"},"frequency":{"description":"The frequency at which reminders should be sent","allOf":[{"$ref":"#/components/schemas/ReminderFrequency"}]},"numberOfRemindersToSend":{"type":"number","description":"The number of reminders to be sent"},"active":{"type":"boolean","description":"Indicates if the reminder is active"},"recipients":{"description":"Array of email addresses to receive the reminder","type":"array","items":{"type":"string"}}},"required":["inCopy","frequency","numberOfRemindersToSend","active"]},"BillingLatePenaltyDto":{"type":"object","properties":{"value":{"allOf":[{"$ref":"#/components/schemas/LatePenalty"}]},"otherValue":{"type":"string","description":"Description custom si `value` vaut `other`"}},"required":["value"]},"ReadEstimateAdvanceLinesDto":{"type":"object","properties":{"advances":{"description":"Array of advance items","type":"array","items":{"$ref":"#/components/schemas/ReadAdvanceItemLineDto"}},"totals":{"description":"Totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]},"convertedTotals":{"description":"Converted totals of the advance items","allOf":[{"$ref":"#/components/schemas/ReadAdvanceItemLineTotalsDto"}]}},"required":["advances","totals","convertedTotals"]},"ReadAdvanceItemLineDto":{"type":"object","properties":{"value":{"type":"number","description":"The value of the advance (amount or percentage)"},"mode":{"description":"The mode of the advance (amount or percentage)","allOf":[{"$ref":"#/components/schemas/AdvanceMode"}]},"paymentCondition":{"description":"Payment condition for the advance","allOf":[{"$ref":"#/components/schemas/PaymentCondition"}]},"customPaymentCondition":{"type":"string","description":"Custom payment condition if OTHER is selected","nullable":true}},"required":["value","mode"]},"PaymentCondition":{"type":"string","enum":["SIGNATURE","ORDER","OTHER"],"description":"Payment condition for the advance"},"ReadAdvanceItemLineTotalsDto":{"type":"object","properties":{"totalAmountWithoutTax":{"type":"number","description":"Total amount of all advances"},"totalAmountWithTax":{"type":"number","description":"Total amount of all advances after discount"},"remainingTotalAmountWithoutTax":{"type":"number","description":"Remaining total amount without tax"},"remainingTotalAmountWithTax":{"type":"number","description":"Remaining total amount with tax"}},"required":["totalAmountWithoutTax","totalAmountWithTax","remainingTotalAmountWithoutTax","remainingTotalAmountWithTax"]},"EstimateElectronicSignatureDto":{"type":"object","properties":{"id":{"type":"string"},"canceledAt":{"type":"number","nullable":true},"procedureId":{"type":"string","nullable":true},"magicLink":{"type":"string","nullable":true},"signedAt":{"type":"number","nullable":true},"refusedAt":{"type":"number","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ElectronicSignatureStatus"}]}},"required":["id","canceledAt","procedureId","magicLink","signedAt","refusedAt","status"]},"ElectronicSignatureStatus":{"type":"string","enum":["requested","activated","on_going","refused","signed","cancelled"]},"ElectronicSignatureRequirementDto":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"FrequencyDto":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"nextBillingAt":{"type":"string","nullable":true},"frequency":{"type":"number"},"interval":{"allOf":[{"$ref":"#/components/schemas/FrequencyInterval"}]},"finalizeInvoice":{"type":"boolean"},"sendByMail":{"type":"boolean"},"inCopy":{"type":"boolean"}},"required":["id","from","to","frequency","interval","finalizeInvoice","sendByMail","inCopy"]},"FrequencyInterval":{"type":"string","enum":["day","week","month","year"]}}},"paths":{"/v2/billing/estimate/{id}/final-invoice":{"post":{"description":"Creates a draft final invoice linked to the estimate. No body. The estimate must be signed and must not already have a final invoice. Finalized or paid advances on the estimate are deducted automatically from the remaining amount. Use the returned invoice id with PATCH /v2/billing/{invoiceId}/finalize then POST /v2/accounting-billing/invoice/{invoiceId}/reconciliate.","operationId":"EstimateController_createFinalInvoice_v2","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the signed estimate","schema":{"type":"string"}}],"responses":{"201":{"description":"Final invoice created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadInvoiceDto"}}}},"400":{"description":"Estimate is not signed or already has a final invoice"},"401":{"description":"Unauthorized"},"404":{"description":"Estimate not found"}},"summary":"Create a final invoice from a signed estimate","tags":["estimate"]}}}}
```

## Télécharger un devis

Le PDF d'un devis se télécharge avec la route commune. Le paramètre `locale` et l'envoi par email sont décrits sur la page [Envoi et téléchargement](https://docs.abby.fr/reference-de-lapi/envoi-et-telechargement.md).

```bash
curl "https://api.abby.fr/v2/billing/$ESTIMATE_ID/download" \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -o devis.pdf
```

## GET /v2/billing/{billingId}/download

> Download a billing document

```json
{"openapi":"3.0.0","info":{"title":"Abby Public API","version":"1.130.0+66756885474b"},"servers":[{"url":"https://api.abby.fr","description":"Production server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token."}},"schemas":{"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]}}},"paths":{"/v2/billing/{billingId}/download":{"get":{"operationId":"BillingController_downloadPDF_v2","parameters":[{"name":"billingId","required":true,"in":"path","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","description":"Locale for the PDF generation","schema":{"$ref":"#/components/schemas/BillingLocale"}}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Billing document not found"}},"summary":"Download a billing document","tags":["Billing"]}}}}
```

## Voir aussi

* [Du devis à la facture, avec un acompte](https://docs.abby.fr/guides/devis-acompte-facture.md)
* [Acomptes](https://docs.abby.fr/reference-de-lapi/acomptes.md)
* [Documents de facturation](https://docs.abby.fr/reference-de-lapi/documents-de-facturation.md)
* [Paiements](https://docs.abby.fr/reference-de-lapi/paiements.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abby.fr/reference-de-lapi/devis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
