Update a referral code's label, campaign_ref or status.
The code string is immutable once issued — it is printed on physical media and embedded in live links — and an attempt to change it is rejected rather than silently ignored. There is deliberately no DELETE: a code is the attribution key for every redemption made against it and any commission owed, so status: INACTIVE stops new redemptions and preserves all history.
- Mock serverhttps://developers.ev.energy/_mock/ev.energy-api-v2/referral_codes/{referral_code_id}
- Live API for both production and sandbox requests.https://api.ev.energy/v2/referral_codes/{referral_code_id}
- Staging server for internal testing only.https://api-staging.ev.energy/v2/referral_codes/{referral_code_id}
curl -i -X PATCH \
https://developers.ev.energy/_mock/ev.energy-api-v2/referral_codes/prom01JZQ8V5T7MKXR9NBCDEFGHJ4A \
-H 'Accept-Language: string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'EvEnergy-Version: 2' \
-d '{
"label": "Summer forecourt",
"campaign_ref": "summer-forecourt",
"status": "INACTIVE"
}'The code was updated.
Unique identifier for the given referral code.
The public string a driver types. Immutable once issued.
Internal name for the owning organisation's UI. Never shown to drivers.
Free-text tag the owning organisation groups and reports on.
INACTIVE refuses new redemptions and preserves every historical redemption.
How many times the code may be redeemed.
{ "id": "prom01JZQ8V5T7MKXR9NBCDEFGHJ4A", "url": "https://api.ev.energy/v2/referral_codes/prom01JZQ8V5T7MKXR9NBCDEFGHJ4A", "code": "SPRING24", "label": "Forecourt poster - spring", "campaign_ref": "spring-forecourt", "status": "ACTIVE", "limitation": "UNLIMITED", "created_at": "2026-07-01T09:12:00Z", "performance": { "redeemed_count": 64, "qualified_count": 41, "in_progress_count": 23 } }