Create promotion

Enables you to create a promotion

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
title
required
string [ 3 .. 120 ] characters

Promotion title

buyOperator
string
Default: "OR"

It is used to define operator between different Buy conditions (different conditions as mentioned in the condition object)

Enum: "AND" "OR"
required
Array of objects
startDate
required
string <date-time>

Start date of the promotion

endDate
required
string <date-time>

End date of the promotion

isExclusive
required
boolean

true: it is exclusively a promotion, and coupon cannot be applied on the promotion
false: coupon can be stacked on the promotion

type
required
string

Promotion type.
Product: SKU promotion. Promotion or discount on SKUs based on the value mentioned in discount object
CART: Cart promotion. Promotion or discount on minimum order amount of cart based on the ORDER_VALUE that is set in condition object
QUANTITY: Quantity promotion provides discounts on items based on the quantity requirement set in the promotion
BOGO: Buy One Get One promotion provides discounts based on the Buy conditions and Get discounts
SHIPPING: Shipping promotion provides discounts on the shipping cost
BUYGET: BuyGet promotion specifies the Buy conditions and Get discounts
SPEND_GET: SpendGet promotion can specify the requirement of cart order value and the corresponding Get discounts

Enum: "PRODUCT" "CART" "QUANTITY" "BOGO" "SHIPPING" "BUYGET" "SPEND_GET"
Array of objects (termsAndConditions)
shipmentMethodIds
Array of strings

Required for Shipping type promo to provide eligible shipment Method IDs

eligiblePriceList
Array of numbers

IDs of the price lists to which this promotion is applied

Array of objects

Array of limits for the promotion to be applied

note
string

Promotion note or description

Responses
200

OK

400

Bad request

500

Internal Server Error

post/api-offers/promo/create
Request samples
application/json
{
  • "title": "CREATE PROMO",
  • "buyOperator": "OR",
  • "promo": [
    ],
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-25T14:15:22Z",
  • "isExclusive": true,
  • "type": "PRODUCT",
  • "termsAndConditions": [
    ],
  • "shipmentMethodIds": [
    ],
  • "eligiblePriceList": [
    ],
  • "limits": [
    ],
  • "note": "Independence day sale!"
}
Response samples
application/json
{
  • "_id": "abcdefg1ee7ce20123456789",
  • "promoId": 100013,
  • "promoCodes": [ ],
  • "state": "SCHEDULED",
  • "isImplicit": true,
  • "title": "CREATE PROMO",
  • "buyOperator": "OR",
  • "promo": [
    ],
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-25T14:15:22Z",
  • "isExclusive": true,
  • "type": "PRODUCT",
  • "termsAndConditions": [
    ],
  • "shipmentMethodIds": [
    ],
  • "eligiblePriceList": [
    ],
  • "limits": [
    ],
  • "note": "Independence day sale!",
  • "createdAt": "2019-08-20T14:15:22Z",
  • "updatedAt": "2019-08-20T14:15:22Z"
}