> 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/livre-des-achats.md).

# Livre des achats

Enregistrez vos dépenses fournisseurs dans le livre des achats.

Le livre des achats recense les dépenses de votre société. Chaque écriture porte sur un fournisseur, un montant total, un mode de paiement et une ou plusieurs lignes qui ventilent ce montant par taux de TVA et par compte comptable.

Les routes décrites ici sont celles de la version 3 (`/v3/purchaseRegister`). Les anciennes routes figurent en fin de page.

## Préparer une écriture

* **Un fournisseur** : `thirdPartyId` est l'identifiant d'un [fournisseur](https://docs.abby.fr/reference-de-lapi/fournisseurs.md). Ce n'est ni un contact ni une organisation.
* **Des montants en centimes** : `amount` est le montant total TTC de la dépense, en centimes. Utilisez un montant négatif pour un remboursement. La somme des `entries[].amount` doit être égale à `amount`, sinon l'API répond 400. Voir [Conventions](https://docs.abby.fr/concepts/conventions.md).
* **Des lignes** (`entries`). Chacune porte :
  * `amount` (obligatoire) : le montant TTC de la ligne, en centimes ;
  * `isPersonal` (obligatoire) : `true` pour marquer une dépense personnelle, exclue de la TVA et des livres comptables ;
  * `vatId` (facultatif) : l'identifiant du taux de TVA, voir ci-dessous ;
  * `accountingAccountNumber` (facultatif) : le numéro du compte comptable de la ligne. Sans lui, Abby applique un compte par défaut selon le type d'écriture. Les numéros disponibles se lisent avec [`GET /v2/accounting-accounts`](https://docs.abby.fr/reference-de-lapi/comptabilite.md).
* **Une date** : `valueDate`, au format date-heure ISO 8601.
* **Un libellé** : `label`.
* **Un mode de paiement** : `paymentMethodUsed`, un nombre de 1 à 9 selon l'énumération `PaymentMethodLegacy` de la spec : `1` virement, `2` prélèvement, `3` carte bancaire, `4` chèque, `5` chèque emploi service universel, `6` espèces, `7` PayPal, `8` autre, `9` Stripe. Avec `8`, précisez `otherPaymentMethodUsed`.

Facultatifs : `reference` et `files` (liste d'objets `{ "id": "..." }`).

### Choisir un `vatId`

La spec liste les identifiants de TVA dans la description de `POST /v3/purchaseRegister` : aucune route publique ne les renvoie.

| `vatId` | Taux                                                               |
| ------- | ------------------------------------------------------------------ |
| `1`     | 20,00 %                                                            |
| `2`     | 10,00 %                                                            |
| `3`     | 5,50 %                                                             |
| `4`     | 2,10 %                                                             |
| `5`     | Hors taxe                                                          |
| `6`     | 8,50 % (DOM-TOM)                                                   |
| `7`     | Union européenne (acquisition intracommunautaire, autoliquidation) |
| `8`     | Hors Union européenne                                              |

## Créer une écriture

```bash
curl -X POST https://api.abby.fr/v3/purchaseRegister \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "valueDate": "2026-11-18T00:00:00.000Z",
    "paymentMethodUsed": 1,
    "amount": 12000,
    "thirdPartyId": "'"$PROVIDER_ID"'",
    "label": "Fournitures de bureau",
    "reference": "FA-2026-0042",
    "entries": [
      {
        "amount": 12000,
        "isPersonal": false,
        "vatId": 1,
        "accountingAccountNumber": 606300
      }
    ]
  }'
```

La réponse est l'écriture créée, avec son `id`, ses lignes (`lines`, chacune avec `vatCode`, `vatRate` et `accountingAccount`) et le fournisseur (`provider`).

Selon l'offre de la société, une écriture peut être refusée avec une erreur 402 par le contrôle d'accès à la TVA des livres. Voir [Erreurs](https://docs.abby.fr/concepts/erreurs.md).

## Create a purchase register entry

> Creates a purchase register entry (livre des achats) for a supplier expense.\
> \
> \*\*\`thirdPartyId\`\*\* must be the ID of a \*\*provider (supplier)\*\*, NOT an organization or contact (those are customers used by invoicing). Create or list providers via \`POST /provider\`, \`GET /providers\`, etc.\
> \
> \*\*\`amount\`\*\* is in cents and represents the total tax-inclusive amount of the expense. Use a negative amount for a refund.\
> \
> \*\*\`entries\`\*\* must split \`amount\` line by line. Each entry exposes:\
> \- \`amount\` (cents, required) — tax-inclusive amount allocated to this line. The sum of \`entries\[].amount\` must equal the parent \`amount\`.\
> \- \`isPersonal\` (boolean, required) — \`true\` to flag the line as a personal expense (excluded from VAT and accounting books).\
> \- \`vatId\` (number, optional) — French VAT rate identifier. Allowed values:\
> &#x20; \- \`1\` = 20.00 %\
> &#x20; \- \`2\` = 10.00 %\
> &#x20; \- \`3\` = 5.50 %\
> &#x20; \- \`4\` = 2.10 %\
> &#x20; \- \`5\` = Hors Taxe (no VAT)\
> &#x20; \- \`6\` = 8.50 % (DOM-TOM)\
> &#x20; \- \`7\` = Union Européenne (intra-EU acquisition, reverse-charged)\
> &#x20; \- \`8\` = Hors UE (extra-EU acquisition)\
> \- \`accountingAccountNumber\` (number, optional) — French chart-of-accounts number forced for this line (e.g. \`606300\`, \`622600\`, \`445660\`). When omitted, Abby applies a default account based on the entry type.\
> \
> \*\*\`paymentMethodUsed\`\*\* uses the legacy \`PaymentMethod\` enum (e.g. \`CASH\`, \`BANK\_CARD\`, \`BANK\_TRANSFER\`, \`CHECK\`, \`OTHER\`). Pass \`otherPaymentMethodUsed\` only when \`paymentMethodUsed = OTHER\`.

```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":{"CreatePurchaseRegisterDto":{"type":"object","properties":{"valueDate":{"format":"date-time","type":"string"},"paymentMethodUsed":{"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string"},"amount":{"type":"number"},"thirdPartyId":{"type":"string"},"label":{"type":"string"},"reference":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileInputDto"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/AnnotateEntryDto"}}},"required":["valueDate","paymentMethodUsed","amount","thirdPartyId","label","entries"]},"PaymentMethodLegacy":{"type":"number","enum":[1,2,3,4,5,6,7,8,9]},"FileInputDto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"AnnotateEntryDto":{"type":"object","properties":{"vatId":{"type":"number"},"accountingAccountNumber":{"type":"number"},"isPersonal":{"type":"boolean"},"amount":{"type":"number"}},"required":["isPersonal","amount"]},"ReadPurchaseRegisterItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register entry"},"label":{"type":"string","description":"The label of the purchase register entry"},"reference":{"type":"string","description":"The reference of the purchase register entry"},"amount":{"type":"number","description":"The amount of the purchase register entry"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register entry"},"paymentMethod":{"description":"The payment method of the purchase register entry","allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"otherMethod":{"type":"string","description":"The other method of the purchase register entry"},"provider":{"description":"The provider of the purchase register entry","allOf":[{"$ref":"#/components/schemas/ReadProviderDto"}]},"entries":{"description":"The entries of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"lines":{"description":"The lines of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadPurchaseRegisterLineDto"}},"emittedAt":{"type":"string","description":"The emitted at of the purchase register entry"},"hasTransaction":{"type":"boolean","description":"The has transaction of the purchase register entry"},"fileCount":{"type":"number","description":"The file count of the purchase register entry"},"createdAt":{"type":"number","description":"The created at of the purchase register entry"},"updatedAt":{"type":"number","description":"The updated at of the purchase register entry"}},"required":["id","label","reference","amount","vatAmount","paymentMethod","entries","lines","emittedAt","hasTransaction","fileCount","createdAt","updatedAt"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadProviderDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the provider"},"name":{"type":"string","description":"The name of the provider"},"commercialName":{"type":"string","description":"The commercial name of the provider"},"email":{"type":"string","description":"The email of the provider"},"phone":{"type":"string","description":"The phone of the provider"},"address":{"type":"string","description":"The address of the provider"},"city":{"type":"string","description":"The city of the provider"},"zipCode":{"type":"string","description":"The zip code of the provider"},"country":{"type":"string","description":"The country of the provider"},"firstname":{"type":"string","description":"The firstname of the provider"},"lastname":{"type":"string","description":"The lastname of the provider"}},"required":["id","name","commercialName","email","phone","address","city","zipCode","country","firstname","lastname"]},"ReadEntryDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"type":"object"},"label":{"type":"string"},"fullLabel":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"amount":{"type":"number"},"parent":{"type":"boolean"},"vatRate":{"type":"object"},"vatAmount":{"type":"number"},"vatId":{"type":"number"},"transactionId":{"type":"string"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"transaction":{"$ref":"#/components/schemas/ReadTransactionDto"},"isPersonal":{"type":"boolean"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"accountingAccountId":{"type":"string"},"accountingAccount":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"hasBeenUpdatedByUser":{"type":"boolean"},"isAnnotatedWithRules":{"type":"boolean"},"updatedAt":{"type":"object"},"createdAt":{"type":"object"}},"required":["id","valueDate","label","fullLabel","debit","credit","amount","parent","vatRate","vatAmount","vatId","transactionId","lockedAt","lockedBy","isPersonal","companyId","hasBeenUpdatedByUser","isAnnotatedWithRules","updatedAt","createdAt"]},"ReadTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"account":{"$ref":"#/components/schemas/ReadAccountDto"},"accountId":{"type":"string"},"amount":{"type":"number"},"bridgeAccountId":{"type":"number"},"bridgeCategoryId":{"type":"number"},"bridgeTransactionId":{"type":"number"},"currencyCode":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"fullLabel":{"type":"string"},"isDeleted":{"type":"boolean"},"isFuture":{"type":"boolean"},"label":{"type":"string"},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string","nullable":true},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"}]},"thirdPartyId":{"type":"string","nullable":true},"thirdParty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadThirdPartyDto"}]},"lockedAt":{"format":"date-time","type":"string","nullable":true},"lockedBy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string","nullable":true}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","suggestedAccountingAccount","thirdPartyId","thirdParty","lockedAt","lockedBy","createdAt","updatedAt","bridgeUpdatedAt","valueDate"]},"ReadAccountDto":{"type":"object","properties":{"id":{"type":"string"},"isNew":{"type":"boolean"},"accountingAccountId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"currencyCode":{"type":"string"},"bridgeAccountId":{"type":"number"},"bridgeItemId":{"type":"number"},"bankinItemId":{"type":"string"},"bankListId":{"type":"number"},"bankList":{"type":"object"},"isSynchronized":{"type":"boolean"},"synchronizedAt":{"type":"object"},"desynchronizedAt":{"type":"object"},"startSynchronizedAt":{"type":"object"},"firstSynchronizedAt":{"type":"object"},"lastSyncAt":{"type":"object"},"companyId":{"type":"string"},"accountBalance":{"type":"array","items":{"type":"string"}},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"numberOfTransactionsToAnnotate":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountingAccountId","name","type","currencyCode","bridgeAccountId","bridgeItemId","bankinItemId","bankListId","isSynchronized","synchronizedAt","desynchronizedAt","startSynchronizedAt","firstSynchronizedAt","lastSyncAt","companyId","bridgeUpdatedAt"]},"OperationType":{"type":"string","enum":["sale","purchase","refund","asset"]},"ReadSuggestedAccountingAccountDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"abbyProfessionalAccountingAccountNumber":{"type":"number"},"abbyPersonalAccountingAccountNumber":{"type":"number"}},"required":["id","name"]},"ReadThirdPartyDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ThirdPartyType"}]},"additionalAddress":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"companyId":{"type":"string"},"commercialName":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/LegacyReadContactDto"}},"country":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"nafCode":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"website":{"type":"string"},"zipCode":{"type":"string"},"accountingAccountId":{"type":"string"},"accountingAccount":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","companyId","accountingAccountId"]},"ThirdPartyType":{"type":"string","enum":["provider","customer"]},"LegacyReadContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"lastname":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"thirdPartyId":{"type":"string"},"role":{"type":"string"},"website":{"type":"string"}},"required":["id"]},"ReadCompanyDto":{"type":"object","properties":{"id":{"type":"string"},"activity":{"$ref":"#/components/schemas/ReadActivityDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ReadStripeProductDto"}},"productsCompany":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyStripeProductDto"}},"additionalAddress":{"type":"string"},"address":{"type":"string"},"caseNumberCommercialCourt":{"type":"string","nullable":true,"deprecated":true},"category":{"type":"string"},"city":{"$ref":"#/components/schemas/ReadCityDto"},"cityId":{"type":"string"},"cityName":{"type":"string","nullable":true,"description":"Free-text city name. Effective city: city?.name ?? cityName."},"commercialCourt":{"type":"string","nullable":true,"deprecated":true},"commercialCourtCode":{"type":"string","nullable":true,"deprecated":true},"rcsGreffeCode":{"type":"string","nullable":true},"rsacGreffeCode":{"type":"string","nullable":true},"commercialName":{"type":"string"},"creationActivityDescription":{"type":"string"},"creationDate":{"format":"date-time","type":"string"},"creationFinishedAt":{"format":"date-time","type":"string"},"registeredType":{"allOf":[{"$ref":"#/components/schemas/RegisteredType"}]},"opportunityType":{"allOf":[{"$ref":"#/components/schemas/OpportunityType"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"creationId":{"type":"string"},"declarationRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"declarationPlatform":{"allOf":[{"$ref":"#/components/schemas/DeclarationPlatform"}]},"hasVat":{"type":"boolean"},"hasAcre":{"type":"boolean"},"impositionType":{"allOf":[{"$ref":"#/components/schemas/ImpositionType"}]},"inseeImmatriculationDate":{"format":"date-time","type":"string"},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegacyLegalStatus"}]},"taxSystem":{"allOf":[{"$ref":"#/components/schemas/TaxSystem"}]},"nafCode":{"type":"string"},"name":{"type":"string"},"otherActivity":{"type":"string"},"secondaryActivity":{"type":"string"},"rcsImmatriculationDate":{"format":"date-time","type":"string"},"rcsNumber":{"type":"string"},"rmNumber":{"type":"string","deprecated":true},"rneNumber":{"type":"string"},"rsacNumber":{"type":"string"},"rnaNumber":{"type":"string"},"selectedRegisters":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/RegisterType"}},"departmentRmImmatriculation":{"type":"string"},"registeredAt":{"format":"date-time","type":"string"},"shareCapital":{"type":"number"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"vatRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"zipCode":{"type":"string"},"trackingCompanySteps":{"type":"array","items":{"$ref":"#/components/schemas/ReadTrackingCompanyStepDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReadNoteDto"}},"referent":{"$ref":"#/components/schemas/ReadUserDto"},"signatureFileId":{"type":"string"},"referentId":{"type":"string"},"addressType":{"allOf":[{"$ref":"#/components/schemas/AddressType"}]},"recordNumber":{"type":"string"},"customerId":{"type":"string"},"declarationUserId":{"type":"string"},"declarationUser":{"$ref":"#/components/schemas/ReadUserDto"},"startDeclarationAt":{"format":"date-time","type":"string"},"endDeclarationAt":{"format":"date-time","type":"string"},"verifiedAt":{"format":"date-time","type":"string"},"sapAgreementDate":{"format":"date-time","type":"string"},"firstVatReportingDate":{"format":"date-time","type":"string"}},"required":["id","city","referent"]},"ReadActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"liberalType":{"allOf":[{"$ref":"#/components/schemas/LiberalType"}]},"isRegulated":{"type":"boolean"},"parentId":{"type":"number"},"parent":{"$ref":"#/components/schemas/ReadParentActivityDto"},"hidden":{"type":"boolean"},"isSap":{"type":"boolean"}},"required":["id","name","isRegulated","parent","hidden","isSap"]},"LiberalType":{"type":"number","enum":[1,2,3]},"ReadParentActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"ReadStripeProductDto":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"productId":{"type":"string"},"multiple":{"type":"boolean"},"recurring":{"type":"boolean"},"trial":{"type":"object"},"requireCreditCard":{"type":"boolean"}},"required":["id","productId","multiple","recurring","trial","requireCreditCard"]},"StripeProductType":{"type":"string","enum":["abby_plus","acre","cfe","abby_free","abby_start","abby_creation_start","abby_creation_start_premium","abby_creation_start_business","abby_pro","abby_business","abby_ce","meeting_with_an_expert","formation_client","formation_communiquer","formation_client_communiquer_discount","billing_template_2","billing_template_3","abby_academie_marketing_communication","abby_academie_creation","abby_contact"]},"ReadCompanyStripeProductDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"productId":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"product":{"$ref":"#/components/schemas/ReadStripeProductDto"},"amount":{"type":"number"},"frequency":{"allOf":[{"$ref":"#/components/schemas/StripeProductFrequency"}]},"subscriptionId":{"type":"string"},"consumedAt":{"format":"date-time","type":"string"},"manuallyAdded":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"failedBillingDueDate":{"format":"date-time","type":"string"},"lastFailedAt":{"format":"date-time","type":"string"},"failedInvoiceUrl":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lockUntil":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"trialAt":{"format":"date-time","type":"string"},"lastPaidAt":{"format":"date-time","type":"string"},"extendedTrialAt":{"format":"date-time","type":"string"}},"required":["id","companyId","productId"]},"StripeProductFrequency":{"type":"string","enum":["year","month","semiannual"]},"ReadCityDto":{"type":"object","properties":{"cityCode":{"type":"string"},"name":{"type":"string"}},"required":["cityCode","name"]},"RegisteredType":{"type":"number","enum":[1,2,3]},"OpportunityType":{"type":"string","enum":["orders","projects","opportunities"]},"CreationCompanyStep":{"type":"string","enum":["creation_requested","files_requested","declaration_sent","declaration_refused","company_created","urssaf_account_created","impots_account_created","acre_requested","cfe_declared","all_files_deposed","has_file_refused","all_files_validated","none"]},"CreationDashboardStep":{"type":"string","enum":["files_to_validate","declaration_to_do","declaration_in_progress","pending_declaration","declaration_to_report","declaration_refused","declaration_pending_denial","declaration_to_retry","regularisation_gu","refus_gu","to_call_cfe","declared","declaration_accepted","to_call","ended","abandoned","none"]},"Recurrence":{"type":"number","enum":[1,2,3]},"DeclarationPlatform":{"type":"number","enum":[6,1,2,3,4,5]},"ImpositionType":{"type":"number","enum":[1,2]},"LegacyLegalStatus":{"type":"number","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"TaxSystem":{"type":"string","enum":["micro_bic","micro_bnc","micro_bic_or_bnc","micro_ba","micro_foncier","micro_revenu_foncier_ir_2072_2044","reel_simplifie_ir_2033_2031","reel_normal_ir_2033_2031","reel_simplifie_is_2033_2065","reel_normal_is_2050_2065","declaration_controlee_2035","association_non_lucratif"]},"RegisterType":{"type":"string","enum":["RCS","RNE","RSAC","RNA"]},"ReadTrackingCompanyStepDto":{"type":"object","properties":{"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"referentId":{"type":"string"},"referentFullname":{"type":"string"},"authorId":{"type":"string"},"authorFullname":{"type":"string"}},"required":["companyId","createdAt","currentStep","currentDashboardStep"]},"ReadNoteDto":{"type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/components/schemas/ReadUserDto"},"authorId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"companyId":{"type":"string"},"text":{"type":"string"}},"required":["id","authorId","companyId","text"]},"ReadUserDto":{"type":"object","properties":{"id":{"type":"string"},"affiliationUrl":{"type":"string"},"affilaeClickId":{"type":"string"},"isCMA":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"birthDate":{"type":"object"},"email":{"type":"string"},"fullName":{"type":"string"},"firebaseToken":{"type":"string"},"profilePictureId":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"zipCode":{"type":"string"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/LegacyCivility"}]},"provider":{"allOf":[{"$ref":"#/components/schemas/ProviderSignUp"}]},"onboardingAt":{"format":"date-time","type":"string"},"onboardingId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wantsActivityStartAt":{"format":"date-time","type":"string"}},"required":["id"]},"LegacyCivility":{"type":"number","enum":[1,2]},"ProviderSignUp":{"type":"string","enum":["google.com","facebook.com","apple.com","password","custom"]},"AddressType":{"type":"number","enum":[4,1,3,2]},"ReadAccountingAccountDto":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"number"},"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isVatRelated":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"number"},"position":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"},"parent":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"entryCount":{"type":"number"},"lastUsedAt":{"format":"date-time","type":"string"},"entries":{"type":"array","items":{"type":"string"}}},"required":["id","category","color","description","icon","isHidden","isPersonal","isVatRelated","name","number","tags"]},"ReadPurchaseRegisterLineDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register line"},"label":{"type":"string","description":"The label of the purchase register line"},"amount":{"type":"number","description":"The amount of the purchase register line"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register line"},"vatCode":{"description":"The vat code of the purchase register line","allOf":[{"$ref":"#/components/schemas/VatCode"}]},"vatRate":{"type":"number","description":"The vat rate of the purchase register line"},"accountingAccount":{"description":"The accounting account of the purchase register line","allOf":[{"$ref":"#/components/schemas/ReadAccountingAccountDto"}]}},"required":["id","label","amount","vatAmount","vatCode","vatRate","accountingAccount"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]}}},"paths":{"/v3/purchaseRegister":{"post":{"description":"Creates a purchase register entry (livre des achats) for a supplier expense.\n\n**`thirdPartyId`** must be the ID of a **provider (supplier)**, NOT an organization or contact (those are customers used by invoicing). Create or list providers via `POST /provider`, `GET /providers`, etc.\n\n**`amount`** is in cents and represents the total tax-inclusive amount of the expense. Use a negative amount for a refund.\n\n**`entries`** must split `amount` line by line. Each entry exposes:\n- `amount` (cents, required) — tax-inclusive amount allocated to this line. The sum of `entries[].amount` must equal the parent `amount`.\n- `isPersonal` (boolean, required) — `true` to flag the line as a personal expense (excluded from VAT and accounting books).\n- `vatId` (number, optional) — French VAT rate identifier. Allowed values:\n  - `1` = 20.00 %\n  - `2` = 10.00 %\n  - `3` = 5.50 %\n  - `4` = 2.10 %\n  - `5` = Hors Taxe (no VAT)\n  - `6` = 8.50 % (DOM-TOM)\n  - `7` = Union Européenne (intra-EU acquisition, reverse-charged)\n  - `8` = Hors UE (extra-EU acquisition)\n- `accountingAccountNumber` (number, optional) — French chart-of-accounts number forced for this line (e.g. `606300`, `622600`, `445660`). When omitted, Abby applies a default account based on the entry type.\n\n**`paymentMethodUsed`** uses the legacy `PaymentMethod` enum (e.g. `CASH`, `BANK_CARD`, `BANK_TRANSFER`, `CHECK`, `OTHER`). Pass `otherPaymentMethodUsed` only when `paymentMethodUsed = OTHER`.","operationId":"PurchaseRegisterController_create_v3","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePurchaseRegisterDto"}}}},"responses":{"201":{"description":"Purchase register entry created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadPurchaseRegisterItemDto"}}}},"400":{"description":"Invalid payload (e.g. entries do not balance amount, or thirdPartyId is not a provider)"},"401":{"description":"Unauthorized"}},"summary":"Create a purchase register entry","tags":["PurchaseRegister"]}}}}
```

## Lire une écriture

```bash
curl https://api.abby.fr/v3/purchaseRegister/$ENTRY_ID \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## GET /v3/purchaseRegister/{id}

> Get a purchase register entry by id

```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":{"ReadPurchaseRegisterItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register entry"},"label":{"type":"string","description":"The label of the purchase register entry"},"reference":{"type":"string","description":"The reference of the purchase register entry"},"amount":{"type":"number","description":"The amount of the purchase register entry"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register entry"},"paymentMethod":{"description":"The payment method of the purchase register entry","allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"otherMethod":{"type":"string","description":"The other method of the purchase register entry"},"provider":{"description":"The provider of the purchase register entry","allOf":[{"$ref":"#/components/schemas/ReadProviderDto"}]},"entries":{"description":"The entries of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"lines":{"description":"The lines of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadPurchaseRegisterLineDto"}},"emittedAt":{"type":"string","description":"The emitted at of the purchase register entry"},"hasTransaction":{"type":"boolean","description":"The has transaction of the purchase register entry"},"fileCount":{"type":"number","description":"The file count of the purchase register entry"},"createdAt":{"type":"number","description":"The created at of the purchase register entry"},"updatedAt":{"type":"number","description":"The updated at of the purchase register entry"}},"required":["id","label","reference","amount","vatAmount","paymentMethod","entries","lines","emittedAt","hasTransaction","fileCount","createdAt","updatedAt"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadProviderDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the provider"},"name":{"type":"string","description":"The name of the provider"},"commercialName":{"type":"string","description":"The commercial name of the provider"},"email":{"type":"string","description":"The email of the provider"},"phone":{"type":"string","description":"The phone of the provider"},"address":{"type":"string","description":"The address of the provider"},"city":{"type":"string","description":"The city of the provider"},"zipCode":{"type":"string","description":"The zip code of the provider"},"country":{"type":"string","description":"The country of the provider"},"firstname":{"type":"string","description":"The firstname of the provider"},"lastname":{"type":"string","description":"The lastname of the provider"}},"required":["id","name","commercialName","email","phone","address","city","zipCode","country","firstname","lastname"]},"ReadEntryDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"type":"object"},"label":{"type":"string"},"fullLabel":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"amount":{"type":"number"},"parent":{"type":"boolean"},"vatRate":{"type":"object"},"vatAmount":{"type":"number"},"vatId":{"type":"number"},"transactionId":{"type":"string"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"transaction":{"$ref":"#/components/schemas/ReadTransactionDto"},"isPersonal":{"type":"boolean"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"accountingAccountId":{"type":"string"},"accountingAccount":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"hasBeenUpdatedByUser":{"type":"boolean"},"isAnnotatedWithRules":{"type":"boolean"},"updatedAt":{"type":"object"},"createdAt":{"type":"object"}},"required":["id","valueDate","label","fullLabel","debit","credit","amount","parent","vatRate","vatAmount","vatId","transactionId","lockedAt","lockedBy","isPersonal","companyId","hasBeenUpdatedByUser","isAnnotatedWithRules","updatedAt","createdAt"]},"ReadTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"account":{"$ref":"#/components/schemas/ReadAccountDto"},"accountId":{"type":"string"},"amount":{"type":"number"},"bridgeAccountId":{"type":"number"},"bridgeCategoryId":{"type":"number"},"bridgeTransactionId":{"type":"number"},"currencyCode":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"fullLabel":{"type":"string"},"isDeleted":{"type":"boolean"},"isFuture":{"type":"boolean"},"label":{"type":"string"},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string","nullable":true},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"}]},"thirdPartyId":{"type":"string","nullable":true},"thirdParty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadThirdPartyDto"}]},"lockedAt":{"format":"date-time","type":"string","nullable":true},"lockedBy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string","nullable":true}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","suggestedAccountingAccount","thirdPartyId","thirdParty","lockedAt","lockedBy","createdAt","updatedAt","bridgeUpdatedAt","valueDate"]},"ReadAccountDto":{"type":"object","properties":{"id":{"type":"string"},"isNew":{"type":"boolean"},"accountingAccountId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"currencyCode":{"type":"string"},"bridgeAccountId":{"type":"number"},"bridgeItemId":{"type":"number"},"bankinItemId":{"type":"string"},"bankListId":{"type":"number"},"bankList":{"type":"object"},"isSynchronized":{"type":"boolean"},"synchronizedAt":{"type":"object"},"desynchronizedAt":{"type":"object"},"startSynchronizedAt":{"type":"object"},"firstSynchronizedAt":{"type":"object"},"lastSyncAt":{"type":"object"},"companyId":{"type":"string"},"accountBalance":{"type":"array","items":{"type":"string"}},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"numberOfTransactionsToAnnotate":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountingAccountId","name","type","currencyCode","bridgeAccountId","bridgeItemId","bankinItemId","bankListId","isSynchronized","synchronizedAt","desynchronizedAt","startSynchronizedAt","firstSynchronizedAt","lastSyncAt","companyId","bridgeUpdatedAt"]},"PaymentMethodLegacy":{"type":"number","enum":[1,2,3,4,5,6,7,8,9]},"OperationType":{"type":"string","enum":["sale","purchase","refund","asset"]},"ReadSuggestedAccountingAccountDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"abbyProfessionalAccountingAccountNumber":{"type":"number"},"abbyPersonalAccountingAccountNumber":{"type":"number"}},"required":["id","name"]},"ReadThirdPartyDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ThirdPartyType"}]},"additionalAddress":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"companyId":{"type":"string"},"commercialName":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/LegacyReadContactDto"}},"country":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"nafCode":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"website":{"type":"string"},"zipCode":{"type":"string"},"accountingAccountId":{"type":"string"},"accountingAccount":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","companyId","accountingAccountId"]},"ThirdPartyType":{"type":"string","enum":["provider","customer"]},"LegacyReadContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"lastname":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"thirdPartyId":{"type":"string"},"role":{"type":"string"},"website":{"type":"string"}},"required":["id"]},"ReadCompanyDto":{"type":"object","properties":{"id":{"type":"string"},"activity":{"$ref":"#/components/schemas/ReadActivityDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ReadStripeProductDto"}},"productsCompany":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyStripeProductDto"}},"additionalAddress":{"type":"string"},"address":{"type":"string"},"caseNumberCommercialCourt":{"type":"string","nullable":true,"deprecated":true},"category":{"type":"string"},"city":{"$ref":"#/components/schemas/ReadCityDto"},"cityId":{"type":"string"},"cityName":{"type":"string","nullable":true,"description":"Free-text city name. Effective city: city?.name ?? cityName."},"commercialCourt":{"type":"string","nullable":true,"deprecated":true},"commercialCourtCode":{"type":"string","nullable":true,"deprecated":true},"rcsGreffeCode":{"type":"string","nullable":true},"rsacGreffeCode":{"type":"string","nullable":true},"commercialName":{"type":"string"},"creationActivityDescription":{"type":"string"},"creationDate":{"format":"date-time","type":"string"},"creationFinishedAt":{"format":"date-time","type":"string"},"registeredType":{"allOf":[{"$ref":"#/components/schemas/RegisteredType"}]},"opportunityType":{"allOf":[{"$ref":"#/components/schemas/OpportunityType"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"creationId":{"type":"string"},"declarationRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"declarationPlatform":{"allOf":[{"$ref":"#/components/schemas/DeclarationPlatform"}]},"hasVat":{"type":"boolean"},"hasAcre":{"type":"boolean"},"impositionType":{"allOf":[{"$ref":"#/components/schemas/ImpositionType"}]},"inseeImmatriculationDate":{"format":"date-time","type":"string"},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegacyLegalStatus"}]},"taxSystem":{"allOf":[{"$ref":"#/components/schemas/TaxSystem"}]},"nafCode":{"type":"string"},"name":{"type":"string"},"otherActivity":{"type":"string"},"secondaryActivity":{"type":"string"},"rcsImmatriculationDate":{"format":"date-time","type":"string"},"rcsNumber":{"type":"string"},"rmNumber":{"type":"string","deprecated":true},"rneNumber":{"type":"string"},"rsacNumber":{"type":"string"},"rnaNumber":{"type":"string"},"selectedRegisters":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/RegisterType"}},"departmentRmImmatriculation":{"type":"string"},"registeredAt":{"format":"date-time","type":"string"},"shareCapital":{"type":"number"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"vatRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"zipCode":{"type":"string"},"trackingCompanySteps":{"type":"array","items":{"$ref":"#/components/schemas/ReadTrackingCompanyStepDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReadNoteDto"}},"referent":{"$ref":"#/components/schemas/ReadUserDto"},"signatureFileId":{"type":"string"},"referentId":{"type":"string"},"addressType":{"allOf":[{"$ref":"#/components/schemas/AddressType"}]},"recordNumber":{"type":"string"},"customerId":{"type":"string"},"declarationUserId":{"type":"string"},"declarationUser":{"$ref":"#/components/schemas/ReadUserDto"},"startDeclarationAt":{"format":"date-time","type":"string"},"endDeclarationAt":{"format":"date-time","type":"string"},"verifiedAt":{"format":"date-time","type":"string"},"sapAgreementDate":{"format":"date-time","type":"string"},"firstVatReportingDate":{"format":"date-time","type":"string"}},"required":["id","city","referent"]},"ReadActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"liberalType":{"allOf":[{"$ref":"#/components/schemas/LiberalType"}]},"isRegulated":{"type":"boolean"},"parentId":{"type":"number"},"parent":{"$ref":"#/components/schemas/ReadParentActivityDto"},"hidden":{"type":"boolean"},"isSap":{"type":"boolean"}},"required":["id","name","isRegulated","parent","hidden","isSap"]},"LiberalType":{"type":"number","enum":[1,2,3]},"ReadParentActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"ReadStripeProductDto":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"productId":{"type":"string"},"multiple":{"type":"boolean"},"recurring":{"type":"boolean"},"trial":{"type":"object"},"requireCreditCard":{"type":"boolean"}},"required":["id","productId","multiple","recurring","trial","requireCreditCard"]},"StripeProductType":{"type":"string","enum":["abby_plus","acre","cfe","abby_free","abby_start","abby_creation_start","abby_creation_start_premium","abby_creation_start_business","abby_pro","abby_business","abby_ce","meeting_with_an_expert","formation_client","formation_communiquer","formation_client_communiquer_discount","billing_template_2","billing_template_3","abby_academie_marketing_communication","abby_academie_creation","abby_contact"]},"ReadCompanyStripeProductDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"productId":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"product":{"$ref":"#/components/schemas/ReadStripeProductDto"},"amount":{"type":"number"},"frequency":{"allOf":[{"$ref":"#/components/schemas/StripeProductFrequency"}]},"subscriptionId":{"type":"string"},"consumedAt":{"format":"date-time","type":"string"},"manuallyAdded":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"failedBillingDueDate":{"format":"date-time","type":"string"},"lastFailedAt":{"format":"date-time","type":"string"},"failedInvoiceUrl":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lockUntil":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"trialAt":{"format":"date-time","type":"string"},"lastPaidAt":{"format":"date-time","type":"string"},"extendedTrialAt":{"format":"date-time","type":"string"}},"required":["id","companyId","productId"]},"StripeProductFrequency":{"type":"string","enum":["year","month","semiannual"]},"ReadCityDto":{"type":"object","properties":{"cityCode":{"type":"string"},"name":{"type":"string"}},"required":["cityCode","name"]},"RegisteredType":{"type":"number","enum":[1,2,3]},"OpportunityType":{"type":"string","enum":["orders","projects","opportunities"]},"CreationCompanyStep":{"type":"string","enum":["creation_requested","files_requested","declaration_sent","declaration_refused","company_created","urssaf_account_created","impots_account_created","acre_requested","cfe_declared","all_files_deposed","has_file_refused","all_files_validated","none"]},"CreationDashboardStep":{"type":"string","enum":["files_to_validate","declaration_to_do","declaration_in_progress","pending_declaration","declaration_to_report","declaration_refused","declaration_pending_denial","declaration_to_retry","regularisation_gu","refus_gu","to_call_cfe","declared","declaration_accepted","to_call","ended","abandoned","none"]},"Recurrence":{"type":"number","enum":[1,2,3]},"DeclarationPlatform":{"type":"number","enum":[6,1,2,3,4,5]},"ImpositionType":{"type":"number","enum":[1,2]},"LegacyLegalStatus":{"type":"number","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"TaxSystem":{"type":"string","enum":["micro_bic","micro_bnc","micro_bic_or_bnc","micro_ba","micro_foncier","micro_revenu_foncier_ir_2072_2044","reel_simplifie_ir_2033_2031","reel_normal_ir_2033_2031","reel_simplifie_is_2033_2065","reel_normal_is_2050_2065","declaration_controlee_2035","association_non_lucratif"]},"RegisterType":{"type":"string","enum":["RCS","RNE","RSAC","RNA"]},"ReadTrackingCompanyStepDto":{"type":"object","properties":{"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"referentId":{"type":"string"},"referentFullname":{"type":"string"},"authorId":{"type":"string"},"authorFullname":{"type":"string"}},"required":["companyId","createdAt","currentStep","currentDashboardStep"]},"ReadNoteDto":{"type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/components/schemas/ReadUserDto"},"authorId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"companyId":{"type":"string"},"text":{"type":"string"}},"required":["id","authorId","companyId","text"]},"ReadUserDto":{"type":"object","properties":{"id":{"type":"string"},"affiliationUrl":{"type":"string"},"affilaeClickId":{"type":"string"},"isCMA":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"birthDate":{"type":"object"},"email":{"type":"string"},"fullName":{"type":"string"},"firebaseToken":{"type":"string"},"profilePictureId":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"zipCode":{"type":"string"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/LegacyCivility"}]},"provider":{"allOf":[{"$ref":"#/components/schemas/ProviderSignUp"}]},"onboardingAt":{"format":"date-time","type":"string"},"onboardingId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wantsActivityStartAt":{"format":"date-time","type":"string"}},"required":["id"]},"LegacyCivility":{"type":"number","enum":[1,2]},"ProviderSignUp":{"type":"string","enum":["google.com","facebook.com","apple.com","password","custom"]},"AddressType":{"type":"number","enum":[4,1,3,2]},"ReadAccountingAccountDto":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"number"},"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isVatRelated":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"number"},"position":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"},"parent":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"entryCount":{"type":"number"},"lastUsedAt":{"format":"date-time","type":"string"},"entries":{"type":"array","items":{"type":"string"}}},"required":["id","category","color","description","icon","isHidden","isPersonal","isVatRelated","name","number","tags"]},"ReadPurchaseRegisterLineDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register line"},"label":{"type":"string","description":"The label of the purchase register line"},"amount":{"type":"number","description":"The amount of the purchase register line"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register line"},"vatCode":{"description":"The vat code of the purchase register line","allOf":[{"$ref":"#/components/schemas/VatCode"}]},"vatRate":{"type":"number","description":"The vat rate of the purchase register line"},"accountingAccount":{"description":"The accounting account of the purchase register line","allOf":[{"$ref":"#/components/schemas/ReadAccountingAccountDto"}]}},"required":["id","label","amount","vatAmount","vatCode","vatRate","accountingAccount"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]}}},"paths":{"/v3/purchaseRegister/{id}":{"get":{"operationId":"PurchaseRegisterController_retrieve_v3","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the purchase register entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase register entry retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadPurchaseRegisterItemDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Purchase register entry not found"}},"summary":"Get a purchase register entry by id","tags":["PurchaseRegister"]}}}}
```

## Modifier une écriture

`PUT` reprend le corps de la création, avec les mêmes champs obligatoires : renvoyez l'écriture entière, corrigée.

```bash
curl -X PUT https://api.abby.fr/v3/purchaseRegister/$ENTRY_ID \
  -H "Authorization: Bearer $ABBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "valueDate": "2026-11-18T00:00:00.000Z",
    "paymentMethodUsed": 1,
    "amount": 14400,
    "thirdPartyId": "'"$PROVIDER_ID"'",
    "label": "Fournitures de bureau",
    "reference": "FA-2026-0042",
    "entries": [
      {
        "amount": 14400,
        "isPersonal": false,
        "vatId": 1,
        "accountingAccountNumber": 606300
      }
    ]
  }'
```

## Update a purchase register entry

> Same payload semantics as \`POST /v3/purchaseRegister\`. See that endpoint for \`thirdPartyId\`, \`entries\[].vatId\` and \`entries\[].accountingAccountNumber\` documentation.

```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":{"UpdatePurchaseRegisterDto":{"type":"object","properties":{"valueDate":{"format":"date-time","type":"string"},"paymentMethodUsed":{"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string"},"amount":{"type":"number"},"thirdPartyId":{"type":"string"},"label":{"type":"string"},"reference":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileInputDto"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/AnnotateEntryDto"}}},"required":["valueDate","paymentMethodUsed","amount","thirdPartyId","label","entries"]},"PaymentMethodLegacy":{"type":"number","enum":[1,2,3,4,5,6,7,8,9]},"FileInputDto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"AnnotateEntryDto":{"type":"object","properties":{"vatId":{"type":"number"},"accountingAccountNumber":{"type":"number"},"isPersonal":{"type":"boolean"},"amount":{"type":"number"}},"required":["isPersonal","amount"]},"ReadPurchaseRegisterItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register entry"},"label":{"type":"string","description":"The label of the purchase register entry"},"reference":{"type":"string","description":"The reference of the purchase register entry"},"amount":{"type":"number","description":"The amount of the purchase register entry"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register entry"},"paymentMethod":{"description":"The payment method of the purchase register entry","allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"otherMethod":{"type":"string","description":"The other method of the purchase register entry"},"provider":{"description":"The provider of the purchase register entry","allOf":[{"$ref":"#/components/schemas/ReadProviderDto"}]},"entries":{"description":"The entries of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"lines":{"description":"The lines of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadPurchaseRegisterLineDto"}},"emittedAt":{"type":"string","description":"The emitted at of the purchase register entry"},"hasTransaction":{"type":"boolean","description":"The has transaction of the purchase register entry"},"fileCount":{"type":"number","description":"The file count of the purchase register entry"},"createdAt":{"type":"number","description":"The created at of the purchase register entry"},"updatedAt":{"type":"number","description":"The updated at of the purchase register entry"}},"required":["id","label","reference","amount","vatAmount","paymentMethod","entries","lines","emittedAt","hasTransaction","fileCount","createdAt","updatedAt"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadProviderDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the provider"},"name":{"type":"string","description":"The name of the provider"},"commercialName":{"type":"string","description":"The commercial name of the provider"},"email":{"type":"string","description":"The email of the provider"},"phone":{"type":"string","description":"The phone of the provider"},"address":{"type":"string","description":"The address of the provider"},"city":{"type":"string","description":"The city of the provider"},"zipCode":{"type":"string","description":"The zip code of the provider"},"country":{"type":"string","description":"The country of the provider"},"firstname":{"type":"string","description":"The firstname of the provider"},"lastname":{"type":"string","description":"The lastname of the provider"}},"required":["id","name","commercialName","email","phone","address","city","zipCode","country","firstname","lastname"]},"ReadEntryDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"type":"object"},"label":{"type":"string"},"fullLabel":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"amount":{"type":"number"},"parent":{"type":"boolean"},"vatRate":{"type":"object"},"vatAmount":{"type":"number"},"vatId":{"type":"number"},"transactionId":{"type":"string"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"transaction":{"$ref":"#/components/schemas/ReadTransactionDto"},"isPersonal":{"type":"boolean"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"accountingAccountId":{"type":"string"},"accountingAccount":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"hasBeenUpdatedByUser":{"type":"boolean"},"isAnnotatedWithRules":{"type":"boolean"},"updatedAt":{"type":"object"},"createdAt":{"type":"object"}},"required":["id","valueDate","label","fullLabel","debit","credit","amount","parent","vatRate","vatAmount","vatId","transactionId","lockedAt","lockedBy","isPersonal","companyId","hasBeenUpdatedByUser","isAnnotatedWithRules","updatedAt","createdAt"]},"ReadTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"account":{"$ref":"#/components/schemas/ReadAccountDto"},"accountId":{"type":"string"},"amount":{"type":"number"},"bridgeAccountId":{"type":"number"},"bridgeCategoryId":{"type":"number"},"bridgeTransactionId":{"type":"number"},"currencyCode":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"fullLabel":{"type":"string"},"isDeleted":{"type":"boolean"},"isFuture":{"type":"boolean"},"label":{"type":"string"},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string","nullable":true},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"}]},"thirdPartyId":{"type":"string","nullable":true},"thirdParty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadThirdPartyDto"}]},"lockedAt":{"format":"date-time","type":"string","nullable":true},"lockedBy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string","nullable":true}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","suggestedAccountingAccount","thirdPartyId","thirdParty","lockedAt","lockedBy","createdAt","updatedAt","bridgeUpdatedAt","valueDate"]},"ReadAccountDto":{"type":"object","properties":{"id":{"type":"string"},"isNew":{"type":"boolean"},"accountingAccountId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"currencyCode":{"type":"string"},"bridgeAccountId":{"type":"number"},"bridgeItemId":{"type":"number"},"bankinItemId":{"type":"string"},"bankListId":{"type":"number"},"bankList":{"type":"object"},"isSynchronized":{"type":"boolean"},"synchronizedAt":{"type":"object"},"desynchronizedAt":{"type":"object"},"startSynchronizedAt":{"type":"object"},"firstSynchronizedAt":{"type":"object"},"lastSyncAt":{"type":"object"},"companyId":{"type":"string"},"accountBalance":{"type":"array","items":{"type":"string"}},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"numberOfTransactionsToAnnotate":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountingAccountId","name","type","currencyCode","bridgeAccountId","bridgeItemId","bankinItemId","bankListId","isSynchronized","synchronizedAt","desynchronizedAt","startSynchronizedAt","firstSynchronizedAt","lastSyncAt","companyId","bridgeUpdatedAt"]},"OperationType":{"type":"string","enum":["sale","purchase","refund","asset"]},"ReadSuggestedAccountingAccountDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"abbyProfessionalAccountingAccountNumber":{"type":"number"},"abbyPersonalAccountingAccountNumber":{"type":"number"}},"required":["id","name"]},"ReadThirdPartyDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ThirdPartyType"}]},"additionalAddress":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"companyId":{"type":"string"},"commercialName":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/LegacyReadContactDto"}},"country":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"nafCode":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"website":{"type":"string"},"zipCode":{"type":"string"},"accountingAccountId":{"type":"string"},"accountingAccount":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","companyId","accountingAccountId"]},"ThirdPartyType":{"type":"string","enum":["provider","customer"]},"LegacyReadContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"lastname":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"thirdPartyId":{"type":"string"},"role":{"type":"string"},"website":{"type":"string"}},"required":["id"]},"ReadCompanyDto":{"type":"object","properties":{"id":{"type":"string"},"activity":{"$ref":"#/components/schemas/ReadActivityDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ReadStripeProductDto"}},"productsCompany":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyStripeProductDto"}},"additionalAddress":{"type":"string"},"address":{"type":"string"},"caseNumberCommercialCourt":{"type":"string","nullable":true,"deprecated":true},"category":{"type":"string"},"city":{"$ref":"#/components/schemas/ReadCityDto"},"cityId":{"type":"string"},"cityName":{"type":"string","nullable":true,"description":"Free-text city name. Effective city: city?.name ?? cityName."},"commercialCourt":{"type":"string","nullable":true,"deprecated":true},"commercialCourtCode":{"type":"string","nullable":true,"deprecated":true},"rcsGreffeCode":{"type":"string","nullable":true},"rsacGreffeCode":{"type":"string","nullable":true},"commercialName":{"type":"string"},"creationActivityDescription":{"type":"string"},"creationDate":{"format":"date-time","type":"string"},"creationFinishedAt":{"format":"date-time","type":"string"},"registeredType":{"allOf":[{"$ref":"#/components/schemas/RegisteredType"}]},"opportunityType":{"allOf":[{"$ref":"#/components/schemas/OpportunityType"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"creationId":{"type":"string"},"declarationRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"declarationPlatform":{"allOf":[{"$ref":"#/components/schemas/DeclarationPlatform"}]},"hasVat":{"type":"boolean"},"hasAcre":{"type":"boolean"},"impositionType":{"allOf":[{"$ref":"#/components/schemas/ImpositionType"}]},"inseeImmatriculationDate":{"format":"date-time","type":"string"},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegacyLegalStatus"}]},"taxSystem":{"allOf":[{"$ref":"#/components/schemas/TaxSystem"}]},"nafCode":{"type":"string"},"name":{"type":"string"},"otherActivity":{"type":"string"},"secondaryActivity":{"type":"string"},"rcsImmatriculationDate":{"format":"date-time","type":"string"},"rcsNumber":{"type":"string"},"rmNumber":{"type":"string","deprecated":true},"rneNumber":{"type":"string"},"rsacNumber":{"type":"string"},"rnaNumber":{"type":"string"},"selectedRegisters":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/RegisterType"}},"departmentRmImmatriculation":{"type":"string"},"registeredAt":{"format":"date-time","type":"string"},"shareCapital":{"type":"number"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"vatRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"zipCode":{"type":"string"},"trackingCompanySteps":{"type":"array","items":{"$ref":"#/components/schemas/ReadTrackingCompanyStepDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReadNoteDto"}},"referent":{"$ref":"#/components/schemas/ReadUserDto"},"signatureFileId":{"type":"string"},"referentId":{"type":"string"},"addressType":{"allOf":[{"$ref":"#/components/schemas/AddressType"}]},"recordNumber":{"type":"string"},"customerId":{"type":"string"},"declarationUserId":{"type":"string"},"declarationUser":{"$ref":"#/components/schemas/ReadUserDto"},"startDeclarationAt":{"format":"date-time","type":"string"},"endDeclarationAt":{"format":"date-time","type":"string"},"verifiedAt":{"format":"date-time","type":"string"},"sapAgreementDate":{"format":"date-time","type":"string"},"firstVatReportingDate":{"format":"date-time","type":"string"}},"required":["id","city","referent"]},"ReadActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"liberalType":{"allOf":[{"$ref":"#/components/schemas/LiberalType"}]},"isRegulated":{"type":"boolean"},"parentId":{"type":"number"},"parent":{"$ref":"#/components/schemas/ReadParentActivityDto"},"hidden":{"type":"boolean"},"isSap":{"type":"boolean"}},"required":["id","name","isRegulated","parent","hidden","isSap"]},"LiberalType":{"type":"number","enum":[1,2,3]},"ReadParentActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"ReadStripeProductDto":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"productId":{"type":"string"},"multiple":{"type":"boolean"},"recurring":{"type":"boolean"},"trial":{"type":"object"},"requireCreditCard":{"type":"boolean"}},"required":["id","productId","multiple","recurring","trial","requireCreditCard"]},"StripeProductType":{"type":"string","enum":["abby_plus","acre","cfe","abby_free","abby_start","abby_creation_start","abby_creation_start_premium","abby_creation_start_business","abby_pro","abby_business","abby_ce","meeting_with_an_expert","formation_client","formation_communiquer","formation_client_communiquer_discount","billing_template_2","billing_template_3","abby_academie_marketing_communication","abby_academie_creation","abby_contact"]},"ReadCompanyStripeProductDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"productId":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"product":{"$ref":"#/components/schemas/ReadStripeProductDto"},"amount":{"type":"number"},"frequency":{"allOf":[{"$ref":"#/components/schemas/StripeProductFrequency"}]},"subscriptionId":{"type":"string"},"consumedAt":{"format":"date-time","type":"string"},"manuallyAdded":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"failedBillingDueDate":{"format":"date-time","type":"string"},"lastFailedAt":{"format":"date-time","type":"string"},"failedInvoiceUrl":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lockUntil":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"trialAt":{"format":"date-time","type":"string"},"lastPaidAt":{"format":"date-time","type":"string"},"extendedTrialAt":{"format":"date-time","type":"string"}},"required":["id","companyId","productId"]},"StripeProductFrequency":{"type":"string","enum":["year","month","semiannual"]},"ReadCityDto":{"type":"object","properties":{"cityCode":{"type":"string"},"name":{"type":"string"}},"required":["cityCode","name"]},"RegisteredType":{"type":"number","enum":[1,2,3]},"OpportunityType":{"type":"string","enum":["orders","projects","opportunities"]},"CreationCompanyStep":{"type":"string","enum":["creation_requested","files_requested","declaration_sent","declaration_refused","company_created","urssaf_account_created","impots_account_created","acre_requested","cfe_declared","all_files_deposed","has_file_refused","all_files_validated","none"]},"CreationDashboardStep":{"type":"string","enum":["files_to_validate","declaration_to_do","declaration_in_progress","pending_declaration","declaration_to_report","declaration_refused","declaration_pending_denial","declaration_to_retry","regularisation_gu","refus_gu","to_call_cfe","declared","declaration_accepted","to_call","ended","abandoned","none"]},"Recurrence":{"type":"number","enum":[1,2,3]},"DeclarationPlatform":{"type":"number","enum":[6,1,2,3,4,5]},"ImpositionType":{"type":"number","enum":[1,2]},"LegacyLegalStatus":{"type":"number","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"TaxSystem":{"type":"string","enum":["micro_bic","micro_bnc","micro_bic_or_bnc","micro_ba","micro_foncier","micro_revenu_foncier_ir_2072_2044","reel_simplifie_ir_2033_2031","reel_normal_ir_2033_2031","reel_simplifie_is_2033_2065","reel_normal_is_2050_2065","declaration_controlee_2035","association_non_lucratif"]},"RegisterType":{"type":"string","enum":["RCS","RNE","RSAC","RNA"]},"ReadTrackingCompanyStepDto":{"type":"object","properties":{"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"referentId":{"type":"string"},"referentFullname":{"type":"string"},"authorId":{"type":"string"},"authorFullname":{"type":"string"}},"required":["companyId","createdAt","currentStep","currentDashboardStep"]},"ReadNoteDto":{"type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/components/schemas/ReadUserDto"},"authorId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"companyId":{"type":"string"},"text":{"type":"string"}},"required":["id","authorId","companyId","text"]},"ReadUserDto":{"type":"object","properties":{"id":{"type":"string"},"affiliationUrl":{"type":"string"},"affilaeClickId":{"type":"string"},"isCMA":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"birthDate":{"type":"object"},"email":{"type":"string"},"fullName":{"type":"string"},"firebaseToken":{"type":"string"},"profilePictureId":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"zipCode":{"type":"string"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/LegacyCivility"}]},"provider":{"allOf":[{"$ref":"#/components/schemas/ProviderSignUp"}]},"onboardingAt":{"format":"date-time","type":"string"},"onboardingId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wantsActivityStartAt":{"format":"date-time","type":"string"}},"required":["id"]},"LegacyCivility":{"type":"number","enum":[1,2]},"ProviderSignUp":{"type":"string","enum":["google.com","facebook.com","apple.com","password","custom"]},"AddressType":{"type":"number","enum":[4,1,3,2]},"ReadAccountingAccountDto":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"number"},"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isVatRelated":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"number"},"position":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"},"parent":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"entryCount":{"type":"number"},"lastUsedAt":{"format":"date-time","type":"string"},"entries":{"type":"array","items":{"type":"string"}}},"required":["id","category","color","description","icon","isHidden","isPersonal","isVatRelated","name","number","tags"]},"ReadPurchaseRegisterLineDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register line"},"label":{"type":"string","description":"The label of the purchase register line"},"amount":{"type":"number","description":"The amount of the purchase register line"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register line"},"vatCode":{"description":"The vat code of the purchase register line","allOf":[{"$ref":"#/components/schemas/VatCode"}]},"vatRate":{"type":"number","description":"The vat rate of the purchase register line"},"accountingAccount":{"description":"The accounting account of the purchase register line","allOf":[{"$ref":"#/components/schemas/ReadAccountingAccountDto"}]}},"required":["id","label","amount","vatAmount","vatCode","vatRate","accountingAccount"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]}}},"paths":{"/v3/purchaseRegister/{id}":{"put":{"description":"Same payload semantics as `POST /v3/purchaseRegister`. See that endpoint for `thirdPartyId`, `entries[].vatId` and `entries[].accountingAccountNumber` documentation.","operationId":"PurchaseRegisterController_update_v3","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the purchase register entry to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseRegisterDto"}}}},"responses":{"200":{"description":"Purchase register entry updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadPurchaseRegisterItemDto"}}}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Purchase register entry not found"}},"summary":"Update a purchase register entry","tags":["PurchaseRegister"]}}}}
```

## Supprimer une écriture

La réponse est un 204 sans corps.

```bash
curl -X DELETE https://api.abby.fr/v3/purchaseRegister/$ENTRY_ID \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## DELETE /v3/purchaseRegister/{id}

