v1

latestSwagger 2.02026-08-045928532.7 MB
Campaigns

post/api/v1.0/{appId}/campaigns/loyalty

Path parameters

appIdstring required

Request body

OrdersBeforeReceivingVoucherinteger

Number of orders customer needs to make, before receiving voucher

PercentDiscountAmountinteger nullable

Discount amount in percents

MaxDiscountnumber double nullable

Maximum discount for percentage discounts

RoundingStrategyinteger nullable

Controls how the loyalty voucher's amount is rounded

ShouldIncludeOrdersWithLoyaltyVoucherboolean nullable

Controls whether we should include orders with loyalty vouchers in the campaign calculation

VoucherValidPeriodDaysinteger

Number of days for which the voucher will be valid.

IncludeDeliveryFeeboolean

Discount will include delivery fee

AutoApplyResultingVouchersboolean

Automatically apply resulting vouchers

IncludeExistingOrdersboolean

Campaign will apply to existing orders

IsEnabledboolean

Is campaign enabled

StoreIdsinteger[]

Ids of stores this campaign applies to

AppIdstring

The app that this campaign belongs to.

ForceDiscountboolean

Controls whether the voucher generated from this campaign will override discount exclusions

Response

OK

Example response

{
  "Data": {
    "PublicId": "00000000-0000-0000-0000-000000000000"
  }
}