The following SOAP methods are provided specifically for interacting with coupon code lists.
generate
Find users by username
EvalancheUser generate(int coupon_list_id, int amount)
Details
Parameter
- int coupon_list_id: ID of the voucher code list
- int amount: Number of voucher codes to be generated
Return value
- generateResult: Boolean: Result
Required rights
Manage voucher code listUsage
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:coup="https://scnem.com/soap.php/soap/couponlist">
<soapenv:Header/>
<soapenv:Body>
<coup:generate>
<coupon_list_id>COUPON_LIST_ID</coupon_list_id>
<amount>AMOUNT</amount>
</coup:generate>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/couponlist">
<SOAP-ENV:Body>
<ns1:generateResponse>
<generateResult>true/false</generateResult>
</ns1:generateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
getProfileCouponList
Read list of all voucher codes
EvalancheUser[] getProfileCouponList(int coupon_list_id)
Details
Parameter
- int coupon_list_id: ID of the voucher code list
Return value
- CouponList[]:
- int id: coupon ID
- string code: coupon code
- int profile_id: profile ID
- int creation_date: creation date
- int valid_to: code expiration date
Required rights
Manage voucher code listUsage
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:coup="https://scnem.com/soap.php/soap/couponlist">
<soapenv:Header/>
<soapenv:Body>
<coup:getProfileCouponList>
<coupon_list_id>COUPON_LIST_ID</coupon_list_id>
</coup:getProfileCouponList>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/couponlist">
<SOAP-ENV:Body>
<ns1:getProfileCouponListResponse>
<getProfileCouponListResult>
<item>
<id>COUPON_ID</id>
<code>CODE</code>
<profile_id>PROFILE_ID</profile_id>
<creation_date>CREATION_DATE</creation_date>
<valid_to>VALID_TO</valid_to>
</item>
[...]
</getProfileCouponListResult>
</ns1:getProfileCouponListResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
import
Imports existing voucher codes into an existing voucher code list
EvalancheUser import(EvalancheUser user)
Details
Parameter
- CouponList:
- int id: voucher code list ID
- string code: voucher code
- int profile_id: optional profile ID
- int creation_date: voucher creation date
- int valid_to: expiry date of the voucher
Return value
- importResult: boolean
Required rights
Manage voucher code listUsage
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:coup="https://scnem.com/soap.php/soap/couponlist">
<soapenv:Header/>
<soapenv:Body>
<coup:import>
<coupon_list_id>USER_ID</coupon_list_id>
<data>
<item>
<id>CODE_ID</id>
<code>COUPON_CODE</code>
<profile_id>PROFILE_ID</profile_id>
<creation_date>CREATION_DATE</creation_date>
<valid_to>VALID_TO</valid_to>
</item>
<!--Zero or more repetitions:-->
</data>
</coup:import>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/couponlist">
<SOAP-ENV:Body>
<ns1:importResponse>
<importResult>true/false</importResult>
</ns1:importResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>