Skip to content

Change a partner group

PATCH /program/affiliates/groups/{group_id}
Scopeprogram:write
Customer session tokenNot accepted: call from your server with an API key
Rate limit classwrite_shopify (limits)
Idempotency keyRequired (idempotency)
MCP toolcharm_update_affiliate_group

Changes a group’s name, rates or buyer discount; members’ live codes follow a new discount.

NameInTypeDescription
group_idpathstringThe group’s id.
FieldTypeDescription
namestring(optional)
commissionobject or nullThe group’s own rates; null = the programme’s. A null rate inherits that channel. (optional, nullable)
customer_discountobject or nullThe group’s buyer discount; null = the programme’s. (optional, nullable)
dry_runboolean(optional)

Returns AffiliateGroupWriteResult.

FieldTypeDescription
dry_runboolean
groupAffiliateGroup
members_detachedintegerDeleting: partners who fall back to the programme’s rates. (optional)
partner_codes_sync_failedboolean(optional)
{
"dry_run": false,
"group": {
"id": "id",
"name": "Gold",
"commission": {
"type": "percent",
"code_rate": 1,
"link_rate": 1
},
"customer_discount": {
"type": "percentage",
"value": 1
},
"member_count": 1
},
"members_detached": 1,
"partner_codes_sync_failed": false
}
Terminal window
curl -X PATCH "https://charm.appfleece.app/api/v1/program/affiliates/groups/<group_id>" \
-H "Authorization: Bearer chrm_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'

unauthorized · invalid_token · insufficient_scope · access_required · not_found · validation_error · rate_limited · idempotency_conflict · shopify_unavailable

Every error body carries code, message, request_id and a doc_url pointing at the matching entry in the error catalog.