Read the referral program
GET /program/referrals| Scope | program:read |
| Customer session token | Not accepted: call from your server with an API key |
| Rate limit class | read (limits) |
| Idempotency key | Not used |
| MCP tool | charm_get_referral_program |
The whole referral program in one object: the referral rule (both sides’ rewards and conditions as fields, keyed as GET /program/rule-types?kind=earning documents for type referral), the friend’s discount code and the referral code prefix.
Response 200
Section titled “Response 200”Returns ReferralProgram.
| Field | Type | Description |
|---|---|---|
revision | integer | The program revision; send it back as if_revision. |
enabled | boolean | Whether the referral program is on. Switched in the Charm admin only. |
earning_rule | EarningRule or null | (nullable) |
friend_discount | object | |
code_prefix | object |
{ "revision": 1, "enabled": true, "earning_rule": { "id": "id", "type": "earn", "enabled": true, "label": "Points per order", "points": 120, "points_per_currency": 120, "limit": 1, "title": "title", "title_translations": {}, "fields": {}, "summary": "summary" }, "friend_discount": { "enabled": true, "type": "percentage", "value": 1, "usage_limit": 1, "minimum_purchase": 1, "tier_overrides": {} }, "code_prefix": { "custom": false, "prefix": "prefix" }}Example
Section titled “Example”curl -X GET "https://charm.appfleece.app/api/v1/program/referrals" \ -H "Authorization: Bearer chrm_live_..."Errors
Section titled “Errors”unauthorized · invalid_token · insufficient_scope · access_required · validation_error · rate_limited
Every error body carries code, message, request_id and a doc_url pointing at the matching entry in the error catalog.