Create coupon
Create coupon for the offer (optionally activate)
Assigned coupon is displayed in app immediately if VisibleFrom is null, or after VisibleFrom datetime, if it is not null.
Coupon assignment can fail if selected campaign has TotalCoupons set and specified amount of coupons is already reached. If coupon was previously reserved and reservation did not expire, it is guaranteed that assignment will succeed too.
If coupon was reserved, it will not be possible to change any fields during assignment.
Authorizations
Opaque Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Body
The coupon to create.
Id of customer. Part of idempotency key
1 - 36Id of active or scheduled promotion campaign. Part of idempotency key
1 - 255Unique external identifier for coupon. Part of idempotency key.
1 - 100Final datetime, at which coupon can be picked up in store. If not provided, coupon is valid till the end of campaign. Once coupon is assigned or reserved, the field cannot be changed.
Datetime starting from which coupon will be displayed in the app. If not provided, coupon will be displayed immediately after coupon is assigned or when campaign becomes Active, whichever one of these dates is later.
StoreId optional override defines in which store assigned Coupon could only be used. It should be one from the set of stores/chains configured in Offer.
Name of the person or system that assigned the coupon.
Response
OK
Coupon details
ID of Promotion Campaign
1 - 255ID of Coupon
1 - 50Customer specific campaign type. Determines how or by which service campaign will be used. Types used so far: game, appCoupon, gift, preferredStore, memberOffer, stampCard, stickersCampaign.
1 - 255List of Store Ids where Promotion campaign is available. Mutually exclusive with ChainIds. Never null, but can be empty.
List of Chain Ids where Promotion campaign is available. Mutually exclusive with StoreIds. Never null, but can be empty.
Id of Coupon on POS. Can be the same as CouponId or different, depending on Coupon system used downstream. Null before coupon is activated, not null after the successful activation.
100Date when this coupon becomes visible and usable in store after activation
Date when this coupon expires and cannot be picked up in the store
Date when this coupon has been activated
Has this coupon been redeemed (collected in the store). Is true only coupon is redeemed to the limit
Specifies how many times coupon can be redeemed in store. Each redemption is a separate purchase. 0, or positive integer, with 0 meaning unlimited redemptions
Specifies how many times coupon was already redeemed in store. 0 when coupon was not redeemed, postive integer with count of usages otherwise.
Controlls the order in which coupons are returned to the mobile app. Lower number means higher priority
Date when this coupon has been deleted
Name of the person or system that assigned the coupon