Rechercher dans la documentation

Saisissez au moins deux caractères.

↑ ↓ naviguer↵ ouvriresc fermer
Référence API

API : contracts

6 opérations REST du groupe contracts.

Référence générée depuis le contrat versionné · Version Markdown

PUT /contracts/{id}/external-refs/{source}#

Poser l'identifiant d'une source sur un contrat (idempotent)

Une source, un identifiant par objet : la même écriture deux fois ne crée qu'une ligne ; un identifiant déjà porté par un AUTRE objet de la même source répond 409 avec l'objet porteur (jamais déplacé en silence). La source salesforce est réservée aux scripts de reprise (403). Même garde que le PATCH de l'objet : hors visibilité 404, hors périmètre d'écriture 403.

Scopes d'app : quotes:write. Les autres droits, périmètres et contrôles métier restent applicables.

Remplacez chaque paramètre de chemin entre accolades par l’identifiant demandé.

Corps de requête

application/json

ChampTypeObligatoireDescription
externalIdstringOui
sourceUpdatedAtunionNonDernière modification dans la source - curseur du delta
Schéma complet du corps
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "externalId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "sourceUpdatedAt": {
      "description": "Dernière modification dans la source - curseur du delta",
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        }
      ]
    }
  },
  "required": [
    "externalId"
  ],
  "additionalProperties": false
}

Réponses

200 : Identifiants de l'objet après écriture

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Objet porteur"
        },
        "externalRefs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "description": "Système source (minuscules) - `tacto`, `erp`…"
              },
              "externalId": {
                "type": "string"
              },
              "sourceUpdatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
              }
            },
            "required": [
              "source",
              "externalId",
              "sourceUpdatedAt"
            ],
            "additionalProperties": false
          },
          "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
        }
      },
      "required": [
        "id",
        "externalRefs"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Poser l'identifiant d'une source sur un contrat (idempotent)",
  "description": "Une source, un identifiant par objet : la même écriture deux fois ne crée qu'une ligne ; un identifiant déjà porté par un AUTRE objet de la même source répond 409 avec l'objet porteur (jamais déplacé en silence). La source `salesforce` est réservée aux scripts de reprise (403). Même garde que le PATCH de l'objet : hors visibilité 404, hors périmètre d'écriture 403.",
  "tags": [
    "Contrats"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "sourceUpdatedAt": {
              "description": "Dernière modification dans la source - curseur du delta",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                {
                  "type": "string",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              ]
            }
          },
          "required": [
            "externalId"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "quotes:write"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Identifiants de l'objet après écriture",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Objet porteur"
              },
              "externalRefs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "Système source (minuscules) - `tacto`, `erp`…"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sourceUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
                    }
                  },
                  "required": [
                    "source",
                    "externalId",
                    "sourceUpdatedAt"
                  ],
                  "additionalProperties": false
                },
                "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
              }
            },
            "required": [
              "id",
              "externalRefs"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /contracts/{id}/external-refs/{source}#

Retirer l'identifiant d'une source sur un contrat

Scopes d'app : quotes:write. Les autres droits, périmètres et contrôles métier restent applicables.

Remplacez chaque paramètre de chemin entre accolades par l’identifiant demandé.

Aucun corps de requête déclaré dans ce contrat.

Réponses

200 : Identifiants restants

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Objet porteur"
        },
        "externalRefs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "description": "Système source (minuscules) - `tacto`, `erp`…"
              },
              "externalId": {
                "type": "string"
              },
              "sourceUpdatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
              }
            },
            "required": [
              "source",
              "externalId",
              "sourceUpdatedAt"
            ],
            "additionalProperties": false
          },
          "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
        },
        "removed": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Références retirées (0 si la source n'en portait pas)"
        }
      },
      "required": [
        "id",
        "externalRefs",
        "removed"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Retirer l'identifiant d'une source sur un contrat",
  "tags": [
    "Contrats"
  ],
  "security": [
    {
      "oauth2": [
        "quotes:write"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Identifiants restants",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Objet porteur"
              },
              "externalRefs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "Système source (minuscules) - `tacto`, `erp`…"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sourceUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
                    }
                  },
                  "required": [
                    "source",
                    "externalId",
                    "sourceUpdatedAt"
                  ],
                  "additionalProperties": false
                },
                "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
              },
              "removed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Références retirées (0 si la source n'en portait pas)"
              }
            },
            "required": [
              "id",
              "externalRefs",
              "removed"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /contracts#

Lister les contrats (hors corbeille) - qui est en contrat où

Un contrat naît d'un devis signé (ADR-156) ; il n'y a pas de POST. Périmètre : celui des devis porteurs. endsBefore sert aux échéances à venir (renouvellements).

Scopes d'app : quotes:read. Les autres droits, périmètres et contrôles métier restent applicables.

Paramètres

NomEmplacementRequisSchéma
cursorqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Curseur opaque de la page précédente","type":"string"}
limitqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Taille de page - défaut 50, max 200 (clampé)","type":"integer","minimum":1,"maximum":9007199254740991}
updatedSincequeryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"ISO 8601 - objets modifiés depuis (inclusif), le filtre des syncs incrémentales","type":"string"}
sincequeryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Jours (1 à 365) - objets dans leur statut courant depuis plus de N jours (status_changed_at), combinable avec status (T-1407)","type":"integer","minimum":1,"maximum":365}
idsqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Répétable - restriction à une liste d'ids (max 200)","type":"string"}
statusqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["active","amended","terminated","expired"]}
companyIdqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Contrats dont la cible est cette société","type":"string"}
contactIdqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Contrats dont la cible est ce contact (B2C)","type":"string"}
endsBeforequeryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"ISO date - contrats dont la fin est avant (inclus)","type":"string"}

