Référence MCP
update_company
Modifier une société
Rôle#
Patch partiel - seuls les champs fournis changent, historique tracé.
Accès#
Scope principal : companies:write. Le scope ne remplace pas les gardes de visibilité, d'organisation, de module ni les scopes complémentaires des gestes composés.
Catalogue complet · Approbations
Paramètres#
Le schéma ci-dessous est produit par la fonction qui enregistre les outils, y compris idempotency_key lorsqu'elle s'applique. Consultez les objets imbriqués dans le schéma complet.
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
name | string | Non | |
ownerId | union | Non | |
sector | union | Non | |
parentCompanyId | union | Non | |
siret | null,string | Non | |
vatNumber | union | Non | |
website | union | Non | |
linkedin | null,string | Non | |
x | null,string | Non | |
instagram | null,string | Non | |
billingAddress | union | Non | |
customFields | object | Non | |
externalCodes | object | Non | |
relations | array | Non | #494 : natures de relation (clés de la liste d'organisation, GET /company-relations) ; remplace la liste, [] retire tout |
paymentTerms | union | Non | |
salesAlert | union | Non | #971 : alerte commerciale interne, dite en tête des devis de la société ; null l'efface |
creditLimitCents | union | Non | |
paymentCondition | union | Non | |
id | string | Oui | |
idempotency_key | string | Non | Clé d'idempotence (recommandée) : rejouer la MÊME mutation avec la même clé renvoie la réponse originale sans ré-exécuter - TTL 24 h |
Schéma JSON complet des paramètres
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 200
},
"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"
}
]
},
"sector": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 80
}
]
},
"parentCompanyId": {
"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"
}
]
},
"siret": {
"type": [
"null",
"string"
]
},
"vatNumber": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"website": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 200
}
]
},
"linkedin": {
"type": [
"null",
"string"
]
},
"x": {
"type": [
"null",
"string"
]
},
"instagram": {
"type": [
"null",
"string"
]
},
"billingAddress": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"externalCodes": {
"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": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[A-Za-z0-9._-]+$"
}
]
}
},
"relations": {
"description": "#494 : natures de relation (clés de la liste d'organisation, GET /company-relations) ; remplace la liste, [] retire tout",
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$"
}
},
"paymentTerms": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 120
}
]
},
"salesAlert": {
"description": "#971 : alerte commerciale interne, dite en tête des devis de la société ; null l'efface",
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"maxLength": 300
}
]
},
"creditLimitCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 2000000000,
"description": "Plafond d'encours TTC en centimes ; null = sans plafond (#978)"
},
{
"type": "null"
}
]
},
"paymentCondition": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"days",
"days_end_of_month",
"end_of_month_then_day"
]
},
"days": {
"type": "integer",
"minimum": 0,
"maximum": 365
},
"dayOfNextMonth": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 31
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"days",
"dayOfNextMonth"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"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)$"
},
"idempotency_key": {
"description": "Clé d'idempotence (recommandée) : rejouer la MÊME mutation avec la même clé renvoie la réponse originale sans ré-exécuter - TTL 24 h",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"id"
],
"additionalProperties": false
}