Delete a partner group
DELETE /program/affiliates/groups/{group_id}| Scope | program:write |
| Customer session token | Not accepted: call from your server with an API key |
| Rate limit class | write_shopify (limits) |
| Idempotency key | Required (idempotency) |
| MCP tool | charm_delete_affiliate_group |
Deletes a group; its partners fall back to the programme’s rates (their own overrides stay). The dry run says how many partners that is.
Parameters
Section titled “Parameters”| Name | In | Type | Description |
|---|---|---|---|
group_id | path | string | The group’s id. |
Request body
Section titled “Request body”| Field | Type | Description |
|---|---|---|
dry_run | boolean | (optional) |
Response 200
Section titled “Response 200”Returns AffiliateGroupWriteResult.
| Field | Type | Description |
|---|---|---|
dry_run | boolean | |
group | AffiliateGroup | |
members_detached | integer | Deleting: partners who fall back to the programme’s rates. (optional) |
partner_codes_sync_failed | boolean | (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}Example
Section titled “Example”curl -X DELETE "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 '{"dry_run":false}'Errors
Section titled “Errors”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.