Referral Coupon Management
Was this helpful?
Was this helpful?
Retrieves the referral coupon of a given customer in the database.
When the existing customer shares the referral code with a potential customer, the referred customer can benefit from the discount in a form of a fixed monetary amount.
The endpoint was previously available under the /coupon/ReferralCouponCode/{customerId}
path.
Customer number (ID) of customer
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
GET /coupon/{tenant}/referral-coupons/{customerNumber} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"allowAnonymous": true,
"code": "REF_30",
"deleted": false,
"description": "A referral Coupon",
"discountAbsolute": {
"amount": 8,
"currency": "USD"
},
"discountType": "ABSOLUTE",
"issuedTo": "61443563",
"referralCoupon": true,
"maxRedemptions": -1,
"maxRedemptionsPerCustomer": -1,
"name": "Empfehlungsgutschein John Doe (Emporix)",
"redemptionCount": 0,
"restrictions": {
"validFor": []
},
"status": "VALID"
}
Creates a referral coupon code for a specific customer in the database. If the coupon code exists, returns it without creating a new coupon.
Note: There can only be one referral coupon generated per customer.
When the existing customer shares the referral code with a potential customer, the referred customer can benefit from the discount in a form of a fixed monetary amount.
The endpoint was previously available under the /coupon/ReferralCouponCode/{customerId}
path.
Customer number (ID) of customer
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
POST /coupon/{tenant}/referral-coupons/{customerNumber} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"allowAnonymous": true,
"code": "REF_30",
"deleted": false,
"description": "A referral Coupon",
"discountAbsolute": {
"amount": 8,
"currency": "USD"
},
"discountType": "ABSOLUTE",
"issuedTo": "61443563",
"referralCoupon": true,
"maxRedemptions": -1,
"maxRedemptionsPerCustomer": -1,
"name": "Empfehlungsgutschein John Doe (Emporix)",
"redemptionCount": 0,
"restrictions": {
"validFor": []
},
"status": "VALID"
}