Only users with the ADMINISTRATOR scope in the current context can update hierarchy levels. Make sure your API token grants administrator privileges. See Understanding Scopes for more information.
Use the updateHierarchyLevel mutation to modify an existing hierarchy level. This mutation uses partial update (PATCH-like) semantics: only the fields you provide are updated; omitted fields remain unchanged. Access policy:
  • The API user context must have permission to update hierarchy levels.
  • A hierarchy level with the provided id must exist.
  • If parentId is provided and is not 0, a hierarchy level with this ID must exist.
The mutation accepts the following arguments:
ArgumentTypeDescriptionDefault
idIDRequired. ID of the hierarchy level to update.
hierarchyLevelObjectRequired. Fields to update, as described below.
ArgumentTypeDescription
labelStringUpdated display name of the hierarchy level.
parentIdIDNew parent hierarchy level ID. Set to 0 to move the level to the top level. Omit to keep it unchanged.
To keep the current parent, omit parentId. To move a level to the top, set parentId to 0.
mutation updateHierarchyLevel {
  updateHierarchyLevel(
    id: "27",
    hierarchyLevel: {
      label: "Regional Management"
    }
  ){
    errors
    response{
      id
      label
      parent {
        id
      }
    }
  }
}