getSingleCouponWithFilters
GET
/v2/coupons/with-id
const url = 'https://api-crm-staging.divinea.com/api/v2/coupons/with-id?count=10&page=0';const options = {method: 'GET', headers: {APIKey: '<APIKey>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-crm-staging.divinea.com/api/v2/coupons/with-id?count=10&page=0' \ --header 'APIKey: <APIKey>'Authorizations
Sezione intitolata “Authorizations”Parameters
Sezione intitolata “Parameters”Query Parameters
Sezione intitolata “Query Parameters”code
string
Coupon Code identifier
count
integer format: int32
Items per page (default 10)
discountCodeId
string
Coupon Code Id
entities
Array<string>
Coupon entities
page
integer format: int32
Page (starting from 0)
type
string
Coupon type
wineryId
string
Winery identifier
Responses
Sezione intitolata “Responses”OK
Media type*/*
Coupon
object
active
boolean
code
string
couponRules
Array<object>
CouponRuleobject
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
endAt
string format: date-time
id
string format: uuid
minimumOrderCents
integer format: int64
startAt
string format: date-time
type
string
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
endAt
string format: date-time
id
string format: uuid
minimumOrderCents
integer format: int64
startAt
string format: date-time
type
string
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