curl --request POST \
--url https://api.fabric.inc/v3/coupons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"name": "Christmas 2022 coupons",
"startAt": "2022-08-24T14:15:22.000Z",
"endAt": "2019-08-25T14:15:22.000Z",
"type": "PRODUCT",
"buyOperator": "OR",
"isExclusive": true,
"couponCodes": [
"XMAS2022"
],
"details": [
{
"discounts": [
{
"unit": "PERCENTAGE_OFF",
"amount": 15,
"type": "SKU",
"values": "null",
"maximumQuantity": 2,
"includeOperator": "OR",
"excludeOperator": "AND",
"discountId": "1",
"isAutoAdd": false,
"sets": [
"A"
]
}
],
"targetProducts": [
{
"type": "SKU",
"values": "*",
"operator": "IN",
"discountId": "1"
}
],
"conditions": [
{
"id": "6380e7ecb419a30009865fad",
"operator": "AND",
"includeOperator": "OR",
"excludeOperator": "AND",
"conditions": [
{
"type": "SKU",
"values": "*",
"operator": "IN"
}
],
"set": "A"
}
]
}
],
"limits": [
{
"type": "SITE_WIDE",
"quantity": 30
}
],
"termsAndConditions": [
{
"name": "Terms Applied",
"description": "Items can'\''t be exchanged"
}
],
"promotionMessages": [
{
"title": "Buy 2 get 1 free",
"message": "Offer valid at participating stores through September 5, 2023.",
"pages": [
"PDP",
"Cart"
],
"locales": [
"en-CA",
"fr-CA"
]
}
],
"proximityMessages": {
"threshold": 1,
"localizedMessages": [
{
"locales": [
"en-CA"
],
"message": "Buy some more to get the discount!"
}
]
},
"shipmentMethodIds": [
"1000001"
],
"eligiblePriceLists": [
10000056
],
"additionalAttributes": [
{
"name": "eventName",
"values": "Store sale"
}
],
"note": "Independence day sale!",
"level": 3,
"stackingType": "STACKABLE",
"isStackable": false,
"isAlwaysApplied": false,
"singleMultiUse": "MULTI_USE"
}'