Aucun corps de requête déclaré dans ce contrat.

Réponses

200 : Page de contrats

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "number": {
                "type": "string",
                "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
              },
              "quoteId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Le devis signé qui a fait naître cette version"
              },
              "targetType": {
                "type": "string",
                "enum": [
                  "company",
                  "contact"
                ]
              },
              "targetId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "signatoryContactId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ownerId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du premier cycle vendu"
              },
              "endsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du dernier cycle vendu"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "amended",
                  "terminated",
                  "expired"
                ]
              },
              "currency": {
                "type": "string",
                "enum": [
                  "EUR",
                  "USD",
                  "GBP",
                  "CHF"
                ]
              },
              "fxRate": {
                "description": "Taux figé du devis porteur : 1 EUR = taux devise",
                "type": [
                  "string",
                  "null"
                ]
              },
              "fxRateDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totalExclTaxEur": {
                "type": "number"
              },
              "totalInclTaxEur": {
                "type": "number"
              },
              "totalExclTax": {
                "type": "number"
              },
              "totalInclTax": {
                "type": "number"
              },
              "version": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "parentContractId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "La version précédente quand c'est un avenant"
              },
              "renewal": {
                "type": "string",
                "enum": [
                  "none",
                  "tacit",
                  "proposed"
                ]
              },
              "renewalNoticeDays": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "terminatedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminationReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "statusChangedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "Entrée dans le statut courant (T-1407)"
              }
            },
            "required": [
              "id",
              "number",
              "quoteId",
              "targetType",
              "targetId",
              "signatoryContactId",
              "ownerId",
              "subject",
              "startsOn",
              "endsOn",
              "status",
              "currency",
              "fxRate",
              "fxRateDate",
              "totalExclTaxEur",
              "totalInclTaxEur",
              "totalExclTax",
              "totalInclTax",
              "version",
              "parentContractId",
              "renewal",
              "renewalNoticeDays",
              "terminatedOn",
              "terminationReason",
              "createdAt",
              "updatedAt",
              "statusChangedAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "data",
        "nextCursor"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Lister les contrats (hors corbeille) - qui est en contrat où",
  "description": "Un contrat naît d'un devis signé (ADR-156) ; il n'y a pas de POST. Périmètre : celui des devis porteurs. `endsBefore` sert aux échéances à venir (renouvellements).",
  "tags": [
    "Contrats"
  ],
  "parameters": [
    {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Curseur opaque de la page précédente",
        "type": "string"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Taille de page - défaut 50, max 200 (clampé)",
        "type": "integer",
        "minimum": 1,
        "maximum": 9007199254740991
      }
    },
    {
      "name": "updatedSince",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "ISO 8601 - objets modifiés depuis (inclusif), le filtre des syncs incrémentales",
        "type": "string"
      }
    },
    {
      "name": "since",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Jours (1 à 365) - objets dans leur statut courant depuis plus de N jours (status_changed_at), combinable avec status (T-1407)",
        "type": "integer",
        "minimum": 1,
        "maximum": 365
      }
    },
    {
      "name": "ids",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Répétable - restriction à une liste d'ids (max 200)",
        "type": "string"
      }
    },
    {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "string",
        "enum": [
          "active",
          "amended",
          "terminated",
          "expired"
        ]
      }
    },
    {
      "name": "companyId",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Contrats dont la cible est cette société",
        "type": "string"
      }
    },
    {
      "name": "contactId",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Contrats dont la cible est ce contact (B2C)",
        "type": "string"
      }
    },
    {
      "name": "endsBefore",
      "in": "query",
      "required": false,
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "ISO date - contrats dont la fin est avant (inclus)",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "oauth2": [
        "quotes:read"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Page de contrats",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "number": {
                      "type": "string",
                      "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "description": "Le devis signé qui a fait naître cette version"
                    },
                    "targetType": {
                      "type": "string",
                      "enum": [
                        "company",
                        "contact"
                      ]
                    },
                    "targetId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "signatoryContactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ownerId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "startsOn": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "description": "Dérivée du premier cycle vendu"
                    },
                    "endsOn": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "description": "Dérivée du dernier cycle vendu"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "amended",
                        "terminated",
                        "expired"
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR",
                        "USD",
                        "GBP",
                        "CHF"
                      ]
                    },
                    "fxRate": {
                      "description": "Taux figé du devis porteur : 1 EUR = taux devise",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fxRateDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "totalExclTaxEur": {
                      "type": "number"
                    },
                    "totalInclTaxEur": {
                      "type": "number"
                    },
                    "totalExclTax": {
                      "type": "number"
                    },
                    "totalInclTax": {
                      "type": "number"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "parentContractId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "La version précédente quand c'est un avenant"
                    },
                    "renewal": {
                      "type": "string",
                      "enum": [
                        "none",
                        "tacit",
                        "proposed"
                      ]
                    },
                    "renewalNoticeDays": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "terminatedOn": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "terminationReason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "statusChangedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                      "description": "Entrée dans le statut courant (T-1407)"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "quoteId",
                    "targetType",
                    "targetId",
                    "signatoryContactId",
                    "ownerId",
                    "subject",
                    "startsOn",
                    "endsOn",
                    "status",
                    "currency",
                    "fxRate",
                    "fxRateDate",
                    "totalExclTaxEur",
                    "totalInclTaxEur",
                    "totalExclTax",
                    "totalInclTax",
                    "version",
                    "parentContractId",
                    "renewal",
                    "renewalNoticeDays",
                    "terminatedOn",
                    "terminationReason",
                    "createdAt",
                    "updatedAt",
                    "statusChangedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "data",
              "nextCursor"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /contracts/{id}#

Détail d'un contrat - échéancier, facturé, payé, identifiants externes

Scopes d'app : quotes:read. Les autres droits, périmètres et contrôles métier restent applicables.

Remplacez chaque paramètre de chemin entre accolades par l’identifiant demandé.

Aucun corps de requête déclaré dans ce contrat.

Réponses

200 : Contrat

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "number": {
          "type": "string",
          "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
        },
        "quoteId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Le devis signé qui a fait naître cette version"
        },
        "targetType": {
          "type": "string",
          "enum": [
            "company",
            "contact"
          ]
        },
        "targetId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "signatoryContactId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "ownerId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "subject": {
          "type": [
            "string",
            "null"
          ]
        },
        "startsOn": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Dérivée du premier cycle vendu"
        },
        "endsOn": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Dérivée du dernier cycle vendu"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "amended",
            "terminated",
            "expired"
          ]
        },
        "currency": {
          "type": "string",
          "enum": [
            "EUR",
            "USD",
            "GBP",
            "CHF"
          ]
        },
        "fxRate": {
          "description": "Taux figé du devis porteur : 1 EUR = taux devise",
          "type": [
            "string",
            "null"
          ]
        },
        "fxRateDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "totalExclTaxEur": {
          "type": "number"
        },
        "totalInclTaxEur": {
          "type": "number"
        },
        "totalExclTax": {
          "type": "number"
        },
        "totalInclTax": {
          "type": "number"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "parentContractId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "La version précédente quand c'est un avenant"
        },
        "renewal": {
          "type": "string",
          "enum": [
            "none",
            "tacit",
            "proposed"
          ]
        },
        "renewalNoticeDays": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "terminatedOn": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "terminationReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "statusChangedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Entrée dans le statut courant (T-1407)"
        },
        "installments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "installmentId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "cycleId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "cycleLabel": {
                "type": "string"
              },
              "dueOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "amountInclTax": {
                "type": "number"
              },
              "amountInclTaxEur": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "to_invoice",
                  "invoiced",
                  "paid",
                  "late",
                  "cancelled"
                ]
              },
              "invoiceId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "installmentId",
              "cycleId",
              "cycleLabel",
              "dueOn",
              "amountInclTax",
              "amountInclTaxEur",
              "status",
              "invoiceId"
            ],
            "additionalProperties": false
          },
          "description": "Échéancier du devis porteur (une échéance par cycle)"
        },
        "invoicedEur": {
          "type": "number",
          "description": "Facturé TTC converti au taux figé de chaque facture"
        },
        "paidEur": {
          "type": "number"
        },
        "creditedEur": {
          "type": "number"
        },
        "invoiced": {
          "type": "number",
          "description": "Somme TTC des factures émises (émises, payées, en retard) - calculée"
        },
        "paid": {
          "type": "number",
          "description": "Somme TTC des factures réglées - calculée"
        },
        "credited": {
          "type": "number",
          "description": "Somme TTC des avoirs rattachés au devis - calculée"
        },
        "externalRefs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "description": "Système source (minuscules) - `tacto`, `erp`…"
              },
              "externalId": {
                "type": "string"
              },
              "sourceUpdatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
              }
            },
            "required": [
              "source",
              "externalId",
              "sourceUpdatedAt"
            ],
            "additionalProperties": false
          },
          "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
        }
      },
      "required": [
        "id",
        "number",
        "quoteId",
        "targetType",
        "targetId",
        "signatoryContactId",
        "ownerId",
        "subject",
        "startsOn",
        "endsOn",
        "status",
        "currency",
        "fxRate",
        "fxRateDate",
        "totalExclTaxEur",
        "totalInclTaxEur",
        "totalExclTax",
        "totalInclTax",
        "version",
        "parentContractId",
        "renewal",
        "renewalNoticeDays",
        "terminatedOn",
        "terminationReason",
        "createdAt",
        "updatedAt",
        "statusChangedAt",
        "installments",
        "invoicedEur",
        "paidEur",
        "creditedEur",
        "invoiced",
        "paid",
        "credited",
        "externalRefs"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Détail d'un contrat - échéancier, facturé, payé, identifiants externes",
  "tags": [
    "Contrats"
  ],
  "security": [
    {
      "oauth2": [
        "quotes:read"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Contrat",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "number": {
                "type": "string",
                "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
              },
              "quoteId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Le devis signé qui a fait naître cette version"
              },
              "targetType": {
                "type": "string",
                "enum": [
                  "company",
                  "contact"
                ]
              },
              "targetId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "signatoryContactId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ownerId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du premier cycle vendu"
              },
              "endsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du dernier cycle vendu"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "amended",
                  "terminated",
                  "expired"
                ]
              },
              "currency": {
                "type": "string",
                "enum": [
                  "EUR",
                  "USD",
                  "GBP",
                  "CHF"
                ]
              },
              "fxRate": {
                "description": "Taux figé du devis porteur : 1 EUR = taux devise",
                "type": [
                  "string",
                  "null"
                ]
              },
              "fxRateDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totalExclTaxEur": {
                "type": "number"
              },
              "totalInclTaxEur": {
                "type": "number"
              },
              "totalExclTax": {
                "type": "number"
              },
              "totalInclTax": {
                "type": "number"
              },
              "version": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "parentContractId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "La version précédente quand c'est un avenant"
              },
              "renewal": {
                "type": "string",
                "enum": [
                  "none",
                  "tacit",
                  "proposed"
                ]
              },
              "renewalNoticeDays": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "terminatedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminationReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "statusChangedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "Entrée dans le statut courant (T-1407)"
              },
              "installments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "installmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "cycleId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "cycleLabel": {
                      "type": "string"
                    },
                    "dueOn": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "amountInclTax": {
                      "type": "number"
                    },
                    "amountInclTaxEur": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "to_invoice",
                        "invoiced",
                        "paid",
                        "late",
                        "cancelled"
                      ]
                    },
                    "invoiceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "installmentId",
                    "cycleId",
                    "cycleLabel",
                    "dueOn",
                    "amountInclTax",
                    "amountInclTaxEur",
                    "status",
                    "invoiceId"
                  ],
                  "additionalProperties": false
                },
                "description": "Échéancier du devis porteur (une échéance par cycle)"
              },
              "invoicedEur": {
                "type": "number",
                "description": "Facturé TTC converti au taux figé de chaque facture"
              },
              "paidEur": {
                "type": "number"
              },
              "creditedEur": {
                "type": "number"
              },
              "invoiced": {
                "type": "number",
                "description": "Somme TTC des factures émises (émises, payées, en retard) - calculée"
              },
              "paid": {
                "type": "number",
                "description": "Somme TTC des factures réglées - calculée"
              },
              "credited": {
                "type": "number",
                "description": "Somme TTC des avoirs rattachés au devis - calculée"
              },
              "externalRefs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "Système source (minuscules) - `tacto`, `erp`…"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sourceUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
                    }
                  },
                  "required": [
                    "source",
                    "externalId",
                    "sourceUpdatedAt"
                  ],
                  "additionalProperties": false
                },
                "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
              }
            },
            "required": [
              "id",
              "number",
              "quoteId",
              "targetType",
              "targetId",
              "signatoryContactId",
              "ownerId",
              "subject",
              "startsOn",
              "endsOn",
              "status",
              "currency",
              "fxRate",
              "fxRateDate",
              "totalExclTaxEur",
              "totalInclTaxEur",
              "totalExclTax",
              "totalInclTax",
              "version",
              "parentContractId",
              "renewal",
              "renewalNoticeDays",
              "terminatedOn",
              "terminationReason",
              "createdAt",
              "updatedAt",
              "statusChangedAt",
              "installments",
              "invoicedEur",
              "paidEur",
              "creditedEur",
              "invoiced",
              "paid",
              "credited",
              "externalRefs"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /contracts/{id}/terminate#

Résilier un contrat actif - geste irréversible, motif obligatoire

Statut terminated, date et motif posés, échéances futures non facturées annulées, webhook contract.terminated émis une fois. Un contrat qui n'est plus actif répond 409 ; un motif hors liste ou une date avant le début du contrat répondent 422.

Scopes d'app : quotes:write. Les autres droits, périmètres et contrôles métier restent applicables.

Remplacez chaque paramètre de chemin entre accolades par l’identifiant demandé.

Corps de requête

application/json

ChampTypeObligatoireDescription
onstringNonDate de résiliation - défaut : aujourd'hui (jour local)
reasonstringOui
Schéma complet du corps
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "on": {
      "description": "Date de résiliation - défaut : aujourd'hui (jour local)",
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    }
  },
  "required": [
    "reason"
  ],
  "additionalProperties": false
}

