Flipdish · Schema

LoyaltyCampaign

Loyalty campaign

RestaurantOnline OrderingMobile AppsPoint of SaleOrdersMenuPaymentsWebhooks

Properties

Name Type Description
CampaignId integer Id of campaign
Statistics object
Stores array Stores this campaign applies to with campaign start time in Utc
PublicId string Permanent reference to the item.
OrdersBeforeReceivingVoucher integer Number of orders customer needs to make, before receiving voucher
PercentDiscountAmount integer Discount amount in percents
MaxDiscount number Maximum discount for percentage discounts
RoundingStrategy integer Controls how the loyalty voucher's amount is rounded
ShouldIncludeOrdersWithLoyaltyVoucher boolean Controls whether we should include orders with loyalty vouchers in the campaign calculation
VoucherValidPeriodDays integer Number of days for which the voucher will be valid.
IncludeDeliveryFee boolean Discount will include delivery fee
AutoApplyResultingVouchers boolean Automatically apply resulting vouchers
IncludeExistingOrders boolean Campaign will apply to existing orders
IsEnabled boolean Is campaign enabled
StoreIds array Ids of stores this campaign applies to
AppId string The app that this campaign belongs to.
ForceDiscount boolean Controls whether the voucher generated from this campaign will override discount exclusions
View JSON Schema on GitHub

JSON Schema

marketing-loyalty-campaign-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/flipdish/refs/heads/main/json-schema/marketing-loyalty-campaign-schema.json",
  "title": "LoyaltyCampaign",
  "description": "Loyalty campaign",
  "type": "object",
  "properties": {
    "CampaignId": {
      "format": "int32",
      "description": "Id of campaign",
      "type": "integer",
      "example": 500123
    },
    "Statistics": {
      "$ref": "#/components/schemas/CampaignStatistics"
    },
    "Stores": {
      "description": "Stores this campaign applies to with campaign start time in Utc",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StoreCampaignStartTime"
      },
      "example": []
    },
    "PublicId": {
      "format": "uuid",
      "description": "Permanent reference to the item.",
      "type": "string",
      "example": "00000000-0000-0000-0000-000000000000"
    },
    "OrdersBeforeReceivingVoucher": {
      "format": "int32",
      "description": "Number of orders customer needs to make, before receiving voucher",
      "type": "integer",
      "example": 1
    },
    "PercentDiscountAmount": {
      "format": "int32",
      "description": "Discount amount in percents",
      "maximum": 100,
      "minimum": 1,
      "type": "integer",
      "nullable": true,
      "example": 12.5
    },
    "MaxDiscount": {
      "format": "double",
      "description": "Maximum discount for percentage discounts",
      "minimum": 0,
      "type": "number",
      "nullable": true,
      "example": 3
    },
    "RoundingStrategy": {
      "format": "int32",
      "description": "Controls how the loyalty voucher's amount is rounded",
      "maximum": 2,
      "minimum": 0,
      "type": "integer",
      "nullable": true,
      "example": 1
    },
    "ShouldIncludeOrdersWithLoyaltyVoucher": {
      "description": "Controls whether we should include orders with loyalty vouchers in the campaign calculation",
      "type": "boolean",
      "nullable": true,
      "example": true
    },
    "VoucherValidPeriodDays": {
      "format": "int32",
      "description": "Number of days for which the voucher will be valid.",
      "maximum": 300,
      "minimum": 1,
      "type": "integer",
      "example": 1
    },
    "IncludeDeliveryFee": {
      "description": "Discount will include delivery fee",
      "type": "boolean",
      "example": true
    },
    "AutoApplyResultingVouchers": {
      "description": "Automatically apply resulting vouchers",
      "type": "boolean",
      "example": true
    },
    "IncludeExistingOrders": {
      "description": "Campaign will apply to existing orders",
      "type": "boolean",
      "example": true
    },
    "IsEnabled": {
      "description": "Is campaign enabled",
      "type": "boolean",
      "example": true
    },
    "StoreIds": {
      "description": "Ids of stores this campaign applies to",
      "type": "array",
      "items": {
        "format": "int32",
        "type": "integer"
      },
      "example": [
        1
      ]
    },
    "AppId": {
      "description": "The app that this campaign belongs to.",
      "type": "string",
      "example": "500123"
    },
    "ForceDiscount": {
      "description": "Controls whether the voucher generated from this campaign will override discount exclusions",
      "type": "boolean",
      "example": true
    }
  }
}