> Delete a purchase register entry

```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."}}},"paths":{"/v3/purchaseRegister/{id}":{"delete":{"operationId":"PurchaseRegisterController_remove_v3","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the purchase register entry to delete","schema":{"type":"string"}}],"responses":{"204":{"description":"Purchase register entry deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Purchase register entry not found"}},"summary":"Delete a purchase register entry","tags":["PurchaseRegister"]}}}}
```

## Lister les écritures

La liste est paginée sous forme d'enveloppe (`docs`, `totalDocs`, `page`, `limit`, `totalPages`, `hasNextPage`, etc.). Voir [Pagination](https://docs.abby.fr/concepts/pagination.md).

| Paramètre        | Obligatoire | Rôle                                                                                                        |
| ---------------- | ----------- | ----------------------------------------------------------------------------------------------------------- |
| `page`           | oui         | Numéro de page, à partir de 1.                                                                              |
| `limit`          | oui         | Nombre d'éléments par page, 100 au maximum.                                                                 |
| `search`         | non         | Terme cherché dans `label` et `reference`.                                                                  |
| `range`          | non         | Période : deux bornes ISO 8601, début puis fin. Répétez le paramètre : `range=2026-01-01&range=2026-12-31`. |
| `attachments`    | non         | `true` : seulement les écritures avec pièce jointe. `false` : seulement celles sans pièce jointe.           |
| `min`, `max`     | non         | Bornes appliquées au champ `amount` de l'écriture.                                                          |
| `provider`       | non         | Identifiant d'un fournisseur.                                                                               |
| `orderBy`        | non         | `valueDate`, `amount`, `reference` ou `label`.                                                              |
| `orderDirection` | non         | `ASC` ou `DESC`.                                                                                            |