Réponses

200 : Contrat résilié

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "number": {
          "type": "string",
          "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
        },
        "quoteId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Le devis signé qui a fait naître cette version"
        },
        "targetType": {
          "type": "string",
          "enum": [
            "company",
            "contact"
          ]
        },
        "targetId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "signatoryContactId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "ownerId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "subject": {
          "type": [
            "string",
            "null"
          ]
        },
        "startsOn": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Dérivée du premier cycle vendu"
        },
        "endsOn": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Dérivée du dernier cycle vendu"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "amended",
            "terminated",
            "expired"
          ]
        },
        "currency": {
          "type": "string",
          "enum": [
            "EUR",
            "USD",
            "GBP",
            "CHF"
          ]
        },
        "fxRate": {
          "description": "Taux figé du devis porteur : 1 EUR = taux devise",
          "type": [
            "string",
            "null"
          ]
        },
        "fxRateDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "totalExclTaxEur": {
          "type": "number"
        },
        "totalInclTaxEur": {
          "type": "number"
        },
        "totalExclTax": {
          "type": "number"
        },
        "totalInclTax": {
          "type": "number"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "parentContractId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "La version précédente quand c'est un avenant"
        },
        "renewal": {
          "type": "string",
          "enum": [
            "none",
            "tacit",
            "proposed"
          ]
        },
        "renewalNoticeDays": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "terminatedOn": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "terminationReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "statusChangedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Entrée dans le statut courant (T-1407)"
        },
        "installments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "installmentId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "cycleId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "cycleLabel": {
                "type": "string"
              },
              "dueOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "amountInclTax": {
                "type": "number"
              },
              "amountInclTaxEur": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "to_invoice",
                  "invoiced",
                  "paid",
                  "late",
                  "cancelled"
                ]
              },
              "invoiceId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "installmentId",
              "cycleId",
              "cycleLabel",
              "dueOn",
              "amountInclTax",
              "amountInclTaxEur",
              "status",
              "invoiceId"
            ],
            "additionalProperties": false
          },
          "description": "Échéancier du devis porteur (une échéance par cycle)"
        },
        "invoicedEur": {
          "type": "number",
          "description": "Facturé TTC converti au taux figé de chaque facture"
        },
        "paidEur": {
          "type": "number"
        },
        "creditedEur": {
          "type": "number"
        },
        "invoiced": {
          "type": "number",
          "description": "Somme TTC des factures émises (émises, payées, en retard) - calculée"
        },
        "paid": {
          "type": "number",
          "description": "Somme TTC des factures réglées - calculée"
        },
        "credited": {
          "type": "number",
          "description": "Somme TTC des avoirs rattachés au devis - calculée"
        },
        "externalRefs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "description": "Système source (minuscules) - `tacto`, `erp`…"
              },
              "externalId": {
                "type": "string"
              },
              "sourceUpdatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
              }
            },
            "required": [
              "source",
              "externalId",
              "sourceUpdatedAt"
            ],
            "additionalProperties": false
          },
          "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
        }
      },
      "required": [
        "id",
        "number",
        "quoteId",
        "targetType",
        "targetId",
        "signatoryContactId",
        "ownerId",
        "subject",
        "startsOn",
        "endsOn",
        "status",
        "currency",
        "fxRate",
        "fxRateDate",
        "totalExclTaxEur",
        "totalInclTaxEur",
        "totalExclTax",
        "totalInclTax",
        "version",
        "parentContractId",
        "renewal",
        "renewalNoticeDays",
        "terminatedOn",
        "terminationReason",
        "createdAt",
        "updatedAt",
        "statusChangedAt",
        "installments",
        "invoicedEur",
        "paidEur",
        "creditedEur",
        "invoiced",
        "paid",
        "credited",
        "externalRefs"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Résilier un contrat actif - geste irréversible, motif obligatoire",
  "description": "Statut `terminated`, date et motif posés, échéances futures non facturées annulées, webhook `contract.terminated` émis une fois. Un contrat qui n'est plus actif répond 409 ; un motif hors liste ou une date avant le début du contrat répondent 422.",
  "tags": [
    "Contrats"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "on": {
              "description": "Date de résiliation - défaut : aujourd'hui (jour local)",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "reason": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "required": [
            "reason"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "quotes:write"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Contrat résilié",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "number": {
                "type": "string",
                "description": "Série CT-{YYYY}-{seq}, suffixe -v{n} sur un avenant"
              },
              "quoteId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Le devis signé qui a fait naître cette version"
              },
              "targetType": {
                "type": "string",
                "enum": [
                  "company",
                  "contact"
                ]
              },
              "targetId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "signatoryContactId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ownerId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du premier cycle vendu"
              },
              "endsOn": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Dérivée du dernier cycle vendu"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "amended",
                  "terminated",
                  "expired"
                ]
              },
              "currency": {
                "type": "string",
                "enum": [
                  "EUR",
                  "USD",
                  "GBP",
                  "CHF"
                ]
              },
              "fxRate": {
                "description": "Taux figé du devis porteur : 1 EUR = taux devise",
                "type": [
                  "string",
                  "null"
                ]
              },
              "fxRateDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totalExclTaxEur": {
                "type": "number"
              },
              "totalInclTaxEur": {
                "type": "number"
              },
              "totalExclTax": {
                "type": "number"
              },
              "totalInclTax": {
                "type": "number"
              },
              "version": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "parentContractId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "La version précédente quand c'est un avenant"
              },
              "renewal": {
                "type": "string",
                "enum": [
                  "none",
                  "tacit",
                  "proposed"
                ]
              },
              "renewalNoticeDays": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "terminatedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminationReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "statusChangedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "Entrée dans le statut courant (T-1407)"
              },
              "installments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "installmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "cycleId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "cycleLabel": {
                      "type": "string"
                    },
                    "dueOn": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "amountInclTax": {
                      "type": "number"
                    },
                    "amountInclTaxEur": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "to_invoice",
                        "invoiced",
                        "paid",
                        "late",
                        "cancelled"
                      ]
                    },
                    "invoiceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "installmentId",
                    "cycleId",
                    "cycleLabel",
                    "dueOn",
                    "amountInclTax",
                    "amountInclTaxEur",
                    "status",
                    "invoiceId"
                  ],
                  "additionalProperties": false
                },
                "description": "Échéancier du devis porteur (une échéance par cycle)"
              },
              "invoicedEur": {
                "type": "number",
                "description": "Facturé TTC converti au taux figé de chaque facture"
              },
              "paidEur": {
                "type": "number"
              },
              "creditedEur": {
                "type": "number"
              },
              "invoiced": {
                "type": "number",
                "description": "Somme TTC des factures émises (émises, payées, en retard) - calculée"
              },
              "paid": {
                "type": "number",
                "description": "Somme TTC des factures réglées - calculée"
              },
              "credited": {
                "type": "number",
                "description": "Somme TTC des avoirs rattachés au devis - calculée"
              },
              "externalRefs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "Système source (minuscules) - `tacto`, `erp`…"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "sourceUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Dernière modification connue dans la source (curseur du delta), null si inconnue"
                    }
                  },
                  "required": [
                    "source",
                    "externalId",
                    "sourceUpdatedAt"
                  ],
                  "additionalProperties": false
                },
                "description": "Identifiants de cet objet dans les systèmes tiers (external_ref, ADR-138 D1, ADR-156 D6)"
              }
            },
            "required": [
              "id",
              "number",
              "quoteId",
              "targetType",
              "targetId",
              "signatoryContactId",
              "ownerId",
              "subject",
              "startsOn",
              "endsOn",
              "status",
              "currency",
              "fxRate",
              "fxRateDate",
              "totalExclTaxEur",
              "totalInclTaxEur",
              "totalExclTax",
              "totalInclTax",
              "version",
              "parentContractId",
              "renewal",
              "renewalNoticeDays",
              "terminatedOn",
              "terminationReason",
              "createdAt",
              "updatedAt",
              "statusChangedAt",
              "installments",
              "invoicedEur",
              "paidEur",
              "creditedEur",
              "invoiced",
              "paid",
              "credited",
              "externalRefs"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /contracts/{id}/renewal#

Proposer le renouvellement d'un contrat (brouillon de devis sur les cycles suivants)

Même geste que la fiche (T-1413) : un seul brouillon par contrat, la seconde demande rend le même (created: false). upliftPercent revalorise le prix de chaque ligne (un prix négocié valide prime), entrée datée dans le fil du brouillon (#972). Hors fenêtre de préavis, sans cycle suivant ou contrat clos : 409.

Scopes d'app : quotes:write. Les autres droits, périmètres et contrôles métier restent applicables.

Remplacez chaque paramètre de chemin entre accolades par l’identifiant demandé.

Corps de requête

application/json

ChampTypeObligatoireDescription
upliftPercentnumberNonRevalorisation appliquée au prix de chaque ligne (un prix négocié valide prime) ; absente : réglage de l'organisation ; 0 : aucune hausse
Schéma complet du corps
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "upliftPercent": {
      "description": "Revalorisation appliquée au prix de chaque ligne (un prix négocié valide prime) ; absente : réglage de l'organisation ; 0 : aucune hausse",
      "type": "number",
      "minimum": 0,
      "maximum": 50
    }
  },
  "additionalProperties": false
}

