# Clients

Nous gérons deux types de clients :

* Clients particuliers (contact)
* Clients professionnels (ou entreprise)

Les entreprises peuvent avoir différents contacts pour gérer divers services ou fonctions au sein d'une même entreprise.

## Clients professionnels

## POST /organization

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateOrganizationDto":{"type":"object","properties":{"name":{"type":"string","description":"The official name of the organization"},"commercialName":{"type":"string","description":"The commercial or trading name of the organization"},"emails":{"type":"array","items":{"type":"string"}},"siret":{"type":"string","description":"The SIRET number (required for French organizations)"},"vatNumber":{"type":"string","description":"The VAT number of the organization"},"billingAddress":{"description":"The billing address of the organization","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"The delivery address of the organization","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"notes":{"type":"string","description":"Additional notes about the organization"},"bankInformations":{"description":"The bank information of the organization","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"preferences":{"description":"The preferences of the organization","allOf":[{"$ref":"#/components/schemas/ClientPreferencesDto"}]}},"required":["name"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"ClientPreferencesDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}}},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadOrganizationDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}},"id":{"type":"string"},"name":{"type":"string"},"commercialName":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"siret":{"type":"string"},"vatNumber":{"type":"string"},"countContacts":{"type":"number"},"billingAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"deliveryAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"bankInformations":{"$ref":"#/components/schemas/BankInformationsDto"},"notes":{"type":"string"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean"},"test":{"type":"boolean"}},"required":["id","name","commercialName","emails","siret","vatNumber","countContacts","billingAddress","deliveryAddress","bankInformations","notes","createdAt","archivedAt","hasBillings","test"]}}},"paths":{"/organization":{"post":{"operationId":"OrganizationController_createOrganization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOrganizationDto"}}}}},"tags":["organization"]}}}}
```

## PUT /organization/{id}

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UpdateOrganizationDto":{"type":"object","properties":{"name":{"type":"string"},"commercialName":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"siret":{"type":"string"},"vatNumber":{"type":"string"},"billingAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"deliveryAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"bankInformations":{"$ref":"#/components/schemas/BankInformationsDto"},"notes":{"type":"string"},"preferences":{"$ref":"#/components/schemas/ClientPreferencesDto"}},"required":["name"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"ClientPreferencesDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}}},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadOrganizationDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}},"id":{"type":"string"},"name":{"type":"string"},"commercialName":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"siret":{"type":"string"},"vatNumber":{"type":"string"},"countContacts":{"type":"number"},"billingAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"deliveryAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"bankInformations":{"$ref":"#/components/schemas/BankInformationsDto"},"notes":{"type":"string"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean"},"test":{"type":"boolean"}},"required":["id","name","commercialName","emails","siret","vatNumber","countContacts","billingAddress","deliveryAddress","bankInformations","notes","createdAt","archivedAt","hasBillings","test"]}}},"paths":{"/organization/{id}":{"put":{"operationId":"OrganizationController_updateOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOrganizationDto"}}}}},"tags":["organization"]}}}}
```

## GET /organizations

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"OrganizationOrderBy":{"type":"string","enum":["name","createdAt"]},"OrderDirection":{"type":"string","enum":["ASC","DESC"]},"ReadOrganizationsDto":{"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":{"type":"array","items":{"$ref":"#/components/schemas/ReadOrganizationDto"}}},"required":["countWithoutFilters","totalDocs","limit","totalPages","hasNextPage","hasPrevPage","nextPage","page","prevPage","docs"]},"ReadOrganizationDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}},"id":{"type":"string"},"name":{"type":"string"},"commercialName":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"siret":{"type":"string"},"vatNumber":{"type":"string"},"countContacts":{"type":"number"},"billingAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"deliveryAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"bankInformations":{"$ref":"#/components/schemas/BankInformationsDto"},"notes":{"type":"string"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean"},"test":{"type":"boolean"}},"required":["id","name","commercialName","emails","siret","vatNumber","countContacts","billingAddress","deliveryAddress","bankInformations","notes","createdAt","archivedAt","hasBillings","test"]},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]}}},"paths":{"/organizations":{"get":{"operationId":"OrganizationsController_retrieveOrganizations","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","schema":{"type":"string"}},{"name":"orderBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationOrderBy"}},{"name":"orderDirection","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrderDirection"}},{"name":"archived","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOrganizationsDto"}}}}},"tags":["organization"]}}}}
```

## DELETE /organization/{organizationId}

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/organization/{organizationId}":{"delete":{"operationId":"OrganizationController_deleteOrganization","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["organization"]}}}}
```

