CouponDto
Represents a detailed view of a coupon, including configuration and audit information.
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount in the smallest currency unit (e.g., cents).
discount_apply_before_salesbooleanRequired
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanRequired
Indicates whether the discount should be applied individually to required tags or products.
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
enabledbooleanRequired
Indicates whether the coupon is enabled.
idFlakeIdRequired
minimum_order_valueintegerRequired
The minimum order value required to use the coupon.
redeem_limit_customer_amountintegerRequired
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanRequired
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerRequired
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanRequired
Indicates whether a global redemption limit is enabled.
store_idFlakeIdRequired
usable_on_one_time_purchasebooleanRequired
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanRequired
Indicates whether the coupon can be used for subscriptions.
version_idFlakeIdRequired
apply_to_productsFlakeId[]Optional
A list of product IDs the coupon applies to.
created_byActorDtoOptional
typeenumRequired
Possible enum values
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
idFlakeIdOptional
duration_in_intervalsintegerOptional
The number of subscription renewals the coupon is valid for, used if the duration is repeating.
duration_in_monthsintegerOptional
The number of months the coupon is valid for, used if the duration is repeating.
expires_atstringOptional
The date and time when the coupon expires.
notestringOptional
A note or internal description of the coupon.
updated_atstringOptional
The date and time when the coupon was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
idFlakeIdOptional
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional
Example
{
"code": "string",
"created_at": "2024-01-01T00:00:00Z",
"discount_amount": 0,
"discount_apply_before_sales": true,
"discount_apply_individually": true,
"discount_type": "unspecified",
"duration": "once",
"enabled": true,
"id": "411486491630370816",
"minimum_order_value": 0,
"redeem_limit_customer_amount": 0,
"redeem_limit_customer_enabled": true,
"redeem_limit_store_amount": 0,
"redeem_limit_store_enabled": true,
"store_id": "411486491630370816",
"usable_on_one_time_purchase": true,
"usable_on_subscription": true,
"version_id": "411486491630370816",
"note": "string",
"duration_in_months": 0,
"duration_in_intervals": 0,
"apply_to_products": [
"411486491630370816"
],
"apply_to_tags": [
"411486491630370816"
],
"usable_by_customer_id": "411486491630370816",
"usable_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-01-01T00:00:00Z",
"created_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2024-01-01T00:00:00Z"
}