```bash
curl "https://api.abby.fr/v3/purchaseRegister/list?page=1&limit=20&orderBy=valueDate&orderDirection=DESC" \
  -H "Authorization: Bearer $ABBY_API_KEY"
```

## GET /v3/purchaseRegister/list

> List purchase register entries paginated

```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":{"PurchaseRegisterOrderBy":{"type":"string","enum":["valueDate","amount","reference","label"]},"OrderDirection":{"type":"string","enum":["ASC","DESC"]},"ReadPurchaseRegisterCollectionDto":{"type":"object","properties":{"countWithoutFilters":{"type":"number"},"totalDocs":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"hasNextPage":{"type":"boolean"},"hasPrevPage":{"type":"boolean"},"nextPage":{"type":"number"},"page":{"type":"number"},"prevPage":{"type":"number"},"docs":{"description":"The list of purchase register entries","type":"array","items":{"$ref":"#/components/schemas/ReadPurchaseRegisterItemDto"}}},"required":["countWithoutFilters","totalDocs","limit","totalPages","hasNextPage","hasPrevPage","nextPage","page","prevPage","docs"]},"ReadPurchaseRegisterItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register entry"},"label":{"type":"string","description":"The label of the purchase register entry"},"reference":{"type":"string","description":"The reference of the purchase register entry"},"amount":{"type":"number","description":"The amount of the purchase register entry"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register entry"},"paymentMethod":{"description":"The payment method of the purchase register entry","allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"otherMethod":{"type":"string","description":"The other method of the purchase register entry"},"provider":{"description":"The provider of the purchase register entry","allOf":[{"$ref":"#/components/schemas/ReadProviderDto"}]},"entries":{"description":"The entries of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"lines":{"description":"The lines of the purchase register entry","type":"array","items":{"$ref":"#/components/schemas/ReadPurchaseRegisterLineDto"}},"emittedAt":{"type":"string","description":"The emitted at of the purchase register entry"},"hasTransaction":{"type":"boolean","description":"The has transaction of the purchase register entry"},"fileCount":{"type":"number","description":"The file count of the purchase register entry"},"createdAt":{"type":"number","description":"The created at of the purchase register entry"},"updatedAt":{"type":"number","description":"The updated at of the purchase register entry"}},"required":["id","label","reference","amount","vatAmount","paymentMethod","entries","lines","emittedAt","hasTransaction","fileCount","createdAt","updatedAt"]},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadProviderDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the provider"},"name":{"type":"string","description":"The name of the provider"},"commercialName":{"type":"string","description":"The commercial name of the provider"},"email":{"type":"string","description":"The email of the provider"},"phone":{"type":"string","description":"The phone of the provider"},"address":{"type":"string","description":"The address of the provider"},"city":{"type":"string","description":"The city of the provider"},"zipCode":{"type":"string","description":"The zip code of the provider"},"country":{"type":"string","description":"The country of the provider"},"firstname":{"type":"string","description":"The firstname of the provider"},"lastname":{"type":"string","description":"The lastname of the provider"}},"required":["id","name","commercialName","email","phone","address","city","zipCode","country","firstname","lastname"]},"ReadEntryDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"type":"object"},"label":{"type":"string"},"fullLabel":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"amount":{"type":"number"},"parent":{"type":"boolean"},"vatRate":{"type":"object"},"vatAmount":{"type":"number"},"vatId":{"type":"number"},"transactionId":{"type":"string"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"transaction":{"$ref":"#/components/schemas/ReadTransactionDto"},"isPersonal":{"type":"boolean"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"accountingAccountId":{"type":"string"},"accountingAccount":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"hasBeenUpdatedByUser":{"type":"boolean"},"isAnnotatedWithRules":{"type":"boolean"},"updatedAt":{"type":"object"},"createdAt":{"type":"object"}},"required":["id","valueDate","label","fullLabel","debit","credit","amount","parent","vatRate","vatAmount","vatId","transactionId","lockedAt","lockedBy","isPersonal","companyId","hasBeenUpdatedByUser","isAnnotatedWithRules","updatedAt","createdAt"]},"ReadTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"account":{"$ref":"#/components/schemas/ReadAccountDto"},"accountId":{"type":"string"},"amount":{"type":"number"},"bridgeAccountId":{"type":"number"},"bridgeCategoryId":{"type":"number"},"bridgeTransactionId":{"type":"number"},"currencyCode":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"fullLabel":{"type":"string"},"isDeleted":{"type":"boolean"},"isFuture":{"type":"boolean"},"label":{"type":"string"},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string","nullable":true},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"}]},"thirdPartyId":{"type":"string","nullable":true},"thirdParty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadThirdPartyDto"}]},"lockedAt":{"format":"date-time","type":"string","nullable":true},"lockedBy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string","nullable":true}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","suggestedAccountingAccount","thirdPartyId","thirdParty","lockedAt","lockedBy","createdAt","updatedAt","bridgeUpdatedAt","valueDate"]},"ReadAccountDto":{"type":"object","properties":{"id":{"type":"string"},"isNew":{"type":"boolean"},"accountingAccountId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"currencyCode":{"type":"string"},"bridgeAccountId":{"type":"number"},"bridgeItemId":{"type":"number"},"bankinItemId":{"type":"string"},"bankListId":{"type":"number"},"bankList":{"type":"object"},"isSynchronized":{"type":"boolean"},"synchronizedAt":{"type":"object"},"desynchronizedAt":{"type":"object"},"startSynchronizedAt":{"type":"object"},"firstSynchronizedAt":{"type":"object"},"lastSyncAt":{"type":"object"},"companyId":{"type":"string"},"accountBalance":{"type":"array","items":{"type":"string"}},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"numberOfTransactionsToAnnotate":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountingAccountId","name","type","currencyCode","bridgeAccountId","bridgeItemId","bankinItemId","bankListId","isSynchronized","synchronizedAt","desynchronizedAt","startSynchronizedAt","firstSynchronizedAt","lastSyncAt","companyId","bridgeUpdatedAt"]},"PaymentMethodLegacy":{"type":"number","enum":[1,2,3,4,5,6,7,8,9]},"OperationType":{"type":"string","enum":["sale","purchase","refund","asset"]},"ReadSuggestedAccountingAccountDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"abbyProfessionalAccountingAccountNumber":{"type":"number"},"abbyPersonalAccountingAccountNumber":{"type":"number"}},"required":["id","name"]},"ReadThirdPartyDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ThirdPartyType"}]},"additionalAddress":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"companyId":{"type":"string"},"commercialName":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/LegacyReadContactDto"}},"country":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"nafCode":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"website":{"type":"string"},"zipCode":{"type":"string"},"accountingAccountId":{"type":"string"},"accountingAccount":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","companyId","accountingAccountId"]},"ThirdPartyType":{"type":"string","enum":["provider","customer"]},"LegacyReadContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"lastname":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"thirdPartyId":{"type":"string"},"role":{"type":"string"},"website":{"type":"string"}},"required":["id"]},"ReadCompanyDto":{"type":"object","properties":{"id":{"type":"string"},"activity":{"$ref":"#/components/schemas/ReadActivityDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ReadStripeProductDto"}},"productsCompany":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyStripeProductDto"}},"additionalAddress":{"type":"string"},"address":{"type":"string"},"caseNumberCommercialCourt":{"type":"string","nullable":true,"deprecated":true},"category":{"type":"string"},"city":{"$ref":"#/components/schemas/ReadCityDto"},"cityId":{"type":"string"},"cityName":{"type":"string","nullable":true,"description":"Free-text city name. Effective city: city?.name ?? cityName."},"commercialCourt":{"type":"string","nullable":true,"deprecated":true},"commercialCourtCode":{"type":"string","nullable":true,"deprecated":true},"rcsGreffeCode":{"type":"string","nullable":true},"rsacGreffeCode":{"type":"string","nullable":true},"commercialName":{"type":"string"},"creationActivityDescription":{"type":"string"},"creationDate":{"format":"date-time","type":"string"},"creationFinishedAt":{"format":"date-time","type":"string"},"registeredType":{"allOf":[{"$ref":"#/components/schemas/RegisteredType"}]},"opportunityType":{"allOf":[{"$ref":"#/components/schemas/OpportunityType"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"creationId":{"type":"string"},"declarationRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"declarationPlatform":{"allOf":[{"$ref":"#/components/schemas/DeclarationPlatform"}]},"hasVat":{"type":"boolean"},"hasAcre":{"type":"boolean"},"impositionType":{"allOf":[{"$ref":"#/components/schemas/ImpositionType"}]},"inseeImmatriculationDate":{"format":"date-time","type":"string"},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegacyLegalStatus"}]},"taxSystem":{"allOf":[{"$ref":"#/components/schemas/TaxSystem"}]},"nafCode":{"type":"string"},"name":{"type":"string"},"otherActivity":{"type":"string"},"secondaryActivity":{"type":"string"},"rcsImmatriculationDate":{"format":"date-time","type":"string"},"rcsNumber":{"type":"string"},"rmNumber":{"type":"string","deprecated":true},"rneNumber":{"type":"string"},"rsacNumber":{"type":"string"},"rnaNumber":{"type":"string"},"selectedRegisters":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/RegisterType"}},"departmentRmImmatriculation":{"type":"string"},"registeredAt":{"format":"date-time","type":"string"},"shareCapital":{"type":"number"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"vatRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"zipCode":{"type":"string"},"trackingCompanySteps":{"type":"array","items":{"$ref":"#/components/schemas/ReadTrackingCompanyStepDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReadNoteDto"}},"referent":{"$ref":"#/components/schemas/ReadUserDto"},"signatureFileId":{"type":"string"},"referentId":{"type":"string"},"addressType":{"allOf":[{"$ref":"#/components/schemas/AddressType"}]},"recordNumber":{"type":"string"},"customerId":{"type":"string"},"declarationUserId":{"type":"string"},"declarationUser":{"$ref":"#/components/schemas/ReadUserDto"},"startDeclarationAt":{"format":"date-time","type":"string"},"endDeclarationAt":{"format":"date-time","type":"string"},"verifiedAt":{"format":"date-time","type":"string"},"sapAgreementDate":{"format":"date-time","type":"string"},"firstVatReportingDate":{"format":"date-time","type":"string"}},"required":["id","city","referent"]},"ReadActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"liberalType":{"allOf":[{"$ref":"#/components/schemas/LiberalType"}]},"isRegulated":{"type":"boolean"},"parentId":{"type":"number"},"parent":{"$ref":"#/components/schemas/ReadParentActivityDto"},"hidden":{"type":"boolean"},"isSap":{"type":"boolean"}},"required":["id","name","isRegulated","parent","hidden","isSap"]},"LiberalType":{"type":"number","enum":[1,2,3]},"ReadParentActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"ReadStripeProductDto":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"productId":{"type":"string"},"multiple":{"type":"boolean"},"recurring":{"type":"boolean"},"trial":{"type":"object"},"requireCreditCard":{"type":"boolean"}},"required":["id","productId","multiple","recurring","trial","requireCreditCard"]},"StripeProductType":{"type":"string","enum":["abby_plus","acre","cfe","abby_free","abby_start","abby_creation_start","abby_creation_start_premium","abby_creation_start_business","abby_pro","abby_business","abby_ce","meeting_with_an_expert","formation_client","formation_communiquer","formation_client_communiquer_discount","billing_template_2","billing_template_3","abby_academie_marketing_communication","abby_academie_creation","abby_contact"]},"ReadCompanyStripeProductDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"productId":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"product":{"$ref":"#/components/schemas/ReadStripeProductDto"},"amount":{"type":"number"},"frequency":{"allOf":[{"$ref":"#/components/schemas/StripeProductFrequency"}]},"subscriptionId":{"type":"string"},"consumedAt":{"format":"date-time","type":"string"},"manuallyAdded":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"failedBillingDueDate":{"format":"date-time","type":"string"},"lastFailedAt":{"format":"date-time","type":"string"},"failedInvoiceUrl":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lockUntil":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"trialAt":{"format":"date-time","type":"string"},"lastPaidAt":{"format":"date-time","type":"string"},"extendedTrialAt":{"format":"date-time","type":"string"}},"required":["id","companyId","productId"]},"StripeProductFrequency":{"type":"string","enum":["year","month","semiannual"]},"ReadCityDto":{"type":"object","properties":{"cityCode":{"type":"string"},"name":{"type":"string"}},"required":["cityCode","name"]},"RegisteredType":{"type":"number","enum":[1,2,3]},"OpportunityType":{"type":"string","enum":["orders","projects","opportunities"]},"CreationCompanyStep":{"type":"string","enum":["creation_requested","files_requested","declaration_sent","declaration_refused","company_created","urssaf_account_created","impots_account_created","acre_requested","cfe_declared","all_files_deposed","has_file_refused","all_files_validated","none"]},"CreationDashboardStep":{"type":"string","enum":["files_to_validate","declaration_to_do","declaration_in_progress","pending_declaration","declaration_to_report","declaration_refused","declaration_pending_denial","declaration_to_retry","regularisation_gu","refus_gu","to_call_cfe","declared","declaration_accepted","to_call","ended","abandoned","none"]},"Recurrence":{"type":"number","enum":[1,2,3]},"DeclarationPlatform":{"type":"number","enum":[6,1,2,3,4,5]},"ImpositionType":{"type":"number","enum":[1,2]},"LegacyLegalStatus":{"type":"number","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"TaxSystem":{"type":"string","enum":["micro_bic","micro_bnc","micro_bic_or_bnc","micro_ba","micro_foncier","micro_revenu_foncier_ir_2072_2044","reel_simplifie_ir_2033_2031","reel_normal_ir_2033_2031","reel_simplifie_is_2033_2065","reel_normal_is_2050_2065","declaration_controlee_2035","association_non_lucratif"]},"RegisterType":{"type":"string","enum":["RCS","RNE","RSAC","RNA"]},"ReadTrackingCompanyStepDto":{"type":"object","properties":{"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"referentId":{"type":"string"},"referentFullname":{"type":"string"},"authorId":{"type":"string"},"authorFullname":{"type":"string"}},"required":["companyId","createdAt","currentStep","currentDashboardStep"]},"ReadNoteDto":{"type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/components/schemas/ReadUserDto"},"authorId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"companyId":{"type":"string"},"text":{"type":"string"}},"required":["id","authorId","companyId","text"]},"ReadUserDto":{"type":"object","properties":{"id":{"type":"string"},"affiliationUrl":{"type":"string"},"affilaeClickId":{"type":"string"},"isCMA":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"birthDate":{"type":"object"},"email":{"type":"string"},"fullName":{"type":"string"},"firebaseToken":{"type":"string"},"profilePictureId":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"zipCode":{"type":"string"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/LegacyCivility"}]},"provider":{"allOf":[{"$ref":"#/components/schemas/ProviderSignUp"}]},"onboardingAt":{"format":"date-time","type":"string"},"onboardingId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wantsActivityStartAt":{"format":"date-time","type":"string"}},"required":["id"]},"LegacyCivility":{"type":"number","enum":[1,2]},"ProviderSignUp":{"type":"string","enum":["google.com","facebook.com","apple.com","password","custom"]},"AddressType":{"type":"number","enum":[4,1,3,2]},"ReadAccountingAccountDto":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"number"},"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isVatRelated":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"number"},"position":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"},"parent":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"entryCount":{"type":"number"},"lastUsedAt":{"format":"date-time","type":"string"},"entries":{"type":"array","items":{"type":"string"}}},"required":["id","category","color","description","icon","isHidden","isPersonal","isVatRelated","name","number","tags"]},"ReadPurchaseRegisterLineDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the purchase register line"},"label":{"type":"string","description":"The label of the purchase register line"},"amount":{"type":"number","description":"The amount of the purchase register line"},"vatAmount":{"type":"number","description":"The vat amount of the purchase register line"},"vatCode":{"description":"The vat code of the purchase register line","allOf":[{"$ref":"#/components/schemas/VatCode"}]},"vatRate":{"type":"number","description":"The vat rate of the purchase register line"},"accountingAccount":{"description":"The accounting account of the purchase register line","allOf":[{"$ref":"#/components/schemas/ReadAccountingAccountDto"}]}},"required":["id","label","amount","vatAmount","vatCode","vatRate","accountingAccount"]},"VatCode":{"type":"string","enum":["FR_210","FR_550","FR_850","FR_1000","FR_2000","FR_00HT","FR_00UE","FR_0HUE"]}}},"paths":{"/v3/purchaseRegister/list":{"get":{"operationId":"PurchaseRegisterController_paginate_v3","parameters":[{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search term","schema":{"type":"string"}},{"name":"range","required":false,"in":"query","description":"Date range as two ISO-8601 bounds [from, to]","schema":{"type":"array","items":{"type":"string"}}},{"name":"attachments","required":false,"in":"query","description":"Filter by attachments","schema":{"type":"boolean"}},{"name":"min","required":false,"in":"query","description":"Minimum amount","schema":{"type":"number"}},{"name":"max","required":false,"in":"query","description":"Maximum amount","schema":{"type":"number"}},{"name":"provider","required":false,"in":"query","description":"Filter by provider ID","schema":{"type":"string"}},{"name":"orderBy","required":false,"in":"query","description":"Sort by fields","schema":{"$ref":"#/components/schemas/PurchaseRegisterOrderBy"}},{"name":"orderDirection","required":false,"in":"query","description":"Sort direction (true for descending)","schema":{"$ref":"#/components/schemas/OrderDirection"}}],"responses":{"200":{"description":"Purchase register entries retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadPurchaseRegisterCollectionDto"}}}},"401":{"description":"Unauthorized"}},"summary":"List purchase register entries paginated","tags":["PurchaseRegister"]}}}}
```

