Rechercher dans la documentation

Saisissez au moins deux caractères.

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

API : business-units

3 opérations REST du groupe business-units.

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

GET /business-units#

Entités de vente (référentiel)

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

Paramètres

NomEmplacementRequisSchéma
cursorqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Curseur opaque de la page précédente","type":"string"}
limitqueryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Taille de page - défaut 50, max 200 (clampé)","type":"integer","minimum":1,"maximum":9007199254740991}
updatedSincequeryNon{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"ISO 8601 - objets modifiés depuis (inclusif), le filtre des syncs incrémentales","type":"string"}

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

Réponses

200 : Page d'entités

Contenu de la réponse 200
{
  "application/json": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              },
              "shortName": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siret": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vatNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "iban": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "legalMentions": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "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))$"
              }
            },
            "required": [
              "id",
              "name",
              "shortName",
              "color",
              "address",
              "legalName",
              "siret",
              "vatNumber",
              "iban",
              "bic",
              "legalMentions",
              "updatedAt"
            ],
            "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": "Entités de vente (référentiel)",
  "tags": [
    "Référentiels"
  ],
  "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"
      }
    }
  ],
  "security": [
    {
      "oauth2": [
        "referentials:read"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Page d'entités",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "shortName": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "address": {
                      "type": "string"
                    },
                    "legalName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "siret": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "vatNumber": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "iban": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "bic": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "legalMentions": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "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))$"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "shortName",
                    "color",
                    "address",
                    "legalName",
                    "siret",
                    "vatNumber",
                    "iban",
                    "bic",
                    "legalMentions",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "data",
              "nextCursor"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /business-units/{id}#

Détail d'une entité

Scopes d'app : referentials: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 : Entité

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)$"
        },
        "name": {
          "type": "string"
        },
        "shortName": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "legalName": {
          "type": [
            "string",
            "null"
          ]
        },
        "siret": {
          "type": [
            "string",
            "null"
          ]
        },
        "vatNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "iban": {
          "type": [
            "string",
            "null"
          ]
        },
        "bic": {
          "type": [
            "string",
            "null"
          ]
        },
        "legalMentions": {
          "type": [
            "string",
            "null"
          ]
        },
        "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))$"
        }
      },
      "required": [
        "id",
        "name",
        "shortName",
        "color",
        "address",
        "legalName",
        "siret",
        "vatNumber",
        "iban",
        "bic",
        "legalMentions",
        "updatedAt"
      ],
      "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'une entité",
  "tags": [
    "Référentiels"
  ],
  "security": [
    {
      "oauth2": [
        "referentials:read"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Entité",
      "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)$"
              },
              "name": {
                "type": "string"
              },
              "shortName": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siret": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vatNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "iban": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "legalMentions": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "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))$"
              }
            },
            "required": [
              "id",
              "name",
              "shortName",
              "color",
              "address",
              "legalName",
              "siret",
              "vatNumber",
              "iban",
              "bic",
              "legalMentions",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PATCH /business-units/{id}#

Identité légale & bancaire d'une entité (T-302)

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

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

Corps de requête

application/json

ChampTypeObligatoireDescription
legalNameunionNon
siretunionNon
vatNumberunionNon
ibanunionNon
bicunionNon
legalMentionsunionNon
Schéma complet du corps
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "legalName": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 120
        }
      ]
    },
    "siret": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 60
        }
      ]
    },
    "vatNumber": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 60
        }
      ]
    },
    "iban": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 60
        }
      ]
    },
    "bic": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 60
        }
      ]
    },
    "legalMentions": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "maxLength": 2000
        }
      ]
    }
  },
  "additionalProperties": false
}

Réponses

200 : Entité modifiée

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)$"
        },
        "name": {
          "type": "string"
        },
        "shortName": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "legalName": {
          "type": [
            "string",
            "null"
          ]
        },
        "siret": {
          "type": [
            "string",
            "null"
          ]
        },
        "vatNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "iban": {
          "type": [
            "string",
            "null"
          ]
        },
        "bic": {
          "type": [
            "string",
            "null"
          ]
        },
        "legalMentions": {
          "type": [
            "string",
            "null"
          ]
        },
        "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))$"
        }
      },
      "required": [
        "id",
        "name",
        "shortName",
        "color",
        "address",
        "legalName",
        "siret",
        "vatNumber",
        "iban",
        "bic",
        "legalMentions",
        "updatedAt"
      ],
      "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": "Identité légale & bancaire d'une entité (T-302)",
  "tags": [
    "Référentiels"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "legalName": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 120
                }
              ]
            },
            "siret": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 60
                }
              ]
            },
            "vatNumber": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 60
                }
              ]
            },
            "iban": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 60
                }
              ]
            },
            "bic": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 60
                }
              ]
            },
            "legalMentions": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "maxLength": 2000
                }
              ]
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "referentials:write"
      ]
    },
    {
      "userSession": []
    }
  ],
  "responses": {
    "200": {
      "description": "Entité modifiée",
      "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)$"
              },
              "name": {
                "type": "string"
              },
              "shortName": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siret": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vatNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "iban": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "legalMentions": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "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))$"
              }
            },
            "required": [
              "id",
              "name",
              "shortName",
              "color",
              "address",
              "legalName",
              "siret",
              "vatNumber",
              "iban",
              "bic",
              "legalMentions",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "description": "Erreur - enveloppe problem+json (RFC 9457)",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}