## Clients particuliers

Dans le cas où vous souhaitez enregister un client particulier, vous pouvez créer un contact.

## POST /contact

> Create a new contact

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateContactDto":{"type":"object","properties":{"firstname":{"type":"string","description":"The first name of the contact"},"lastname":{"type":"string","description":"The last name of the contact"},"phone":{"type":"string","description":"The phone number of the contact"},"jobTitle":{"type":"string","description":"The job title of the contact"},"emails":{"description":"The email addresses of the contact","type":"array","items":{"type":"string"}},"notes":{"type":"string","description":"Additional notes about the contact"},"billingAddress":{"description":"The billing address of the contact","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"The delivery address of the contact","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"bankInformations":{"description":"The bank information of the contact","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"preferences":{"description":"The preferences of the contact","allOf":[{"$ref":"#/components/schemas/ClientPreferencesDto"}]}},"required":["firstname","lastname"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"ClientPreferencesDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}}},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactOrganizationDto"}]},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"test":{"type":"boolean","description":"Whether this is a test contact"},"phone":{"type":"string","description":"Contact phone number"},"firstname":{"type":"string","description":"Contact first name"},"lastname":{"type":"string","description":"Contact last name"},"billingAddress":{"description":"Billing address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"Delivery address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"jobTitle":{"type":"string","description":"Contact job title"},"bankInformations":{"description":"Bank information","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"hasTiersPrestation":{"type":"boolean","description":"Whether the contact has third-party services"},"notes":{"type":"string","description":"Additional notes about the contact"},"language":{"description":"Contact language preference","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"Preferred currency","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"Accepted payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["id","createdAt","hasBillings","test","firstname","lastname","hasTiersPrestation"]},"ContactOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]}}},"paths":{"/contact":{"post":{"operationId":"ContactController_createContact","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactDto"}}}},"responses":{"201":{"description":"The contact has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"summary":"Create a new contact","tags":["contact"]}}}}
```

## Retrieve contacts

> Get a paginated list of contacts for the current company

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ContactOrderBy":{"type":"string","enum":["name","createdAt"]},"OrderDirection":{"type":"string","enum":["ASC","DESC"]},"ReadContactsDto":{"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":{"type":"array","items":{"$ref":"#/components/schemas/ReadContactListItemDto"}}},"required":["countWithoutFilters","totalDocs","limit","totalPages","hasNextPage","hasPrevPage","nextPage","page","prevPage","docs"]},"ReadContactListItemDto":{"type":"object","properties":{"archivedAt":{"type":"number","description":"Contact archival timestamp"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"test":{"type":"boolean","description":"Whether this is a test contact"},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"id":{"type":"string","description":"Contact ID"},"fullname":{"type":"string","description":"Contact full name"},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactListOrganizationDto"}]},"tiersPrestation":{"description":"Third-party service information","allOf":[{"$ref":"#/components/schemas/TiersPrestationDto"}]}},"required":["createdAt","test","hasBillings","id","fullname"]},"ContactListOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]},"TiersPrestationDto":{"type":"object","properties":{"state":{"description":"Client state","allOf":[{"$ref":"#/components/schemas/ClientState"}]}},"required":["state"]},"ClientState":{"type":"string","enum":["synced","pending","end_user_action_required","error"],"description":"Current client state"}}},"paths":{"/contacts":{"get":{"description":"Get a paginated list of contacts for the current company","operationId":"ContactsController_retrieveContacts","parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"orderBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/ContactOrderBy"}},{"name":"orderDirection","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrderDirection"}},{"name":"archived","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"forCertificate","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactsDto"}}}},"401":{"description":""},"500":{"description":""}},"summary":"Retrieve contacts","tags":["contact"]}}}}
```

## GET /contact/{id}

