Schema
Discount Request
On edit, omitted top-level properties retain their existing values.
Overview
Properties
name
1
255
tags
UUIDs of tags to associate with the discount.
All of
All of 1
References Catalog UUID List.
calculation
Defines a fixed, percentage, or price-override catalog calculation.
Nested properties
type
Allowed values
fixedpercentageprice_overridefixed_value
All of
All of 1
References Money.
All of 2
Nested properties
amount
The amount in the currency's lowest denomination. Zero is not permitted.
1
4294967295
currency
Must match the merchant's ISO 4217 currency code.
percentage
A percentage between 0.1 and 100 inclusive, with at most one decimal place.
^((0\.[1-9])|([1-9]([0-9])?(\.[0-9])?)|100)$
percentage_cap
Yes
One of
One of 1
One of 2
All of
All of 1
References Money.
All of 2
Nested properties
amount
The amount in the currency's lowest denomination. Zero is not permitted.
1
4294967295
currency
Must match the merchant's ISO 4217 currency code.
price_override
All of
All of 1
References Money.
All of 2
Nested properties
amount
The amount in the currency's lowest denomination. Zero is not permitted.
1
4294967295
currency
Must match the merchant's ISO 4217 currency code.
One of
One of 1
Nested properties
type
fixed
One of 2
Nested properties
type
percentage
One of 3
Nested properties
type
price_override
product_group
The UUID of a product group owned by the merchant. Required for price-override and quantity-based discounts. On edit, omit this property to retain the existing product group or supply `null` to remove it.
uuid
Yes
availability
References Availability Request.
description
On edit, omit this property to retain the existing description or supply `null` to remove it.
1
255
Yes
total_redemption_limit
On edit, omit this property to retain the existing limit or supply `null` to remove it.
1
Yes
daily_redemption_limit
On edit, omit this property to retain the existing limit or supply `null` to remove it.
1
Yes
total_user_redemption_limit
On edit, omit this property to retain the existing limit or supply `null` to remove it.
1
Yes
daily_user_redemption_limit
On edit, omit this property to retain the existing limit or supply `null` to remove it.
1
Yes
allow_redemption_alongside_others
May only be false when the discount has a promo code.
auto_apply
Must be true when the discount has a promo code.
minimum_sub_total_spend
On edit, omit this property to retain the existing minimum spend or supply `null` to remove it.
Yes
One of
One of 1
One of 2
All of
All of 1
References Money.
All of 2
Nested properties
amount
The amount in the currency's lowest denomination. Zero is not permitted.
1
4294967295
currency
Must match the merchant's ISO 4217 currency code.
qty_allocation_mechanics
On edit, omit this property to retain the existing quantity mechanics or supply `null` to remove them.
Yes
One of
One of 1
One of 2
The mechanics that control a quantity-based discount.
Nested properties
trigger_product_group
The UUID of a product group owned by the merchant that triggers the discount.
uuid
trigger_qty
1
discount_qty
1
allocation_limit
1
Yes
Used by
Raw YAML
title: Discount Request
x-tags:
- Catalog
type: object
description: On edit, omitted top-level properties retain their existing values.
properties:
name:
type: string
minLength: 1
maxLength: 255
tags:
allOf:
- $ref: ./CatalogUuidList.yaml
description: UUIDs of tags to associate with the discount.
calculation:
type: object
description: Defines a fixed, percentage, or price-override catalog calculation.
required:
- type
properties:
type:
type: string
enum:
- fixed
- percentage
- price_override
fixed_value:
allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 1
maximum: 4294967295
description: The amount in the currency's lowest denomination. Zero is not permitted.
currency:
description: Must match the merchant's ISO 4217 currency code.
percentage:
type: string
pattern: '^((0\.[1-9])|([1-9]([0-9])?(\.[0-9])?)|100)$'
description: A percentage between 0.1 and 100 inclusive, with at most one decimal place.
percentage_cap:
default: null
oneOf:
- type: 'null'
- allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 1
maximum: 4294967295
description: The amount in the currency's lowest denomination. Zero is not permitted.
currency:
description: Must match the merchant's ISO 4217 currency code.
price_override:
allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 1
maximum: 4294967295
description: The amount in the currency's lowest denomination. Zero is not permitted.
currency:
description: Must match the merchant's ISO 4217 currency code.
oneOf:
- properties:
type:
const: fixed
required:
- fixed_value
- properties:
type:
const: percentage
required:
- percentage
- properties:
type:
const: price_override
required:
- price_override
product_group:
type:
- string
- 'null'
format: uuid
description: |-
The UUID of a product group owned by the merchant.
Required for price-override and quantity-based discounts.
On edit, omit this property to retain the existing product group or supply `null` to remove it.
availability:
$ref: ./AvailabilityRequest.yaml
description:
type:
- string
- 'null'
minLength: 1
maxLength: 255
description: On edit, omit this property to retain the existing description or supply `null` to remove it.
total_redemption_limit:
type:
- integer
- 'null'
minimum: 1
description: On edit, omit this property to retain the existing limit or supply `null` to remove it.
daily_redemption_limit:
type:
- integer
- 'null'
minimum: 1
description: On edit, omit this property to retain the existing limit or supply `null` to remove it.
total_user_redemption_limit:
type:
- integer
- 'null'
minimum: 1
description: On edit, omit this property to retain the existing limit or supply `null` to remove it.
daily_user_redemption_limit:
type:
- integer
- 'null'
minimum: 1
description: On edit, omit this property to retain the existing limit or supply `null` to remove it.
allow_redemption_alongside_others:
type: boolean
description: May only be false when the discount has a promo code.
auto_apply:
type: boolean
description: Must be true when the discount has a promo code.
minimum_sub_total_spend:
description: On edit, omit this property to retain the existing minimum spend or supply `null` to remove it.
oneOf:
- type: 'null'
- allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 1
maximum: 4294967295
description: The amount in the currency's lowest denomination. Zero is not permitted.
currency:
description: Must match the merchant's ISO 4217 currency code.
qty_allocation_mechanics:
description: On edit, omit this property to retain the existing quantity mechanics or supply `null` to remove them.
oneOf:
- type: 'null'
- type: object
description: The mechanics that control a quantity-based discount.
required:
- trigger_product_group
- trigger_qty
- discount_qty
properties:
trigger_product_group:
type: string
format: uuid
description: The UUID of a product group owned by the merchant that triggers the discount.
trigger_qty:
type: integer
minimum: 1
discount_qty:
type: integer
minimum: 1
allocation_limit:
type:
- integer
- 'null'
minimum: 1
default: null