Rechercher dans la documentation

Saisissez au moins deux caractères.

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

update_company

Modifier une société

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

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.

ChampTypeObligatoireDescription
namestringNon
ownerIdunionNon
sectorunionNon
parentCompanyIdunionNon
siretnull,stringNon
vatNumberunionNon
websiteunionNon
linkedinnull,stringNon
xnull,stringNon
instagramnull,stringNon
billingAddressunionNon
customFieldsobjectNon
externalCodesobjectNon
relationsarrayNon#494 : natures de relation (clés de la liste d'organisation, GET /company-relations) ; remplace la liste, [] retire tout
paymentTermsunionNon
salesAlertunionNon#971 : alerte commerciale interne, dite en tête des devis de la société ; null l'efface
creditLimitCentsunionNon
paymentConditionunionNon
idstringOui
idempotency_keystringNonClé 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
}