Create redemption

Enables you to create a redemption record

SecurityAuthorizationToken
Request
header Parameters
required
object

Valid JSON object that must contain account, stage, date, and channel attributes. eg - {"stage":"prod","account":"5f328bf0b","date":"2020-12-12T08:00:00.000Z","channel":12}

Authorization
required
string

Authorization token or access token for the user, provided by fabric. It can be obtained after logging into fabric's copilot account.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Request Body schema: application/json
promoId
required
string

fabric database objectId of the promotion to redeem, received from promotion structure

promoCode
string or null

promoCode of the coupon that is redeemed, could be null if no promoCode available

userId
string or null

ID of the user who redeem the promotion, could be null if no user ID available

email
string

Email address of the user who redeem the promotion

orderId
required
string

Order ID of this purchase

Responses
200

OK

400

Bad Request

500

Internal Server Error

post/api-offers/redemption
Request samples
application/json
{
  • "promoId": "614b58924e92f6861ac91234",
  • "promoCode": "BESTSUMMER",
  • "userId": "614b58924e92f61234567890",
  • "email": "john.doe@gmail.com",
  • "orderId": "1590-2016-12345"
}
Response samples
application/json
{
  • "_id": "614b58924e92f6861ac9d43b",
  • "promoId": "614b58924e92f6861ac91234",
  • "promoCode": "BESTSUMMER",
  • "userId": "614b58924e92f61234567890",
  • "email": "guest@gmail.com",
  • "orderId": "1590-2016-12345",
  • "createdAt": "2020-12-14T12:15:43.646Z",
  • "updatedAt": "2021-12-14T12:15:43.646Z"
}