# Livre des achats

## POST /v2/purchaseRegister

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"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":{"allOf":[{"$ref":"#/components/schemas/PaymentMethodLegacy"}]},"otherPaymentMethodUsed":{"type":"object"},"showClientSide":{"type":"boolean"},"hasAccountingBook":{"type":"boolean"},"fileCount":{"type":"number"},"operationType":{"allOf":[{"$ref":"#/components/schemas/OperationType"}]},"suggestedAccountingAccount":{"$ref":"#/components/schemas/ReadSuggestedAccountingAccountDto"},"thirdPartyId":{"type":"object"},"thirdParty":{"$ref":"#/components/schemas/ReadThirdPartyDto"},"lockedAt":{"type":"object"},"lockedBy":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"bridgeUpdatedAt":{"format":"date-time","type":"string"},"valueDate":{"format":"date-time","type":"string"}},"required":["id","account","accountId","amount","bridgeAccountId","bridgeCategoryId","bridgeTransactionId","currencyCode","entries","fullLabel","isDeleted","isFuture","label","paymentMethod","otherPaymentMethodUsed","showClientSide","hasAccountingBook","operationType","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"},"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/LegalStatus"}]},"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"}},"required":["id","name","isRegulated","parent","hidden"]},"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]},"LegalStatus":{"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"},"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":"number"},"socialSecurityNumber":{"type":"string"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ReadCompanyDto"}},"civility":{"allOf":[{"$ref":"#/components/schemas/Civility"}]},"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"]},"Civility":{"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 API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/v2/purchaseRegister/{id}":{"delete":{"operationId":"PurchaseRegisterController_deletePurchaseRegisterItem_v2","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["PurchaseRegister"]}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abby.fr/api/livre-des-achats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
