À quoi sert la ressource « Tiers (Clients & Fournisseurs) » ?
Fiches TIERS : clients, fournisseurs, adhérents (un tiers peut être les deux), porte l’identité légale, les coordonnées, les contacts et adresses embarqués, les comptes comptables auxiliaires, le mandat SEPA, le canal de facturation électronique et le portail client
Quels endpoints sont disponibles ?
| Méthode | Adresse | Action |
|---|---|---|
| GET | /api/v1/entities et /{id} | lire (liste paginée ou un élément par identifiant) |
| POST | /api/v1/entities | créer un élément |
| PUT | /api/v1/entities/{id} | remplacer un élément |
| PATCH | /api/v1/entities/{id} | modifier certains champs |
| DELETE | /api/v1/entities/{id} | supprimer un élément |
Quels champs contient la ressource « Tiers (Clients & Fournisseurs) » ?
| Champ | Type et description |
|---|---|
| registrationNumber | string |
| version | number (concurrence optimiste : incrémentée à chaque enregistrement, une écriture sur une version périmée est fusionnée par champ ou refusée en conflit) |
| gdprConsentDate | ISO8601 — preuve du consentement (art. 7-1 RGPD) |
| gdprConsentSource | string — canal/source du consentement |
| gdprConsentPurpose | string — finalité |
| gdprConsentWithdrawnAt | ISO8601 — date du RETRAIT du consentement (art. 7 §3), sans elle, une case décochée ne prouve rien : un consentement jamais donné et un consentement retiré seraient indistinguables |
| gdprConsentWithdrawnSource | string — origine du retrait (lien public en un clic, saisie en fiche, propagation depuis le registre unique services/consentLedgerService.ts) |
| id | string |
| tenantId | string |
| type | client|supplier|both|adherent |
| socialReason | string |
| siret | string |
| vatNumber | string |
| iban | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR | |
| phone | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| status | string |
| name | string |
| commercialName | string |
| apeCode | string |
| dunsNumber | string |
| registrationCountry | string |
| shareCapital | string |
| legalStatus | string |
| address1 | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| address2 | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| postalCode | string |
| city | string |
| country | string |
| countryCode | string |
| region | string |
| mobile | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| website | string |
| string | |
| string | |
| string — page Facebook du tiers | |
| contacts | ContactPerson[] — contacts embarqués sur la fiche, firstName, lastName, email, phone, mobile et birthDate y sont CHIFFRÉS au repos et déchiffrés à la lecture |
| addresses | Address[] — adresses embarquées, address1 et address2 y sont CHIFFRÉS au repos |
| clientCode | string |
| supplierCode | string |
| clientSegment | string |
| acquisitionChannel | string |
| priorityScore | string |
| gdprConsent | boolean |
| currency | string |
| creditLimit | number |
| paymentTermsDays | number |
| preferredPaymentMode | string |
| discountPercent | number |
| priceGrid | string |
| accountingAccountCustomer | string — compte auxiliaire client (411xxx) |
| accountingAccountSupplier | string — compte auxiliaire fournisseur (401xxx) |
| legalStatusDetail | string |
| rcsNumber | string |
| rmNumber | string |
| greffe | string |
| eoriNumber | string |
| fiscalRegime | string |
| isVatOnPayment | boolean — TVA sur les encaissements pour ce tiers (exigibilité) |
| sepaMandateRum | string |
| sepaMandateDate | string |
| sepaMandateScheme | CORE|B2B — schéma du mandat de prélèvement |
| sepaMandateOneOff | boolean |
| sepaMandateFirstCollectedAt | string |
| sepaMandateRevokedAt | string |
| capitalSocialAmount | number |
| capitalSocialCurrency | string |
| nafCode | string |
| einvoicingStatus | active|pending|refused — état du raccordement du tiers |
| pdpIdentifier | string |
| ppfIdentifier | string |
| routingCode | string |
| einvoicingMethod | pdp|ppf|chorus — canal de transmission de la facture électronique |
| einvoicingEmail | string |
| acceptedInvoiceFormats | string[] — formats acceptés (Factur-X, UBL, CII) |
| portalEnabled | boolean — accès au portail client ouvert |
| portalUserId | string — compte du portail rattaché au tiers |
| portalInvitedAt | string |
| clientGroup | string |
| sector | string |
| employeeCount | number |
| language | string |
| supplierCategory | string |
| supplierType | string |
| bic | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| bankName | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| bankAddress | string — CHIFFRÉ au repos (services/cryptoService.ts) mais DÉCHIFFRÉ par db.getAll : servi EN CLAIR |
| latePaymentPenaltyPercent | number |
| creditInsuranceLimit | number |
| fiscalYearEnd | string |
| consolidationMethod | string |
| vatExemptionReason | string |
| paymentReminderExclusion | boolean |
| automaticReminders | boolean |
| outstandingBalance | number |
| earlyPaymentDiscountPercent | number |
| costCenter | string |
| analyticCode | string |
| billingCurrency | string |
| preferredWarehouseId | string |
| preferredCarrierId | string |
| deliverySlotStart | string |
| deliverySlotEnd | string |
| moq | number |
| avgLeadTimeDays | number |
| incoterm | string |
| shippingInstructions | string |
| backOrderAllowed | boolean |
| freeShippingThreshold | number |
| geoZone | string |
| internalReference | string |
| glnNumber | string |
| receptionWarehouseId | string |
| supplierReference | string |
| supplyLeadTime | number |
| minOrderAmount | number |
| purchasingFamily | string |
| buyerId | string |
| healthStatus | optimal|warning|critical|dormant |
| riskLevel | Low|Medium|High|Extreme |
| qualityScore | number |
| deliverySpeedScore | number |
| priceIndexScore | number |
| churnProbability | number |
| npsScore | number |
| nonConformityCount | number |
| improvementPlan | string |
| rcInsurance | string |
| accountManagerId | string |
| salesTeamId | string |
| marketingSegment | string |
| ediIdentifier | string |
| isBlacklisted | boolean |
| blacklistReason | string — motif du blocage (Achats → Conformité, statut Suspendu ou Blacklisté) |
| modernSlaveryStatement | boolean — déclaration contre l’esclavage moderne (cartographie RSE, note RSE suggérée) |
| marketingOptIn | boolean |
| marketingOptInDate | ISO8601 — date de l’accord de prospection (posée par la boutique en ligne avec la case consentement, lib/ecommerce/ecomFacturation.ts) |
| paymentBlock | boolean — blocage de paiement du compte client : même effet que le blocage de la fiche, la commande est refusée (lib/collections/blocageEncours.ts, portail B2B) |
| leadSource | string |
| campaignId | string |
| internalNotes | string |
| contractNumber | string |
| contractType | string |
| contractStartDate | string |
| contractEndDate | string |
| slaLevel | string |
| specialConditions | string |
| autoRenewal | boolean |
| frameworkContractRef | string |
| carbonFootprintIndex | number |
| csrRating | string |
| ethicsSignatory | boolean |
| iso9001Certified | boolean |
| iso14001Certified | boolean |
| iso27001Certified | boolean |
| decennialInsuranceRef | string |
| decennialInsuranceExpiry | string |
| laborComplianceVerified | boolean |
| laborComplianceExpiry | string |
| genderEqualityIndex | number |
| antiCorruptionPolicy | boolean |
| externalAuditor | string |
| tags | string[] |
| customFields | Record<string, any> |
| isSoftDeleted | boolean — fiche archivée (jamais purgée : les pièces comptables la référencent) |
| logoUrl | string |
| attachments | string[] |
| mergedIntoEntityId | string — fiche absorbante après fusion de doublons |
| mergedAt | string |
| createdAt | string |
| updatedAt | string |
Comment filtrer, trier et paginer ?
Exemple de lecture filtrée et triée : GET /api/v1/entities?filter[registrationNumber]=…&sort=version:desc&limit=50.
Le filtre est une égalité stricte sur un champ déclaré, le tri s’écrit champ:asc ou champ:desc, la page contient 50 éléments par défaut et 200 au plus, un champ inconnu renvoie une erreur 400 plutôt qu’un résultat faux.
Quelles autorisations faut-il ?
- Une offre qui inclut l’API publique : Enterprise.
- Une clé d’API créée dans Système › Intégrations, envoyée dans l’en-tête Authorization: Bearer, limitée au dossier qui l’a émise.
- Une portée accordée à la clé pour cette ressource : lecture, écriture et suppression.