Salta ai contenuti

upsertCommandCoupons

POST
/v2/coupons
curl --request POST \
--url https://api-crm-staging.divinea.com/api/v2/coupons \
--header 'APIKey: <APIKey>' \
--header 'Content-Type: application/json' \
--data '{ "active": true, "allChannels": true, "allExperiences": true, "channels": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "code": "example", "discountCents": 1, "discountPercent": 1, "discountType": "percent", "endAt": "2026-04-15", "experiences": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "minimumOrderCents": 1, "purchaseType": "RESERVATION", "startAt": "2026-04-15", "useCount": 1, "useMax": 1, "useMaxByEmail": 1 }'

Coupon

Media typeapplication/json
UpsertRequestCoupon
object
active
boolean
allChannels
boolean
allExperiences
boolean
channels
Array<string>
code
string
discountCents
integer format: int64
discountPercent
integer format: int32
discountType
string
Allowed values: percent absolute
endAt
string format: date
experiences
Array<string>
id
string format: uuid
minimumOrderCents
integer format: int64
purchaseType
string
Allowed values: RESERVATION ORDER PREORDER GIFT
startAt
string format: date
useCount
integer format: int32
useMax
integer format: int32
useMaxByEmail
integer format: int32

OK

Media type*/*
Coupon
object
active
boolean
code
string
couponRules
Array<object>
CouponRule
object
coupon
Coupon
object
active
boolean
code
string
couponRules
Array<object> recursive
createdAt
string format: date-time
discountCents
integer format: int64
discountPercent
integer format: int32
discountType
string
Allowed values: percent absolute
endAt
string format: date-time
id
string format: uuid
minimumOrderCents
integer format: int64
startAt
string format: date-time
type
string
Allowed values: RESERVATION ORDER PREORDER GIFT
updatedAt
string format: date-time
useCount
integer format: int32
useMax
integer format: int32
useMaxByEmail
integer format: int32
winery
Winery
object
createdAt
string format: date-time
id
string format: uuid
name
string
updatedAt
string format: date-time
createdAt
string format: date-time
entityId
string
entityType
string
id
string format: uuid
rules
object
updatedAt
string format: date-time
createdAt
string format: date-time
discountCents
integer format: int64
discountPercent
integer format: int32
discountType
string
Allowed values: percent absolute
endAt
string format: date-time
id
string format: uuid
minimumOrderCents
integer format: int64
startAt
string format: date-time
type
string
Allowed values: RESERVATION ORDER PREORDER GIFT
updatedAt
string format: date-time
useCount
integer format: int32
useMax
integer format: int32
useMaxByEmail
integer format: int32
winery
Winery
object
createdAt
string format: date-time
id
string format: uuid
name
string
updatedAt
string format: date-time