À quoi sert la ressource « Contrats » ?
Contrats clients et fournisseurs : engagement, reconduction, facturation récurrente, SLA, clauses juridiques et signataires
Quels endpoints sont disponibles ?
| Méthode | Adresse | Action |
|---|---|---|
| GET | /api/v1/contracts et /{id} | lire (liste paginée ou un élément par identifiant) |
| POST | /api/v1/contracts | créer un élément |
| PUT | /api/v1/contracts/{id} | remplacer un élément |
| PATCH | /api/v1/contracts/{id} | modifier certains champs |
| DELETE | /api/v1/contracts/{id} | supprimer un élément |
Quels champs contient la ressource « Contrats » ?
| Champ | Type et description |
|---|---|
| kanbanOrder | number — rang dans la colonne du kanban partagé (services/kanbanOrderService.ts) |
| legalEntityId | string (société émettrice — id LegalEntity, absent = société principale) |
| id | string |
| tenantId | string |
| clientId | string |
| startDate | ISO8601 |
| endDate | ISO8601 |
| number | string |
| title | string |
| type | string |
| status | string |
| description | string |
| tags | string[] |
| renewalDate | string |
| terminationDate | string |
| autoRenew | boolean |
| autoRenewNoticeDays | number |
| noticePeriodDays | number |
| signatureDate | string |
| effectiveDate | string |
| amountHT | number — montant HT du contrat (le champ amount n’a jamais existé, la TVA est portée par taxRate) |
| taxRate | number |
| currency | string |
| billingFrequency | string |
| paymentMethod | string |
| nextBillingDate | string |
| billingCycle | string |
| paymentTerms | string |
| lastInvoiceDate | string |
| lastInvoiceId | string |
| autoIssueInvoices | boolean — émission automatique des factures de la période |
| discountsOffered | number |
| inflationIndex | string |
| setupFee | number |
| cancellationFee | number |
| latePaymentPenalty | number |
| gracePeriodDays | number |
| costCenter | string |
| accountingCode | string |
| invoicePrefix | string |
| slaResponseTime | number |
| slaResolutionTime | number |
| penaltyClause | string |
| maintenanceIncluded | boolean |
| managerId | string |
| accountManagerId | string |
| legalSignatoryId | string |
| clientSignatoryName | string |
| clientSignatoryEmail | string — adresse du signataire côté client (envoi pour signature, accusés) |
| technicalContactName | string — interlocuteur technique désigné au contrat |
| technicalContactEmail | string |
| billingContactName | string — interlocuteur de facturation (destinataire des échéances) |
| billingContactEmail | string |
| confidentialityClause | boolean |
| liabilityLimit | number |
| jurisdiction | string |
| gdprCompliant | boolean |
| dataProcessingAgreement | boolean |
| nonCompeteClause | boolean |
| insuranceRequired | boolean |
| auditRights | boolean |
| forceMajeureClause | boolean |
| ipOwnership | string |
| subcontractingAllowed | boolean |
| dataResidency | string |
| specialConditions | string |
| trainingDays | number |
| incoterms | string |
| acceptanceCriteria | string |
| externalReference | string |
| version | number |
| priority | string |
| riskLevel | string |
| terminationReason | string |
| attachments | string[] |
| documentUrls | { name: string, url: string, size?: number, type?: string }[] |
| esignature | EsignSourceLink — signature électronique (requestId, provider, status, updatedAt, signedGedId, proofGedId), écrit par le serveur (/api/esignature) |
Comment filtrer, trier et paginer ?
Exemple de lecture filtrée et triée : GET /api/v1/contracts?filter[kanbanOrder]=…&sort=legalEntityId: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.