> Get a contact by ID

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ReadContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactOrganizationDto"}]},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"test":{"type":"boolean","description":"Whether this is a test contact"},"phone":{"type":"string","description":"Contact phone number"},"firstname":{"type":"string","description":"Contact first name"},"lastname":{"type":"string","description":"Contact last name"},"billingAddress":{"description":"Billing address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"Delivery address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"jobTitle":{"type":"string","description":"Contact job title"},"bankInformations":{"description":"Bank information","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"hasTiersPrestation":{"type":"boolean","description":"Whether the contact has third-party services"},"notes":{"type":"string","description":"Additional notes about the contact"},"language":{"description":"Contact language preference","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"Preferred currency","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"Accepted payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["id","createdAt","hasBillings","test","firstname","lastname","hasTiersPrestation"]},"ContactOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]}}},"paths":{"/contact/{id}":{"get":{"operationId":"ContactController_getContact","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The contact has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Contact not found"}},"summary":"Get a contact by ID","tags":["contact"]}}}}
```

## DELETE /contact/{id}

> Delete a contact

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/contact/{id}":{"delete":{"operationId":"ContactController_deleteContact","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Contact not found"},"default":{"description":"The contact has been successfully deleted."}},"summary":"Delete a contact","tags":["contact"]}}}}
```

## PUT /contact/{id}

> Update a contact

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UpdateContactDto":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"jobTitle":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"billingAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"deliveryAddress":{"$ref":"#/components/schemas/ClientAddressDto"},"bankInformations":{"$ref":"#/components/schemas/BankInformationsDto"},"preferences":{"$ref":"#/components/schemas/ClientPreferencesDto"}},"required":["firstname","lastname"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"ClientPreferencesDto":{"type":"object","properties":{"language":{"description":"The client's preferred language for billing","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"The client's preferred currency for transactions","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"The client's preferred payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}}},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]},"ReadContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactOrganizationDto"}]},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"test":{"type":"boolean","description":"Whether this is a test contact"},"phone":{"type":"string","description":"Contact phone number"},"firstname":{"type":"string","description":"Contact first name"},"lastname":{"type":"string","description":"Contact last name"},"billingAddress":{"description":"Billing address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"Delivery address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"jobTitle":{"type":"string","description":"Contact job title"},"bankInformations":{"description":"Bank information","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"hasTiersPrestation":{"type":"boolean","description":"Whether the contact has third-party services"},"notes":{"type":"string","description":"Additional notes about the contact"},"language":{"description":"Contact language preference","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"Preferred currency","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"Accepted payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["id","createdAt","hasBillings","test","firstname","lastname","hasTiersPrestation"]},"ContactOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]}}},"paths":{"/contact/{id}":{"put":{"operationId":"ContactController_updateContact","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactDto"}}}},"responses":{"200":{"description":"The contact has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"404":{"description":"Contact not found"}},"summary":"Update a contact","tags":["contact"]}}}}
```

## Les contacts d'entreprise

Pour une meilleure organisation, vous avez la possibilité d'enregistrer différents contacts affiliés à une entreprise spécifique.

## POST /organization/{id}/contact

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateOrganizationContactDto":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"jobTitle":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"}},"required":["firstname","lastname"]},"ReadContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactOrganizationDto"}]},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"test":{"type":"boolean","description":"Whether this is a test contact"},"phone":{"type":"string","description":"Contact phone number"},"firstname":{"type":"string","description":"Contact first name"},"lastname":{"type":"string","description":"Contact last name"},"billingAddress":{"description":"Billing address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"Delivery address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"jobTitle":{"type":"string","description":"Contact job title"},"bankInformations":{"description":"Bank information","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"hasTiersPrestation":{"type":"boolean","description":"Whether the contact has third-party services"},"notes":{"type":"string","description":"Additional notes about the contact"},"language":{"description":"Contact language preference","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"Preferred currency","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"Accepted payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["id","createdAt","hasBillings","test","firstname","lastname","hasTiersPrestation"]},"ContactOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]}}},"paths":{"/organization/{id}/contact":{"post":{"operationId":"OrganizationController_createOrganizationContact","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationContactDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactDto"}}}}},"tags":["organization"]}}}}
```

