Referral Coupon Management

Retrieving customer's referral coupon

get

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.

Authorizations
Path parameters
customerNumberstringRequired

Customer number (ID) of customer

tenantstring · min: 3 · max: 16Required

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Responses
200
The referral coupon has been successfully retrieved.
application/json
get
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"
}

Creating a referral coupon code for a given customer

post

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.

Authorizations
Path parameters
customerNumberstringRequired

Customer number (ID) of customer

tenantstring · min: 3 · max: 16Required

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Responses
200
The referral coupon code has been successfully retrieved.
application/json
post
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"
}

Was this helpful?