## Reconnaître les routes historiques

Trois routes plus anciennes restent exposées. La version 3 propose la création et la suppression : utilisez-la pour tout nouveau développement. La spec ne les marque pas comme dépréciées. Voir aussi [Endpoints dépréciés](https://docs.abby.fr/reference-de-lapi/endpoints-deprecies.md).

* `POST /v2/purchaseRegister` crée une écriture avec le même principe (fournisseur, montant, lignes). Ses `files` sont une liste d'identifiants (chaînes), et non d'objets `{ "id" }`.
* `DELETE /v2/purchaseRegister/{id}` supprime une écriture. Elle répond 404 si l'écriture n'existe pas dans votre société.
* `DELETE /purchaseRegister/{id}`, sans préfixe de version, porte sur l'ancien livre des achats, stocké à part : l'identifiant d'une écriture créée par les routes v2 ou v3 n'y correspond pas.

## POST /v2/purchaseRegister

>

```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":{"CreateAccountingBookDto":{"type":"object","properties":{"valueDate":{"format":"date-time","type":"string"},"paymentMethodUsed":{"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string"},"amount":{"type":"number"},"thirdPartyId":{"type":"string"},"label":{"type":"string"},"reference":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/AnnotateEntryDto"}}},"required":["valueDate","paymentMethodUsed","amount","thirdPartyId","label","entries"]},"PaymentMethodLegacy":{"type":"number","enum":[1,2,3,4,5,6,7,8,9]},"AnnotateEntryDto":{"type":"object","properties":{"vatId":{"type":"number"},"accountingAccountNumber":{"type":"number"},"isPersonal":{"type":"boolean"},"amount":{"type":"number"}},"required":["isPersonal","amount"]},"ReadAccountingBookDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"format":"date-time","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountingBookType"}]},"files":{"type":"array","items":{"type":"string"}},"label":{"type":"string"},"reference":{"type":"string"},"paymentMethodUsed":{"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string"},"thirdPartyId":{"type":"string"},"thirdParty":{"$ref":"#/components/schemas/ReadThirdPartyDto"},"amount":{"type":"number"},"vatAmount":{"type":"number"},"hasTransaction":{"type":"boolean"},"fileCount":{"type":"boolean"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"oldNature":{"type":"string"},"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","valueDate","type","label","paymentMethodUsed","thirdPartyId","thirdParty","amount","vatAmount","hasTransaction","fileCount","entries","companyId","createdAt","updatedAt"]},"AccountingBookType":{"type":"string","enum":["income","purchase"]},"ReadThirdPartyDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ThirdPartyType"}]},"additionalAddress":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"companyId":{"type":"string"},"commercialName":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/LegacyReadContactDto"}},"country":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"nafCode":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"website":{"type":"string"},"zipCode":{"type":"string"},"accountingAccountId":{"type":"string"},"accountingAccount":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","companyId","accountingAccountId"]},"ThirdPartyType":{"type":"string","enum":["provider","customer"]},"LegacyReadContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"keywords":{"type":"string"},"language":{"type":"string"},"lastname":{"type":"string"},"notes":{"type":"string"},"phone":{"type":"string"},"thirdPartyId":{"type":"string"},"role":{"type":"string"},"website":{"type":"string"}},"required":["id"]},"ReadEntryDto":{"type":"object","properties":{"id":{"type":"string"},"valueDate":{"type":"object"},"label":{"type":"string"},"fullLabel":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"amount":{"type":"number"},"parent":{"type":"boolean"},"vatRate":{"type":"object"},"vatAmount":{"type":"number"},"vatId":{"type":"number"},"transactionId":{"type":"string"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"transaction":{"$ref":"#/components/schemas/ReadTransactionDto"},"isPersonal":{"type":"boolean"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"accountingAccountId":{"type":"string"},"accountingAccount":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"hasBeenUpdatedByUser":{"type":"boolean"},"isAnnotatedWithRules":{"type":"boolean"},"updatedAt":{"type":"object"},"createdAt":{"type":"object"}},"required":["id","valueDate","label","fullLabel","debit","credit","amount","parent","vatRate","vatAmount","vatId","transactionId","lockedAt","lockedBy","isPersonal","companyId","hasBeenUpdatedByUser","isAnnotatedWithRules","updatedAt","createdAt"]},"ReadTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"account":{"$ref":"#/components/schemas/ReadAccountDto"},"accountId":{"type":"string"},"amount":{"type":"number"},"bridgeAccountId":{"type":"number"},"bridgeCategoryId":{"type":"number"},"bridgeTransactionId":{"type":"number"},"currencyCode":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ReadEntryDto"}},"fullLabel":{"type":"string"},"isDeleted":{"type":"boolean"},"isFuture":{"type":"boolean"},"label":{"type":"string"},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"string","nullable":true},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"}]},"thirdPartyId":{"type":"string","nullable":true},"thirdParty":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReadThirdPartyDto"}]},"lockedAt":{"format":"date-time","type":"string","nullable":true},"lockedBy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string","nullable":true}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","suggestedAccountingAccount","thirdPartyId","thirdParty","lockedAt","lockedBy","createdAt","updatedAt","bridgeUpdatedAt","valueDate"]},"ReadAccountDto":{"type":"object","properties":{"id":{"type":"string"},"isNew":{"type":"boolean"},"accountingAccountId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"currencyCode":{"type":"string"},"bridgeAccountId":{"type":"number"},"bridgeItemId":{"type":"number"},"bankinItemId":{"type":"string"},"bankListId":{"type":"number"},"bankList":{"type":"object"},"isSynchronized":{"type":"boolean"},"synchronizedAt":{"type":"object"},"desynchronizedAt":{"type":"object"},"startSynchronizedAt":{"type":"object"},"firstSynchronizedAt":{"type":"object"},"lastSyncAt":{"type":"object"},"companyId":{"type":"string"},"accountBalance":{"type":"array","items":{"type":"string"}},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"numberOfTransactionsToAnnotate":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountingAccountId","name","type","currencyCode","bridgeAccountId","bridgeItemId","bankinItemId","bankListId","isSynchronized","synchronizedAt","desynchronizedAt","startSynchronizedAt","firstSynchronizedAt","lastSyncAt","companyId","bridgeUpdatedAt"]},"OperationType":{"type":"string","enum":["sale","purchase","refund","asset"]},"ReadSuggestedAccountingAccountDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"abbyProfessionalAccountingAccountNumber":{"type":"number"},"abbyPersonalAccountingAccountNumber":{"type":"number"}},"required":["id","name"]},"ReadCompanyDto":{"type":"object","properties":{"id":{"type":"string"},"activity":{"$ref":"#/components/schemas/ReadActivityDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ReadStripeProductDto"}},"productsCompany":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyStripeProductDto"}},"additionalAddress":{"type":"string"},"address":{"type":"string"},"caseNumberCommercialCourt":{"type":"string","nullable":true,"deprecated":true},"category":{"type":"string"},"city":{"$ref":"#/components/schemas/ReadCityDto"},"cityId":{"type":"string"},"cityName":{"type":"string","nullable":true,"description":"Free-text city name. Effective city: city?.name ?? cityName."},"commercialCourt":{"type":"string","nullable":true,"deprecated":true},"commercialCourtCode":{"type":"string","nullable":true,"deprecated":true},"rcsGreffeCode":{"type":"string","nullable":true},"rsacGreffeCode":{"type":"string","nullable":true},"commercialName":{"type":"string"},"creationActivityDescription":{"type":"string"},"creationDate":{"format":"date-time","type":"string"},"creationFinishedAt":{"format":"date-time","type":"string"},"registeredType":{"allOf":[{"$ref":"#/components/schemas/RegisteredType"}]},"opportunityType":{"allOf":[{"$ref":"#/components/schemas/OpportunityType"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"creationId":{"type":"string"},"declarationRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"declarationPlatform":{"allOf":[{"$ref":"#/components/schemas/DeclarationPlatform"}]},"hasVat":{"type":"boolean"},"hasAcre":{"type":"boolean"},"impositionType":{"allOf":[{"$ref":"#/components/schemas/ImpositionType"}]},"inseeImmatriculationDate":{"format":"date-time","type":"string"},"legalStatus":{"allOf":[{"$ref":"#/components/schemas/LegacyLegalStatus"}]},"taxSystem":{"allOf":[{"$ref":"#/components/schemas/TaxSystem"}]},"nafCode":{"type":"string"},"name":{"type":"string"},"otherActivity":{"type":"string"},"secondaryActivity":{"type":"string"},"rcsImmatriculationDate":{"format":"date-time","type":"string"},"rcsNumber":{"type":"string"},"rmNumber":{"type":"string","deprecated":true},"rneNumber":{"type":"string"},"rsacNumber":{"type":"string"},"rnaNumber":{"type":"string"},"selectedRegisters":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/RegisterType"}},"departmentRmImmatriculation":{"type":"string"},"registeredAt":{"format":"date-time","type":"string"},"shareCapital":{"type":"number"},"siren":{"type":"string"},"siret":{"type":"string"},"vatNumber":{"type":"string"},"vatRecurrence":{"allOf":[{"$ref":"#/components/schemas/Recurrence"}]},"zipCode":{"type":"string"},"trackingCompanySteps":{"type":"array","items":{"$ref":"#/components/schemas/ReadTrackingCompanyStepDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReadNoteDto"}},"referent":{"$ref":"#/components/schemas/ReadUserDto"},"signatureFileId":{"type":"string"},"referentId":{"type":"string"},"addressType":{"allOf":[{"$ref":"#/components/schemas/AddressType"}]},"recordNumber":{"type":"string"},"customerId":{"type":"string"},"declarationUserId":{"type":"string"},"declarationUser":{"$ref":"#/components/schemas/ReadUserDto"},"startDeclarationAt":{"format":"date-time","type":"string"},"endDeclarationAt":{"format":"date-time","type":"string"},"verifiedAt":{"format":"date-time","type":"string"},"sapAgreementDate":{"format":"date-time","type":"string"},"firstVatReportingDate":{"format":"date-time","type":"string"}},"required":["id","city","referent"]},"ReadActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"liberalType":{"allOf":[{"$ref":"#/components/schemas/LiberalType"}]},"isRegulated":{"type":"boolean"},"parentId":{"type":"number"},"parent":{"$ref":"#/components/schemas/ReadParentActivityDto"},"hidden":{"type":"boolean"},"isSap":{"type":"boolean"}},"required":["id","name","isRegulated","parent","hidden","isSap"]},"LiberalType":{"type":"number","enum":[1,2,3]},"ReadParentActivityDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"ReadStripeProductDto":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"productId":{"type":"string"},"multiple":{"type":"boolean"},"recurring":{"type":"boolean"},"trial":{"type":"object"},"requireCreditCard":{"type":"boolean"}},"required":["id","productId","multiple","recurring","trial","requireCreditCard"]},"StripeProductType":{"type":"string","enum":["abby_plus","acre","cfe","abby_free","abby_start","abby_creation_start","abby_creation_start_premium","abby_creation_start_business","abby_pro","abby_business","abby_ce","meeting_with_an_expert","formation_client","formation_communiquer","formation_client_communiquer_discount","billing_template_2","billing_template_3","abby_academie_marketing_communication","abby_academie_creation","abby_contact"]},"ReadCompanyStripeProductDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"productId":{"allOf":[{"$ref":"#/components/schemas/StripeProductType"}]},"product":{"$ref":"#/components/schemas/ReadStripeProductDto"},"amount":{"type":"number"},"frequency":{"allOf":[{"$ref":"#/components/schemas/StripeProductFrequency"}]},"subscriptionId":{"type":"string"},"consumedAt":{"format":"date-time","type":"string"},"manuallyAdded":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"failedBillingDueDate":{"format":"date-time","type":"string"},"lastFailedAt":{"format":"date-time","type":"string"},"failedInvoiceUrl":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lockUntil":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"trialAt":{"format":"date-time","type":"string"},"lastPaidAt":{"format":"date-time","type":"string"},"extendedTrialAt":{"format":"date-time","type":"string"}},"required":["id","companyId","productId"]},"StripeProductFrequency":{"type":"string","enum":["year","month","semiannual"]},"ReadCityDto":{"type":"object","properties":{"cityCode":{"type":"string"},"name":{"type":"string"}},"required":["cityCode","name"]},"RegisteredType":{"type":"number","enum":[1,2,3]},"OpportunityType":{"type":"string","enum":["orders","projects","opportunities"]},"CreationCompanyStep":{"type":"string","enum":["creation_requested","files_requested","declaration_sent","declaration_refused","company_created","urssaf_account_created","impots_account_created","acre_requested","cfe_declared","all_files_deposed","has_file_refused","all_files_validated","none"]},"CreationDashboardStep":{"type":"string","enum":["files_to_validate","declaration_to_do","declaration_in_progress","pending_declaration","declaration_to_report","declaration_refused","declaration_pending_denial","declaration_to_retry","regularisation_gu","refus_gu","to_call_cfe","declared","declaration_accepted","to_call","ended","abandoned","none"]},"Recurrence":{"type":"number","enum":[1,2,3]},"DeclarationPlatform":{"type":"number","enum":[6,1,2,3,4,5]},"ImpositionType":{"type":"number","enum":[1,2]},"LegacyLegalStatus":{"type":"number","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"TaxSystem":{"type":"string","enum":["micro_bic","micro_bnc","micro_bic_or_bnc","micro_ba","micro_foncier","micro_revenu_foncier_ir_2072_2044","reel_simplifie_ir_2033_2031","reel_normal_ir_2033_2031","reel_simplifie_is_2033_2065","reel_normal_is_2050_2065","declaration_controlee_2035","association_non_lucratif"]},"RegisterType":{"type":"string","enum":["RCS","RNE","RSAC","RNA"]},"ReadTrackingCompanyStepDto":{"type":"object","properties":{"companyId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/CreationCompanyStep"}]},"currentDashboardStep":{"allOf":[{"$ref":"#/components/schemas/CreationDashboardStep"}]},"referentId":{"type":"string"},"referentFullname":{"type":"string"},"authorId":{"type":"string"},"authorFullname":{"type":"string"}},"required":["companyId","createdAt","currentStep","currentDashboardStep"]},"ReadNoteDto":{"type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/components/schemas/ReadUserDto"},"authorId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"companyId":{"type":"string"},"text":{"type":"string"}},"required":["id","authorId","companyId","text"]},"ReadUserDto":{"type":"object","properties":{"id":{"type":"string"},"affiliationUrl":{"type":"string"},"affilaeClickId":{"type":"string"},"isCMA":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"birthDate":{"type":"object"},"email":{"type":"string"},"fullName":{"type":"string"},"firebaseToken":{"type":"string"},"profilePictureId":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"zipCode":{"type":"string"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/LegacyCivility"}]},"provider":{"allOf":[{"$ref":"#/components/schemas/ProviderSignUp"}]},"onboardingAt":{"format":"date-time","type":"string"},"onboardingId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wantsActivityStartAt":{"format":"date-time","type":"string"}},"required":["id"]},"LegacyCivility":{"type":"number","enum":[1,2]},"ProviderSignUp":{"type":"string","enum":["google.com","facebook.com","apple.com","password","custom"]},"AddressType":{"type":"number","enum":[4,1,3,2]},"ReadAccountingAccountDto":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"number"},"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isVatRelated":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"number"},"position":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"},"parent":{"$ref":"#/components/schemas/ReadAccountingAccountDto"},"companyId":{"type":"string"},"company":{"$ref":"#/components/schemas/ReadCompanyDto"},"entryCount":{"type":"number"},"lastUsedAt":{"format":"date-time","type":"string"},"entries":{"type":"array","items":{"type":"string"}}},"required":["id","category","color","description","icon","isHidden","isPersonal","isVatRelated","name","number","tags"]}}},"paths":{"/v2/purchaseRegister":{"post":{"operationId":"PurchaseRegisterController_createPurchaseRegisterItem_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountingBookDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAccountingBookDto"}}}}},"tags":["PurchaseRegister"]}}}}
```

## DELETE /v2/purchaseRegister/{id}

>

```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."}}},"paths":{"/v2/purchaseRegister/{id}":{"delete":{"operationId":"PurchaseRegisterController_deletePurchaseRegisterItem_v2","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["PurchaseRegister"]}}}}
```

## DELETE /purchaseRegister/{id}

>

```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."}}},"paths":{"/purchaseRegister/{id}":{"delete":{"operationId":"PurchaseRegisterLegacyController_deletePurchaseRegisterItem","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["PurchaseRegister"]}}}}
```

## Voir aussi

* [Fournisseurs](https://docs.abby.fr/reference-de-lapi/fournisseurs.md)
* [Comptabilité](https://docs.abby.fr/reference-de-lapi/comptabilite.md)
* [Enregistrer une dépense fournisseur](https://docs.abby.fr/guides/enregistrer-une-depense-fournisseur.md)
* [Endpoints dépréciés](https://docs.abby.fr/reference-de-lapi/endpoints-deprecies.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/livre-des-achats.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.
