Edit

[POST] .../v1/partnergroup/edit

Edits partner group. Use this method to rename a partner group or move it to another parent group without changing the partners that belong to it. The method validates id, parent_id, hierarchy safety and name length, then updates changed fields, writes an action log record, invalidates partner and partner-group caches, sends the PartnerGroupEdited webhook and returns row_affected. The request body is required; parent_id equal to id is rejected and moving a group under its own descendant is rejected by the persistent layer. The current request user must have partner group edit permission. Missing body, invalid id, invalid parent_id, recursive hierarchy changes, name length violations, denied access, no changed fields, missing rows, transaction failures and storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id Int64 Required Partner group ID.
name String Optional Group name.
parent_id Int64 Optional Parent group ID.

Request Example

{
  "id": 2,
  "parent_id": 0,
  "name": "Strategic suppliers"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}