API : quotes
17 opérations REST du groupe quotes.
POST /quotes/{id}/options/retain#
Retenir des options d’un devis
Brouillon : options transformées en lignes fermes. Envoyé ou négocié : nouvelle version brouillon, source inchangée. Aucun envoi ou signature automatique. Retourne le devis cible ; optionIds désigne uniquement les options de la source.
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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
optionIds | array | Oui | |
expectedUpdatedAt | union | Non |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"optionIds": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"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)$"
}
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"required": [
"optionIds"
],
"additionalProperties": false
}Réponses
200 : Devis cible après reprise des options
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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": "Retenir des options d’un devis",
"description": "Brouillon : options transformées en lignes fermes. Envoyé ou négocié : nouvelle version brouillon, source inchangée. Aucun envoi ou signature automatique. Retourne le devis cible ; optionIds désigne uniquement les options de la source.",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"optionIds": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"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)$"
}
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"required": [
"optionIds"
],
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Devis cible après reprise des options",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/tags#
Remplacer les étiquettes d’un devis
Identifiants du dictionnaire partagé. Liste vide : retrait de toutes les poses. Ventes active, modification et périmètre du devis requis ; Marketing facultatif. expectedUpdatedAt protège une sélection préparée.
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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
tags | array | Oui | Identifiants des étiquettes à conserver ; vide retire toutes les poses du devis |
expectedUpdatedAt | union | Non |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"maxItems": 50,
"type": "array",
"items": {
"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": "Identifiants des étiquettes à conserver ; vide retire toutes les poses du devis"
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"required": [
"tags"
],
"additionalProperties": false
}Réponses
200 : Étiquettes du devis
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
}
},
"required": [
"tags"
],
"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": "Remplacer les étiquettes d’un devis",
"description": "Identifiants du dictionnaire partagé. Liste vide : retrait de toutes les poses. Ventes active, modification et périmètre du devis requis ; Marketing facultatif. expectedUpdatedAt protège une sélection préparée.",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"maxItems": 50,
"type": "array",
"items": {
"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": "Identifiants des étiquettes à conserver ; vide retire toutes les poses du devis"
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"required": [
"tags"
],
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Étiquettes du devis",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
}
},
"required": [
"tags"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/forecast#
Modifier l'estimation de signature du devis courant ouvert
Date prévue, confiance et commentaire internes ; aucune pondération ni transition. Les champs omis sont conservés, null les efface. Un devis signé, refusé ou remplacé est en lecture seule.
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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
expectedSignOn | union | Non | |
forecastConfidence | union | Non | |
forecastComment | union | Non | |
expectedUpdatedAt | union | Non |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"additionalProperties": false
}Réponses
200 : Devis et estimation
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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": "Modifier l'estimation de signature du devis courant ouvert",
"description": "Date prévue, confiance et commentaire internes ; aucune pondération ni transition. Les champs omis sont conservés, null les efface. Un devis signé, refusé ou remplacé est en lecture seule.",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
},
"expectedUpdatedAt": {
"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": "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))$"
}
]
}
},
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Devis et estimation",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}GET /quotes#
Lister les devis (hors corbeille)
Scopes d'app : quotes:read. Les autres droits, périmètres et contrôles métier restent applicables.
Paramètres
| Nom | Emplacement | Requis | Schéma |
|---|---|---|---|
cursor | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Curseur opaque de la page précédente","type":"string"} |
limit | query | Non | {"$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} |
updatedSince | query | Non | {"$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"} |
since | query | Non | {"$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} |
ids | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Répétable - restriction à une liste d'ids (max 200)","type":"string"} |
status | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","sent","negotiation","signed","refused"]} |
companyId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"} |
ownerId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"} |
externalId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Objets qui portent cet identifiant externe (exact) - avec `externalSource` pour une source précise","type":"string"} |
externalSource | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Source de l'identifiant externe (`tacto`…)","type":"string"} |
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : Page de devis
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": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference"
],
"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 devis (hors corbeille)",
"tags": [
"Devis"
],
"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": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
}
},
{
"name": "companyId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string"
}
},
{
"name": "ownerId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string"
}
},
{
"name": "externalId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Objets qui portent cet identifiant externe (exact) - avec `externalSource` pour une source précise",
"type": "string"
}
},
{
"name": "externalSource",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Source de l'identifiant externe (`tacto`…)",
"type": "string"
}
}
],
"security": [
{
"oauth2": [
"quotes:read"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Page de devis",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference"
],
"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"
}
}
}
}
}
}POST /quotes#
Créer un devis (brouillon) - numéro et totaux calculés serveur
Scopes d'app : quotes:write. Les autres droits, périmètres et contrôles métier restent applicables.
Corps de requête
application/json
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
options | array | Non | |
targetType | string | Oui | Valeurs : company, contact |
targetId | string | Oui | |
cycleIds | array | Oui | Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412) |
serviceOn | union | Non | Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle |
currency | string | Non | Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition Valeurs : EUR, USD, GBP, CHF |
fxRate | number | Non | Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création |
subject | union | Non | |
discount | union | Non | |
indexPercent | number | Non | #968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis |
lines | array | Oui | #747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe |
sections | array | Non | |
billingPlan | union | Non | Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature. |
contacts | array | Non | |
ownerId | string | Oui |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"options": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"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"
}
]
},
"productPriceId": {
"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)$"
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"exclusiveMinimum": 0
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"label": {
"type": "string",
"minLength": 1
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"amountsByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
},
"cycleIds": {
"minItems": 1,
"type": "array",
"items": {
"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)$"
}
}
},
"required": [
"productId",
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
}
},
"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)$"
},
"cycleIds": {
"type": "array",
"items": {
"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": "Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412)"
},
"serviceOn": {
"description": "Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle",
"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"
}
]
},
"currency": {
"description": "Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition",
"type": "string",
"enum": [
"EUR",
"USD",
"GBP",
"CHF"
]
},
"fxRate": {
"description": "Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 999999
},
"subject": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
]
},
{
"type": "null"
}
]
},
"indexPercent": {
"description": "#968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis",
"type": "number",
"minimum": 0,
"maximum": 100
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"description": "null/absent = ligne libre (label requis)",
"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"
}
]
},
"productPriceId": {
"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)$"
},
"sectionIndex": {
"description": "Index de la section dans sections (à partir de 0) ; absent : ligne à plat",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"minimum": 0
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"isText": {
"description": "Ligne de texte (#973) : libellé seul, sans produit ; prix 0, quantité 1, aucun cycle, hors de tout total",
"type": "boolean"
},
"amountsByCycle": {
"description": "#968 : montant HT de la ligne par cycle couvert, AVANT remise de ligne ({ cycleId: montant }) ; absent : PU × quantité à chaque cycle",
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
}
},
"required": [
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
},
"description": "#747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"isBundle": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"billingPlan": {
"description": "Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature.",
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
]
}
},
{
"type": "null"
}
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"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)$"
}
},
"required": [
"targetType",
"targetId",
"cycleIds",
"lines",
"ownerId"
],
"additionalProperties": false
}Réponses
201 : Devis créé
Contenu de la réponse 201
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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": "Créer un devis (brouillon) - numéro et totaux calculés serveur",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"options": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"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"
}
]
},
"productPriceId": {
"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)$"
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"exclusiveMinimum": 0
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"label": {
"type": "string",
"minLength": 1
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"amountsByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
},
"cycleIds": {
"minItems": 1,
"type": "array",
"items": {
"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)$"
}
}
},
"required": [
"productId",
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
}
},
"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)$"
},
"cycleIds": {
"type": "array",
"items": {
"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": "Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412)"
},
"serviceOn": {
"description": "Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle",
"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"
}
]
},
"currency": {
"description": "Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition",
"type": "string",
"enum": [
"EUR",
"USD",
"GBP",
"CHF"
]
},
"fxRate": {
"description": "Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 999999
},
"subject": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
]
},
{
"type": "null"
}
]
},
"indexPercent": {
"description": "#968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis",
"type": "number",
"minimum": 0,
"maximum": 100
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"description": "null/absent = ligne libre (label requis)",
"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"
}
]
},
"productPriceId": {
"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)$"
},
"sectionIndex": {
"description": "Index de la section dans sections (à partir de 0) ; absent : ligne à plat",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"minimum": 0
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"isText": {
"description": "Ligne de texte (#973) : libellé seul, sans produit ; prix 0, quantité 1, aucun cycle, hors de tout total",
"type": "boolean"
},
"amountsByCycle": {
"description": "#968 : montant HT de la ligne par cycle couvert, AVANT remise de ligne ({ cycleId: montant }) ; absent : PU × quantité à chaque cycle",
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
}
},
"required": [
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
},
"description": "#747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"isBundle": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"billingPlan": {
"description": "Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature.",
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
]
}
},
{
"type": "null"
}
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"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)$"
}
},
"required": [
"targetType",
"targetId",
"cycleIds",
"lines",
"ownerId"
],
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"201": {
"description": "Devis créé",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}GET /quotes/{id}#
Détail d'un devis - lignes, totaux, échéancier, engagement
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 : Devis
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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 devis - lignes, totaux, échéancier, engagement",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:read"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Devis",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}PATCH /quotes/{id}#
Recomposer un devis BROUILLON (jeton expectedUpdatedAt requis)
Remplace la composition (lignes, cycles, cible, remise) - brouillon uniquement, mêmes règles que le builder UI. Hors brouillon : 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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
options | array | Non | |
targetType | string | Oui | Valeurs : company, contact |
targetId | string | Oui | |
cycleIds | array | Oui | Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412) |
serviceOn | union | Non | Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle |
currency | string | Non | Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition Valeurs : EUR, USD, GBP, CHF |
fxRate | number | Non | Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création |
subject | union | Non | |
discount | union | Non | |
indexPercent | number | Non | #968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis |
lines | array | Oui | #747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe |
sections | array | Non | |
billingPlan | union | Non | Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature. |
contacts | array | Non | |
expectedUpdatedAt | union | Oui | updatedAt lu au GET - jeton de concurrence |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"options": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"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"
}
]
},
"productPriceId": {
"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)$"
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"exclusiveMinimum": 0
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"label": {
"type": "string",
"minLength": 1
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"amountsByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
},
"cycleIds": {
"minItems": 1,
"type": "array",
"items": {
"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)$"
}
}
},
"required": [
"productId",
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
}
},
"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)$"
},
"cycleIds": {
"type": "array",
"items": {
"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": "Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412)"
},
"serviceOn": {
"description": "Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle",
"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"
}
]
},
"currency": {
"description": "Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition",
"type": "string",
"enum": [
"EUR",
"USD",
"GBP",
"CHF"
]
},
"fxRate": {
"description": "Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 999999
},
"subject": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
]
},
{
"type": "null"
}
]
},
"indexPercent": {
"description": "#968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis",
"type": "number",
"minimum": 0,
"maximum": 100
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"description": "null/absent = ligne libre (label requis)",
"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"
}
]
},
"productPriceId": {
"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)$"
},
"sectionIndex": {
"description": "Index de la section dans sections (à partir de 0) ; absent : ligne à plat",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"minimum": 0
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"isText": {
"description": "Ligne de texte (#973) : libellé seul, sans produit ; prix 0, quantité 1, aucun cycle, hors de tout total",
"type": "boolean"
},
"amountsByCycle": {
"description": "#968 : montant HT de la ligne par cycle couvert, AVANT remise de ligne ({ cycleId: montant }) ; absent : PU × quantité à chaque cycle",
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
}
},
"required": [
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
},
"description": "#747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"isBundle": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"billingPlan": {
"description": "Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature.",
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
]
}
},
{
"type": "null"
}
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"expectedUpdatedAt": {
"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": "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))$"
}
],
"description": "updatedAt lu au GET - jeton de concurrence"
}
},
"required": [
"targetType",
"targetId",
"cycleIds",
"lines",
"expectedUpdatedAt"
],
"additionalProperties": false
}Réponses
200 : Devis recomposé
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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": "Recomposer un devis BROUILLON (jeton expectedUpdatedAt requis)",
"description": "Remplace la composition (lignes, cycles, cible, remise) - brouillon uniquement, mêmes règles que le builder UI. Hors brouillon : 409.",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"options": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"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"
}
]
},
"productPriceId": {
"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)$"
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"exclusiveMinimum": 0
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"label": {
"type": "string",
"minLength": 1
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"amountsByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
},
"cycleIds": {
"minItems": 1,
"type": "array",
"items": {
"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)$"
}
}
},
"required": [
"productId",
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
}
},
"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)$"
},
"cycleIds": {
"type": "array",
"items": {
"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": "Cycles couverts - vide seulement avec serviceOn (devis ponctuel, T-1412)"
},
"serviceOn": {
"description": "Date de prestation d'un devis PONCTUEL (T-1412) ; null ou absent : devis par cycle",
"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"
}
]
},
"currency": {
"description": "Devise du devis (T-1404, ADR-184) : EUR, ou une devise activée par l'organisation ; absent : EUR à la création, inchangée à l'édition",
"type": "string",
"enum": [
"EUR",
"USD",
"GBP",
"CHF"
]
},
"fxRate": {
"description": "Taux saisi à la main, « 1 EUR = fxRate devise » ; absent : taux BCE du jour figé à la création",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 999999
},
"subject": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
]
},
{
"type": "null"
}
]
},
"indexPercent": {
"description": "#968 : indexation de N % par cycle appliquée aux montants, tracée dans le fil du devis",
"type": "number",
"minimum": 0,
"maximum": 100
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"description": "null/absent = ligne libre (label requis)",
"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"
}
]
},
"productPriceId": {
"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)$"
},
"sectionIndex": {
"description": "Index de la section dans sections (à partir de 0) ; absent : ligne à plat",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "number",
"minimum": 0
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"isText": {
"description": "Ligne de texte (#973) : libellé seul, sans produit ; prix 0, quantité 1, aucun cycle, hors de tout total",
"type": "boolean"
},
"amountsByCycle": {
"description": "#968 : montant HT de la ligne par cycle couvert, AVANT remise de ligne ({ cycleId: montant }) ; absent : PU × quantité à chaque cycle",
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "number",
"minimum": 0
}
}
},
"required": [
"businessUnitId",
"unitPrice",
"quantity"
],
"additionalProperties": false
},
"description": "#747 : vide permis - le brouillon est « Non chiffré » (priced = false) et ne s'envoie ni ne se signe tant qu'aucune ligne chiffrée n'existe"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"isBundle": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"billingPlan": {
"description": "Plan de facturation par cycle : pourcentages totalisant 100, décalage en jours depuis la signature ou le début du cycle. Aucune facture créée avant signature.",
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
]
}
},
{
"type": "null"
}
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"expectedUpdatedAt": {
"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": "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))$"
}
],
"description": "updatedAt lu au GET - jeton de concurrence"
}
},
"required": [
"targetType",
"targetId",
"cycleIds",
"lines",
"expectedUpdatedAt"
],
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Devis recomposé",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/transition#
Changer le statut - machine à états stricte
Transitions permises : draft→sent, sent→negotiation|signed, negotiation→signed|refused. signed et refused sont terminaux. Une transition illégale répond 422 en nommant les transitions permises. Le passage à signed génère l'échéancier et notifie le commercial (règles UI).
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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
to | string | Oui | Valeurs : sent, negotiation, signed, refused |
lossReason | string | Non | |
lossComment | string | Non | |
lostToCompanyId | union | Non |
Schéma complet du corps
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"to": {
"type": "string",
"enum": [
"sent",
"negotiation",
"signed",
"refused"
]
},
"lossReason": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"lossComment": {
"type": "string",
"maxLength": 500
},
"lostToCompanyId": {
"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": [
"to"
],
"additionalProperties": false
}Réponses
200 : Devis après transition
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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": "Changer le statut - machine à états stricte",
"description": "Transitions permises : draft→sent, sent→negotiation|signed, negotiation→signed|refused. signed et refused sont terminaux. Une transition illégale répond 422 en nommant les transitions permises. Le passage à signed génère l'échéancier et notifie le commercial (règles UI).",
"tags": [
"Devis"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"to": {
"type": "string",
"enum": [
"sent",
"negotiation",
"signed",
"refused"
]
},
"lossReason": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"lossComment": {
"type": "string",
"maxLength": 500
},
"lostToCompanyId": {
"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": [
"to"
],
"additionalProperties": false
}
}
}
},
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Devis après transition",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/alternatives#
Proposer une alternative (formule A ou B pour la même vente)
Même geste que la fiche (#753, ADR-225) : un brouillon copié du devis, numéro neuf, dans le groupe d'alternatives du devis. Au premier geste, le devis devient la référence du pipeline ; l'alternative ne l'est jamais d'office. Un groupe ouvert compte une fois (sa référence) dans le pipeline et les indicateurs. Devis clos ou groupe déjà signé : 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é.
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : L'alternative créée (brouillon), avec son groupe
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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 une alternative (formule A ou B pour la même vente)",
"description": "Même geste que la fiche (#753, ADR-225) : un brouillon copié du devis, numéro neuf, dans le groupe d'alternatives du devis. Au premier geste, le devis devient la référence du pipeline ; l'alternative ne l'est jamais d'office. Un groupe ouvert compte une fois (sa référence) dans le pipeline et les indicateurs. Devis clos ou groupe déjà signé : 409.",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "L'alternative créée (brouillon), avec son groupe",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/alternative-reference#
Désigner le devis comme référence du pipeline dans son groupe d'alternatives
Geste explicite du commercial, tracé dans le fil des deux devis (ADR-225 D4). Seule une proposition ouverte d'un groupe sans membre signé devient la référence ; après le refus de la référence, c'est le geste qui rend la vente au pipeline. Devis hors groupe, clos ou groupe signé : 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é.
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : Le devis, désormais référence
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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ésigner le devis comme référence du pipeline dans son groupe d'alternatives",
"description": "Geste explicite du commercial, tracé dans le fil des deux devis (ADR-225 D4). Seule une proposition ouverte d'un groupe sans membre signé devient la référence ; après le refus de la référence, c'est le geste qui rend la vente au pipeline. Devis hors groupe, clos ou groupe signé : 409.",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Le devis, désormais référence",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/alternative-leave#
Retirer le devis de son groupe d'alternatives (le client achète les deux)
Le devis redevient une vente indépendante, comptée pour elle-même (ADR-225 D6). La référence ne sort pas tant que d'autres membres restent (en désigner une autre d'abord) ; un membre signé ne sort pas. Refus : 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é.
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : Le devis, hors groupe
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"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 le devis de son groupe d'alternatives (le client achète les deux)",
"description": "Le devis redevient une vente indépendante, comptée pour elle-même (ADR-225 D6). La référence ne sort pas tant que d'autres membres restent (en désigner une autre d'abord) ; un membre signé ne sort pas. Refus : 409.",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Le devis, hors groupe",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tags": {
"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)$"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"enum": [
"brand",
"comp",
"blend",
"muted",
"deep"
]
}
},
"required": [
"id",
"name",
"color"
],
"additionalProperties": false
}
},
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"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)$"
},
"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)$"
},
"lostToCompanyId": {
"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"
}
]
},
"expectedSignOn": {
"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"
}
]
},
"forecastConfidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"forecastComment": {
"type": [
"string",
"null"
]
},
"subject": {
"type": [
"string",
"null"
]
},
"commitment": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Engagement pluriannuel - nombre de cycles couverts"
},
"priced": {
"type": "boolean",
"description": "#747 : faux = « Non chiffré », aucune ligne chiffrée (hors lignes de texte) ; les montants valent alors 0 et ne sont pas un vrai zéro"
},
"serviceOn": {
"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"
}
],
"description": "Date de prestation d'un devis ponctuel (T-1412) - null : devis par cycle"
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Devise du document, ISO 4217 (T-1404, ADR-184) - EUR par défaut"
},
"fxRate": {
"description": "Taux BCE figé, « 1 EUR = fxRate devise » - null en euros",
"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"
}
],
"description": "Jour de publication du taux figé - null en euros"
},
"totalExclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du HT au taux figé"
},
"totalInclTaxEur": {
"type": "string",
"description": "Contre-valeur en euros du TTC au taux figé"
},
"createdOn": {
"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])))$"
},
"sentOn": {
"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"
}
]
},
"signedOn": {
"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"
}
]
},
"validUntil": {
"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"
}
],
"description": "Date de validité de l'offre (E183 #511) - null : sans échéance"
},
"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)"
},
"portalViewedAt": {
"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": "#758 : première consultation au portail par un contact du client ; null : jamais ouvert"
},
"portalLastViewedAt": {
"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": "#758 : dernière consultation au portail"
},
"portalViewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "#758 : nombre de consultations au portail (fiche et PDF)"
},
"alternativeGroupId": {
"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": "#753 : groupe d'alternatives (propositions simultanées pour une même vente) ; null : vente seule"
},
"alternativeReference": {
"type": "boolean",
"description": "#753 : proposition qui compte au pipeline dans son groupe (une par groupe, choisie par le commercial)"
},
"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)"
},
"options": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"productPriceId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"vatRate": {
"type": [
"string",
"null"
]
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"totalInclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"label",
"productId",
"productPriceId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"vatRate",
"priceSource",
"totalExclTax",
"totalInclTax",
"exclByCycle"
],
"additionalProperties": false
}
},
"forecastHistory": {
"maxItems": 100,
"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)$"
},
"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)$"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedSignOn": {
"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"
}
]
},
"confidence": {
"anyOf": [
{
"type": "string",
"enum": [
"possible",
"probable",
"quasi_certain"
]
},
{
"type": "null"
}
]
},
"comment": {
"type": [
"string",
"null"
]
},
"totalExclTax": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"recordedAt": {
"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))$"
},
"actorName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"quoteId",
"version",
"expectedSignOn",
"confidence",
"comment",
"totalExclTax",
"status",
"recordedAt",
"actorName"
],
"additionalProperties": false
},
"description": "Les 100 dernières photographies internes de la lignée, de la plus récente à la plus ancienne"
},
"targetName": {
"description": "Nom de la cible (société ou contact) - T-687bis",
"type": [
"string",
"null"
]
},
"subtotalExclTax": {
"type": "string"
},
"discountAmount": {
"type": "string"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"amount"
]
},
"value": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "string"
},
"exclTax": {
"type": "string"
},
"vat": {
"type": "string"
}
},
"required": [
"rate",
"exclTax",
"vat"
],
"additionalProperties": {}
}
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"lines": {
"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)$"
},
"label": {
"type": "string"
},
"productId": {
"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"
}
]
},
"sectionId": {
"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"
}
]
},
"businessUnitId": {
"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)$"
},
"unitPrice": {
"type": "string"
},
"quantity": {
"type": "number"
},
"cycleIds": {
"type": "array",
"items": {
"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)$"
}
},
"discountPercent": {
"type": "string"
},
"priceSource": {
"type": "string",
"enum": [
"list",
"negotiated",
"rule",
"manual"
]
},
"totalExclTax": {
"type": "string"
},
"exclByCycle": {
"type": "object",
"propertyNames": {
"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)$"
},
"additionalProperties": {
"type": "string"
}
},
"isText": {
"type": "boolean",
"description": "Ligne de texte (#973) : libellé seul, hors de tout total"
}
},
"required": [
"id",
"label",
"productId",
"sectionId",
"businessUnitId",
"unitPrice",
"quantity",
"cycleIds",
"discountPercent",
"priceSource",
"totalExclTax",
"exclByCycle",
"isText"
],
"additionalProperties": false
}
},
"billingPlan": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"percentage": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
},
"offsetDays": {
"type": "integer",
"minimum": -3650,
"maximum": 3650
},
"anchor": {
"type": "string",
"enum": [
"signature",
"cycle_start"
]
}
},
"required": [
"label",
"percentage",
"offsetDays"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"sections": {
"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)$"
},
"label": {
"type": "string"
},
"isBundle": {
"type": "boolean"
},
"subtotalExclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"isBundle",
"subtotalExclTax"
],
"additionalProperties": false
}
},
"cycles": {
"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)$"
},
"label": {
"type": "string"
},
"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])))$"
},
"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])))$"
},
"exclTax": {
"type": "string"
},
"inclTax": {
"type": "string"
}
},
"required": [
"id",
"label",
"startsOn",
"endsOn",
"exclTax",
"inclTax"
],
"additionalProperties": false
}
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"installmentId": {
"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"
}
]
},
"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": "string"
},
"status": {
"type": "string",
"enum": [
"provisional",
"to_invoice",
"invoiced",
"paid",
"late",
"cancelled"
]
},
"label": {
"type": [
"string",
"null"
]
},
"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"
}
]
},
"invoiceNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"installmentId",
"cycleId",
"cycleLabel",
"dueOn",
"amountInclTax",
"status",
"label",
"invoiceId",
"invoiceNumber"
],
"additionalProperties": false
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contactId": {
"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)$"
},
"role": {
"type": "string",
"enum": [
"principal",
"operational",
"billing",
"other"
]
}
},
"required": [
"contactId",
"role"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sales_alert",
"late_invoices",
"contract_terminated",
"contract_notice"
]
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"additionalProperties": false
},
"description": "#971 : faits de la société à connaître avant d'envoyer (alerte commerciale, factures en retard, contrat résilié ou en préavis) ; vide si rien ou devis clos"
},
"alternatives": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"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)$"
},
"members": {
"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"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"totalExclTax": {
"type": "string"
},
"reference": {
"type": "boolean",
"description": "Référence du pipeline : seule proposition comptée tant qu'aucune n'est signée"
},
"retained": {
"description": "null : aucune signée ; true : la proposition signée ; false : non retenue, plus acceptable",
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"number",
"version",
"status",
"totalExclTax",
"reference",
"retained"
],
"additionalProperties": false
}
}
},
"required": [
"groupId",
"members"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "#753 : le groupe d'alternatives du devis ; null : vente seule"
}
},
"required": [
"tags",
"id",
"number",
"version",
"status",
"targetType",
"targetId",
"ownerId",
"lostToCompanyId",
"expectedSignOn",
"forecastConfidence",
"forecastComment",
"subject",
"commitment",
"priced",
"serviceOn",
"totalExclTax",
"totalInclTax",
"currency",
"fxRate",
"fxRateDate",
"totalExclTaxEur",
"totalInclTaxEur",
"createdOn",
"sentOn",
"signedOn",
"validUntil",
"updatedAt",
"statusChangedAt",
"portalViewedAt",
"portalLastViewedAt",
"portalViewCount",
"alternativeGroupId",
"alternativeReference",
"options",
"forecastHistory",
"targetName",
"subtotalExclTax",
"discountAmount",
"discount",
"vatBreakdown",
"customFields",
"lines",
"billingPlan",
"sections",
"cycles",
"schedule",
"contacts",
"warnings",
"alternatives"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}GET /quotes/{id}/pdf#
PDF du devis (si PDF_RENDERER=chromium est actif - 404 sinon)
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 : Document PDF (application/pdf, attachment)
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": "PDF du devis (si PDF_RENDERER=chromium est actif - 404 sinon)",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:read"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Document PDF (application/pdf, attachment)"
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}POST /quotes/{id}/approval-request#
Demander l’accord d’un devis
Personne authentifiée et droit de modification requis ; les comptes techniques sont refusés. Le même dossier est rendu au rejeu si les faits et règles restent identiques. Aucun accord, signature ou envoi du devis : la décision reste humaine à l’écran.
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 : Dossier d’accord créé ou déjà en cours.
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"const": true
},
"caseId": {
"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)$"
}
},
"required": [
"ok",
"caseId"
],
"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": "Demander l’accord d’un devis",
"description": "Personne authentifiée et droit de modification requis ; les comptes techniques sont refusés. Le même dossier est rendu au rejeu si les faits et règles restent identiques. Aucun accord, signature ou envoi du devis : la décision reste humaine à l’écran.",
"tags": [
"Devis"
],
"security": [
{
"oauth2": [
"quotes:write"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Dossier d’accord créé ou déjà en cours.",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"const": true
},
"caseId": {
"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)$"
}
},
"required": [
"ok",
"caseId"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}GET /quotes/variations#
Explique la variation de l'encours entre deux instants (#749)
Une ligne par lignée, montants HT en centimes. Une sortie devenue invisible ne livre ni identifiant, ni état final. Les activités nécessitent leur propre droit de lecture. Période inversée ou future : 422. Avant la collecte : bridge null.
Scopes d'app : quotes:read. Les autres droits, périmètres et contrôles métier restent applicables.
Paramètres
| Nom | Emplacement | Requis | Schéma |
|---|---|---|---|
from | query | Oui | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)))$"} |
to | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)))$"} |
ownerId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"} |
businessUnitId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"} |
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : Comparaison datée et réconciliation
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"from": {
"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))$"
},
"to": {
"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))$"
},
"since": {
"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"
}
]
},
"unavailableReason": {
"anyOf": [
{
"type": "string",
"enum": [
"history",
"visibility"
]
},
{
"type": "null"
}
]
},
"bridge": {
"anyOf": [
{
"type": "object",
"properties": {
"before": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"after": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"delta": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"movements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rootId": {
"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"
}
]
},
"quoteId": {
"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"
}
]
},
"kind": {
"type": "string",
"enum": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
},
"before": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"after": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"delta": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"postponed": {
"type": "boolean"
},
"reassigned": {
"type": "boolean"
},
"previousDate": {
"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"
}
]
},
"expectedDate": {
"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"
}
]
},
"previousOwnerId": {
"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": {
"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"
}
]
},
"number": {
"type": [
"string",
"null"
]
},
"ownerName": {
"type": [
"string",
"null"
]
},
"previousOwnerName": {
"type": [
"string",
"null"
]
},
"nextActivity": {
"anyOf": [
{
"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)$"
},
"title": {
"type": "string"
},
"at": {
"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"
}
]
}
},
"required": [
"id",
"title",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"rootId",
"quoteId",
"kind",
"before",
"after",
"delta",
"postponed",
"reassigned",
"previousDate",
"expectedDate",
"previousOwnerId",
"ownerId",
"number",
"ownerName",
"previousOwnerName",
"nextActivity"
],
"additionalProperties": false
}
},
"categories": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
},
"additionalProperties": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
}
},
"required": [
"count",
"cents"
],
"additionalProperties": false
},
"required": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
}
},
"required": [
"before",
"after",
"delta",
"movements",
"categories"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Null avant le début de collecte, jamais un zéro reconstitué"
}
},
"required": [
"from",
"to",
"since",
"unavailableReason",
"bridge"
],
"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": "Explique la variation de l'encours entre deux instants (#749)",
"description": "Une ligne par lignée, montants HT en centimes. Une sortie devenue invisible ne livre ni identifiant, ni état final. Les activités nécessitent leur propre droit de lecture. Période inversée ou future : 422. Avant la collecte : bridge null.",
"tags": [
"Devis"
],
"parameters": [
{
"name": "from",
"in": "query",
"required": true,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)))$"
}
},
{
"name": "to",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)))$"
}
},
{
"name": "ownerId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)$"
}
},
{
"name": "businessUnitId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)$"
}
}
],
"security": [
{
"oauth2": [
"quotes:read"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Comparaison datée et réconciliation",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"from": {
"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))$"
},
"to": {
"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))$"
},
"since": {
"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"
}
]
},
"unavailableReason": {
"anyOf": [
{
"type": "string",
"enum": [
"history",
"visibility"
]
},
{
"type": "null"
}
]
},
"bridge": {
"anyOf": [
{
"type": "object",
"properties": {
"before": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"after": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"delta": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"movements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rootId": {
"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"
}
]
},
"quoteId": {
"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"
}
]
},
"kind": {
"type": "string",
"enum": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
},
"before": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"after": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"delta": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
},
"postponed": {
"type": "boolean"
},
"reassigned": {
"type": "boolean"
},
"previousDate": {
"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"
}
]
},
"expectedDate": {
"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"
}
]
},
"previousOwnerId": {
"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": {
"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"
}
]
},
"number": {
"type": [
"string",
"null"
]
},
"ownerName": {
"type": [
"string",
"null"
]
},
"previousOwnerName": {
"type": [
"string",
"null"
]
},
"nextActivity": {
"anyOf": [
{
"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)$"
},
"title": {
"type": "string"
},
"at": {
"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"
}
]
}
},
"required": [
"id",
"title",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"rootId",
"quoteId",
"kind",
"before",
"after",
"delta",
"postponed",
"reassigned",
"previousDate",
"expectedDate",
"previousOwnerId",
"ownerId",
"number",
"ownerName",
"previousOwnerName",
"nextActivity"
],
"additionalProperties": false
}
},
"categories": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
},
"additionalProperties": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Montant HT en centimes, sans pondération"
}
},
"required": [
"count",
"cents"
],
"additionalProperties": false
},
"required": [
"new",
"increase",
"decrease",
"won",
"lost",
"entered",
"exited",
"postponed",
"reassigned"
]
}
},
"required": [
"before",
"after",
"delta",
"movements",
"categories"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Null avant le début de collecte, jamais un zéro reconstitué"
}
},
"required": [
"from",
"to",
"since",
"unavailableReason",
"bridge"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}GET /quotes/cohort#
Conversions d’une cohorte de propositions envoyées
Une vente par versions et alternatives, premier envoi attesté dans la période, situation à measuredAt. Le dénominateur comprend les ventes ouvertes. Historique insuffisant dans incomplete, hors taux et délais. Les filtres commercial, entité et famille portent sur les attributs actuels. Même visibilité que l’écran ; aucune donnée écrite.
Scopes d'app : quotes:read. Les autres droits, périmètres et contrôles métier restent applicables.
Paramètres
| Nom | Emplacement | Requis | Schéma |
|---|---|---|---|
from | query | Oui | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)))$"} |
to | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)))$"} |
ownerId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"} |
businessUnitId | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"} |
family | query | Non | {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","minLength":1,"maxLength":200} |
Aucun corps de requête déclaré dans ce contrat.
Réponses
200 : Cohorte et détail réconciliés
Contenu de la réponse 200
{
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"measuredAt": {
"type": "string"
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"refused": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"open": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signatureRate": {
"type": [
"number",
"null"
]
},
"medianSignatureDays": {
"type": [
"number",
"null"
]
},
"datedSignatures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"families": {
"type": "array",
"items": {
"type": "string"
}
},
"reasons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"reason": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"reason",
"count"
],
"additionalProperties": false
}
},
"incomplete": {
"type": "array",
"items": {
"type": "object",
"properties": {
"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)$"
},
"number": {
"type": "string"
}
},
"required": [
"quoteId",
"number"
],
"additionalProperties": false
}
},
"rows": {
"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)$"
},
"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)$"
},
"number": {
"type": "string"
},
"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)$"
},
"ownerName": {
"type": "string"
},
"unitIds": {
"type": "array",
"items": {
"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)$"
}
},
"families": {
"type": "array",
"items": {
"type": "string"
}
},
"versions": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"alternatives": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outcome": {
"type": "string",
"enum": [
"signed",
"refused",
"open"
]
},
"sentAt": {
"type": "string"
},
"signedAt": {
"type": [
"string",
"null"
]
},
"signatureDays": {
"type": [
"number",
"null"
]
},
"reason": {
"type": [
"string",
"null"
]
},
"stages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"from": {
"type": "string"
},
"to": {
"type": [
"string",
"null"
]
},
"days": {
"type": [
"number",
"null"
]
}
},
"required": [
"status",
"from",
"to",
"days"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"quoteId",
"number",
"ownerId",
"ownerName",
"unitIds",
"families",
"versions",
"alternatives",
"outcome",
"sentAt",
"signedAt",
"signatureDays",
"reason",
"stages"
],
"additionalProperties": false
}
}
},
"required": [
"from",
"to",
"measuredAt",
"total",
"signed",
"refused",
"open",
"signatureRate",
"medianSignatureDays",
"datedSignatures",
"families",
"reasons",
"incomplete",
"rows"
],
"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": "Conversions d’une cohorte de propositions envoyées",
"description": "Une vente par versions et alternatives, premier envoi attesté dans la période, situation à measuredAt. Le dénominateur comprend les ventes ouvertes. Historique insuffisant dans incomplete, hors taux et délais. Les filtres commercial, entité et famille portent sur les attributs actuels. Même visibilité que l’écran ; aucune donnée écrite.",
"tags": [
"Ventes"
],
"parameters": [
{
"name": "from",
"in": "query",
"required": true,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)))$"
}
},
{
"name": "to",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)))$"
}
},
{
"name": "ownerId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)$"
}
},
{
"name": "businessUnitId",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"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)$"
}
},
{
"name": "family",
"in": "query",
"required": false,
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
],
"security": [
{
"oauth2": [
"quotes:read"
]
},
{
"userSession": []
}
],
"responses": {
"200": {
"description": "Cohorte et détail réconciliés",
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"measuredAt": {
"type": "string"
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"refused": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"open": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signatureRate": {
"type": [
"number",
"null"
]
},
"medianSignatureDays": {
"type": [
"number",
"null"
]
},
"datedSignatures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"families": {
"type": "array",
"items": {
"type": "string"
}
},
"reasons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"reason": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"reason",
"count"
],
"additionalProperties": false
}
},
"incomplete": {
"type": "array",
"items": {
"type": "object",
"properties": {
"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)$"
},
"number": {
"type": "string"
}
},
"required": [
"quoteId",
"number"
],
"additionalProperties": false
}
},
"rows": {
"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)$"
},
"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)$"
},
"number": {
"type": "string"
},
"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)$"
},
"ownerName": {
"type": "string"
},
"unitIds": {
"type": "array",
"items": {
"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)$"
}
},
"families": {
"type": "array",
"items": {
"type": "string"
}
},
"versions": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"alternatives": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outcome": {
"type": "string",
"enum": [
"signed",
"refused",
"open"
]
},
"sentAt": {
"type": "string"
},
"signedAt": {
"type": [
"string",
"null"
]
},
"signatureDays": {
"type": [
"number",
"null"
]
},
"reason": {
"type": [
"string",
"null"
]
},
"stages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"draft",
"sent",
"negotiation",
"signed",
"refused"
]
},
"from": {
"type": "string"
},
"to": {
"type": [
"string",
"null"
]
},
"days": {
"type": [
"number",
"null"
]
}
},
"required": [
"status",
"from",
"to",
"days"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"quoteId",
"number",
"ownerId",
"ownerName",
"unitIds",
"families",
"versions",
"alternatives",
"outcome",
"sentAt",
"signedAt",
"signatureDays",
"reason",
"stages"
],
"additionalProperties": false
}
}
},
"required": [
"from",
"to",
"measuredAt",
"total",
"signed",
"refused",
"open",
"signatureRate",
"medianSignatureDays",
"datedSignatures",
"families",
"reasons",
"incomplete",
"rows"
],
"additionalProperties": false
}
}
}
},
"default": {
"description": "Erreur - enveloppe problem+json (RFC 9457)",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}PUT /quotes/{id}/external-refs/{source}#
Poser l'identifiant d'une source sur un devis (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
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
externalId | string | Oui | |
sourceUpdatedAt | union | Non | Derniè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 devis (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": [
"Devis"
],
"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 /quotes/{id}/external-refs/{source}#
Retirer l'identifiant d'une source sur un devis
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 devis",
"tags": [
"Devis"
],
"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"
}
}
}
}
}
}