## PUT /organization/contact/{id}

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UpdateOrganizationContactDto":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"jobTitle":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"defaultContact":{"type":"boolean"}},"required":["firstname","lastname"]},"ReadContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactOrganizationDto"}]},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"archivedAt":{"type":"number","description":"Contact archival timestamp"},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"test":{"type":"boolean","description":"Whether this is a test contact"},"phone":{"type":"string","description":"Contact phone number"},"firstname":{"type":"string","description":"Contact first name"},"lastname":{"type":"string","description":"Contact last name"},"billingAddress":{"description":"Billing address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"deliveryAddress":{"description":"Delivery address","allOf":[{"$ref":"#/components/schemas/ClientAddressDto"}]},"jobTitle":{"type":"string","description":"Contact job title"},"bankInformations":{"description":"Bank information","allOf":[{"$ref":"#/components/schemas/BankInformationsDto"}]},"hasTiersPrestation":{"type":"boolean","description":"Whether the contact has third-party services"},"notes":{"type":"string","description":"Additional notes about the contact"},"language":{"description":"Contact language preference","allOf":[{"$ref":"#/components/schemas/BillingLocale"}]},"currency":{"description":"Preferred currency","allOf":[{"$ref":"#/components/schemas/CurrencyCode"}]},"paymentMethods":{"type":"array","description":"Accepted payment methods","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["id","createdAt","hasBillings","test","firstname","lastname","hasTiersPrestation"]},"ContactOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]},"ClientAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"The street address of the client","nullable":true},"complement":{"type":"string","description":"Additional address information","nullable":true},"city":{"type":"string","description":"The city of the address","nullable":true},"zipCode":{"type":"string","description":"The zip code or postal code of the address","nullable":true},"state":{"type":"string","description":"The state or province of the address"},"country":{"description":"The country of the address","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["address","city","zipCode","country"]},"CountryCode":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AN","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KR","XK","KP","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"],"description":"Country code of the address"},"BankInformationsDto":{"type":"object","properties":{"iban":{"type":"string","description":"International Bank Account Number"},"bic":{"type":"string","description":"Bank Identifier Code"},"holder":{"type":"string","description":"Name of the account holder"}},"required":["iban","bic","holder"]},"BillingLocale":{"type":"string","enum":["fr","en","de","it","nl","pt","es"]},"CurrencyCode":{"type":"string","enum":["EUR","GBP","CHF","USD","AUD","CAD","JPY","CNH","CZK","DKK","BGN","PLN","HUF","RON","SEK","NOK","TRY","BRL","HKD","ILS","INR","KRW","MXN"],"description":"Preferred currency of the customer"},"PaymentMethod":{"type":"string","enum":["transfer","direct_debit","credit_card","cheque","universal_employment_service_cheque","cash","paypal","stripe","other"]}}},"paths":{"/organization/contact/{id}":{"put":{"operationId":"OrganizationController_updateOrganizationContact","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationContactDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadContactDto"}}}}},"tags":["organization"]}}}}
```

## GET /organization/{id}/contacts

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ReadContactListItemDto":{"type":"object","properties":{"archivedAt":{"type":"number","description":"Contact archival timestamp"},"createdAt":{"type":"number","description":"Contact creation timestamp"},"test":{"type":"boolean","description":"Whether this is a test contact"},"defaultContact":{"type":"boolean","description":"Whether this is the default contact"},"emails":{"description":"Contact email addresses","type":"array","items":{"type":"string"}},"hasBillings":{"type":"boolean","description":"Whether the contact has billings"},"id":{"type":"string","description":"Contact ID"},"fullname":{"type":"string","description":"Contact full name"},"organization":{"description":"Organization information","allOf":[{"$ref":"#/components/schemas/ContactListOrganizationDto"}]},"tiersPrestation":{"description":"Third-party service information","allOf":[{"$ref":"#/components/schemas/TiersPrestationDto"}]}},"required":["createdAt","test","hasBillings","id","fullname"]},"ContactListOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"archivedAt":{"type":"number","description":"Organization archival timestamp"}},"required":["id","name"]},"TiersPrestationDto":{"type":"object","properties":{"state":{"description":"Client state","allOf":[{"$ref":"#/components/schemas/ClientState"}]}},"required":["state"]},"ClientState":{"type":"string","enum":["synced","pending","end_user_action_required","error"],"description":"Current client state"}}},"paths":{"/organization/{id}/contacts":{"get":{"operationId":"OrganizationController_retrieveOrganizationContacts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReadContactListItemDto"}}}}}},"tags":["organization"]}}}}
```

## Changer le contact par défaut d'une entreprise

## PATCH /organization/{organizationId}/default-contact

>

```json
{"openapi":"3.0.0","info":{"title":"Abby API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"SetDefaultContactDto":{"type":"object","properties":{"defaultContactId":{"type":"string"}},"required":["defaultContactId"]}}},"paths":{"/organization/{organizationId}/default-contact":{"patch":{"operationId":"OrganizationController_setDefaultContact","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDefaultContactDto"}}}},"responses":{"200":{"description":""}},"tags":["organization"]}}}}
```


---

# 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/clients.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.
