Skip to content

Read the referral program

GET /program/referrals
Scopeprogram:read
Customer session tokenNot accepted: call from your server with an API key
Rate limit classread (limits)
Idempotency keyNot used
MCP toolcharm_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.

Returns ReferralProgram.

FieldTypeDescription
revisionintegerThe program revision; send it back as if_revision.
enabledbooleanWhether the referral program is on. Switched in the Charm admin only.
earning_ruleEarningRule or null(nullable)
friend_discountobject
code_prefixobject
{
"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"
}
}
Terminal window
curl -X GET "https://charm.appfleece.app/api/v1/program/referrals" \
-H "Authorization: Bearer chrm_live_..."

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.