Redemptions

Create redemption

Creates a redemption for a specific coupon using the corresponding couponId value.

post/coupons/{couponId}/redemptions

Request

Path parameters

couponIdstring required
Example:614b58924e92f6861ac9d43b

A 24-character system-generated coupon ID generated using the create coupon endpoint.

Headers

x-fabric-tenant-idstring required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-idstring
Example:12

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-client-idstring

A unique identifier obtained from Copilot for the System app in the fabric ecosystem, essential for OpenID Connect authentication flows.

x-fabric-request-idstring
Example:263e731c-45c8-11ed-b878-0242ac120002

A unique request ID.

Request body

couponCodestring required

Coupon code to be redeemed

orderIdstring required

Purchase order ID associated with the coupon redemption

userIdstring nullable

ID of the user who redeems the coupon

emailstring nullable

Email address of the user who redeems the coupon

Example request

{
  "couponCode": "BESTSUMMER",
  "orderId": "1590-2016-12345-7897",
  "userId": "614b58924e92f61234567890",
  "email": "guest@example.com"
}

Response

Created

idstring required

A 24-character system-generated redemption ID.

couponIdstring required

A 24-character system-generated coupon ID generated using the create coupon endpoint.

couponCodestring required

Coupon code to redeem

orderIdstring required

Purchase order ID associated with the coupon redemption

userIdstring

ID of the user who redeems the coupon

emailstring nullable

Email address of the user who redeems the coupon

createdAtstring date-time

The timestamp in UTC format of when the coupon redemption was created.

updatedAtstring date-time

The timestamp in UTC format of when the coupon redemption was last updated.

Example response

{
  "id": "614b58924e92f6861ac9d43b",
  "couponId": "614b58924e92f6861ac91234",
  "couponCode": "BESTSUMMER",
  "orderId": "1590-2016-12345",
  "userId": "614b58924e92f61234567890",
  "email": "guest@example.com",
  "createdAt": "2020-12-14T12:15:43.646Z",
  "updatedAt": "2021-12-14T12:15:43.646Z"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.