Referral Coupon Management
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.
- : Needed to read coupons.
- : Needed to manage coupons.
- : Needed to redeem coupons.
- : Needed to redeem coupons on behalf of another customer.
Customer number (ID) of customer.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
The referral coupon has been successfully retrieved.
No content if there is no referral coupon
Request syntactically incorrect. Details of the error are included in the response payload.
Example response
The requested resource does not exist.
Some server side error occurred.
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.
- : Needed to read coupons.
- : Needed to manage coupons.
- : Needed to redeem coupons.
- : Needed to redeem coupons on behalf of another customer.
Customer number (ID) of customer.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
The referral coupon code has been successfully retrieved.
Request syntactically incorrect. Details of the error are included in the response payload.
Example response
The requested resource does not exist.
Some server side error occurred.
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"
}Last updated
Was this helpful?

