PayNow

CreateSaleDto

apply_to_product_idsFlakeId[]Required
A list of product IDs the sale applies to.
apply_to_tag_idsFlakeId[]Required
A list of tag IDs the sale applies to.
begins_atstringRequired
The date and time when the sale begins.
discount_amountintegerRequired
The discount value. For percent discounts, this represents the percentage multiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents the value in the smallest currency unit (e.g., cents).
discount_typeenumRequired
Possible enum values
  • percent
  • amount
durationenumRequired
Possible enum values
  • unspecified
  • once
  • forever
  • repeating
duration_in_intervalsintegerRequired
The number of subscription intervals the coupon is valid for, used if the duration is repeating.
enabledbooleanRequired
Indicates whether the sale is enabled.
minimum_order_valueintegerRequired
The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).
namestringRequired
The name of the sale.
ends_atstringOptional
The date and time when the sale ends.
Example
{
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "begins_at": "2024-01-01T00:00:00Z",
  "discount_amount": 0,
  "discount_type": "percent",
  "duration": "unspecified",
  "duration_in_intervals": 0,
  "enabled": true,
  "minimum_order_value": 0,
  "name": "string",
  "ends_at": "2024-01-01T00:00:00Z"
}