Referrals
Add Referral Code Holders
Adds new holders to a referral code as referees. The data sent in the request is upserted into the customer data.
If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct.
To use this endpoint, you must have the following permissions:
- Create and modify Customers and Segments (customers.modify)
- Publish Voucher (vouchers.publish)
👍 To add a holder as a referrer, use the Create Publication endpoint.
📘 Alternative endpoint
This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
post/v1/referrals/members/{memberId}/holders
Request body
Response
Returns a list of redeemable holder objects.
Example response
{
"holders": [
{
"id": "rh_0e7b8db4700106a852",
"created_at": "2024-03-22T17:48:25.910Z",
"redeemable_id": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1",
"redeemable_object": "voucher",
"customer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
"holder_role": "OWNER",
"campaign_id": "camp_weer1c3p5ZgktqfW56RfoNaG",
"campaign_type": "REFERRAL_PROGRAM",
"voucher_type": "DISCOUNT_VOUCHER"
}
]
}