Réponses

200 : Brouillon créé ou déjà ouvert (`created`)

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "created": {
          "type": "boolean",
          "description": "false : le brouillon de renouvellement existait déjà, rendu tel quel"
        },
        "quote": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "number": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "number"
          ],
          "additionalProperties": false
        },
        "upliftPercent": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "created",
        "quote",
        "upliftPercent"
      ],
      "additionalProperties": false
    }
  }
}

default : Erreur - enveloppe problem+json (RFC 9457)

Contenu de la réponse default
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
Opération OpenAPI complète
{
  "summary": "Proposer le renouvellement d'un contrat (brouillon de devis sur les cycles suivants)",
  "description": "Même geste que la fiche (T-1413) : un seul brouillon par contrat, la seconde demande rend le même (`created: false`). `upliftPercent` revalorise le prix de chaque ligne (un prix négocié valide prime), entrée datée dans le fil du brouillon (#972). Hors fenêtre de préavis, sans cycle suivant ou contrat clos : 409.",
  "tags": [
    "Contrats"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "upliftPercent": {
              "description": "Revalorisation appliquée au prix de chaque ligne (un prix négocié valide prime) ; absente : réglage de l'organisation ; 0 : aucune hausse",
              "type": "number",
              "minimum": 0,
              "maximum": 50
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "quotes:write"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Brouillon créé ou déjà ouvert (`created`)",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "created": {
                "type": "boolean",
                "description": "false : le brouillon de renouvellement existait déjà, rendu tel quel"
              },
              "quote": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "number": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "number"
                ],
                "additionalProperties": false
              },
              "upliftPercent": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "created",
              "quote",
              "upliftPercent"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}