---
title: "POST /api/v1.0/{appId}/campaigns/retention"
method: POST
path: "/api/v1.0/{appId}/campaigns/retention"
tags: ["Campaigns"]
---

# POST /api/v1.0/{appId}/campaigns/retention

`POST /api/v1.0/{appId}/campaigns/retention`

## Path parameters

- `appId` string, required

## Request body

- RetentionCampaignBase — Retention campaign base
  - `NotifyCustomerAfterMinutes` integer — Time in minutes, after which customer will receive retention voucher if he/she does not order
  - `PercentDiscountAmount` integer, nullable — Discount amount in percents
  - `MaxDiscount` number, double, nullable — Maximum discount for percentage discounts
  - `LumpDiscountAmount` number, double, nullable — Discount amount in sum of money
  - `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` integer[] — 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

## Response `200`

OK

- RestApiResultRetentionCampaign — Rest api result
  - `Data` RetentionCampaign, required — Retention campaign
    - `CampaignId` integer — Id of campaign
    - `Statistics` CampaignStatistics — Campaign statistics
      - `VouchersIssued` integer — Deprecated. Number of issued vouchers. This field is always zero.
      - `VouchersRedeemed` integer — Deprecated. Number of redeemed vouchers. This field is always zero. This field is always zero.
      - `Conversion` number, double — Deprecated. Conversion of campaign (VouchersIssued / VouchersRedeemed). This field is always zero.
      - `SalesGenerated` number, double — Deprecated. Sales generated by campaign (TotalAmount - FeeChargedToCustomer ie. the discounted sale value). This field is always zero.
      - `ReturnOfInvestment` number, double — Deprecated. Return of investment of campaign (TotalAmount / DiscountAmount). This field is always zero.
    - `Stores` StoreCampaignStartTime[] — Stores this campaign applies to with campaign start time in Utc
      - `StoreId` integer — Store Id
      - `TsStart` string, date-time — Campaign start time in Utc
    - `PublicId` string, uuid — Permanent reference to the item.
    - `NotifyCustomerAfterMinutes` integer — Time in minutes, after which customer will receive retention voucher if he/she does not order
    - `PercentDiscountAmount` integer, nullable — Discount amount in percents
    - `MaxDiscount` number, double, nullable — Maximum discount for percentage discounts
    - `LumpDiscountAmount` number, double, nullable — Discount amount in sum of money
    - `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` integer[] — 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

## Other responses

- `400` — BadRequest
- `401` — Unauthorized
- `403` — Successful authentication, but authorization has been denied for this request.
- `404` — NotFound

---

[API](https://skmtc.net/flipdish/apis/flipdish-open-api-v1-0.md) · [All operations](https://skmtc.net/flipdish/apis/flipdish-open-api-v1-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flipdish/flipdish-open-api-v1-0/revisions/a72c0465da74/schema)
