Coupon (CDev\Coupons)
Coupon represents the code which can be given to customers to activate a discount. Coupon repo stores only unused codes. See UsedCoupon to check for coupons with the order relation.
GET
Retrieve coupons by conditions
_cnd[limit]
array
Sets the offset (first item) and the limit (second item)
_cnd[orderBy]
array
Sets sorting order field
default Success <XLite\Module\CDev\Coupons\Model\Coupon>[] array
Sample response
[{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}]
_cnd[limit]
array
Sets the offset (first item) and the limit (second item)
_cnd[orderBy]
array
Sets sorting order field
default Success <XLite\Module\CDev\Coupons\Model\Coupon>[] array
Sample response
[{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}]
GET
Retrieve coupon by id
id
integer Required
Id value of the Coupon object
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
id
integer Required
Id value of the Coupon object
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories
PUT
Update coupon by id
id
integer Required
Id value of the Coupon object
<XLite\Module\CDev\Coupons\Model\Coupon>
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
id
integer Required
Id value of the Coupon object
<XLite\Module\CDev\Coupons\Model\Coupon>
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories
DELETE
Delete coupon by id
id
integer Required
Id value of the Coupon object
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
id
integer Required
Id value of the Coupon object
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories
POST
Add new coupon
<XLite\Module\CDev\Coupons\Model\Coupon>
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
[] array
Product classes
memberships
[] array
Memberships
usedCoupons
[] array
Used coupons
categories
[] array
Categories
<XLite\Module\CDev\Coupons\Model\Coupon>
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories
default Success <XLite\Module\CDev\Coupons\Model\Coupon>
Sample response
{"id":"integer","code":"string","enabled":"boolean","value":"string","type":"string","comment":"string","uses":"integer","dateRangeBegin":"integer","dateRangeEnd":"integer","totalRangeBegin":"string","totalRangeEnd":"string","usesLimit":"integer","usesLimitPerUser":"integer","singleUse":"boolean","productClasses":"<XLite\\Model\\ProductClass>[] array","memberships":"<XLite\\Model\\Membership>[] array","usedCoupons":"<XLite\\Module\\CDev\\Coupons\\Model\\UsedCoupon>[] array","categories":"<XLite\\Model\\Category>[] array"}
vendor
allVendors
boolean
id
integer
Product unique ID
code
string
Code
enabled
boolean
Enabled status
value
string
Value
type
string
Type
comment
string
Comment
uses
integer
Uses count
dateRangeBegin
integer
Date range (begin)
dateRangeEnd
integer
Date range (end)
totalRangeBegin
string
Total range (begin)
totalRangeEnd
string
Total range (end)
usesLimit
integer
Uses limit
usesLimitPerUser
integer
Uses limit per user
singleUse
boolean
Flag: Can a coupon be used together with other coupons (false) or no (true)
productClasses
Product classes
memberships
Memberships
usedCoupons
Used coupons
categories
Categories