Referral code
Returns a signed-in shopper’s own refer-a-friend code, issuing it the first time, for an “invite a friend” page.
POST
https://api.duma-business.com/v1/store/referral-codecustomers:writeSecret key only
The customer must already exist (they have ordered or signed up): otherwise 404 customer_not_found.
409 referrals_unavailable when the programme is paused or not set up.
Request example
Example request
curl -X POST "https://api.duma-business.com/v1/store/referral-code" \
-H "Authorization: Bearer dk_sec_…" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Request body
JSON, sent with Content-Type: application/json.
emailstringRequired- The customer’s email. Lower-cased for you. Up to 255 characters.
Response
Response · 200
{
"data": {
"code": "AMELIA7K"
}
}