Influencer Codes
Batch Add Influencer Codes
post /sites/{siteid}/influencercodes[ { "code": "SCRAPBOOK101", "name": "Emily Hadfield", "active": false, "voucherpassword": "RLFm3bef", "vouchername": "All scrapbooks 10% off", "maxuses": 1400 }]
[ { "statuscode": 200, "return": "SCRAPBOOK101" }]
HTTP Status Code Summary | |
---|---|
200 | Returns batch envelope with influencer codes. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Influencer Codes
get /sites/{siteid}/influencercodesFilter influencer codes based on the active
field.
Filter influencer codes based on the code
field.
Filter influencer codes based on the name
field.
Filter influencer codes based on the redeemable
field.
Filter influencer codes based on the vouchername
field.
Filter influencer codes based on the voucherpassword
field.
Filter influencer codes based on the datestart
field. The value is greater or equal to datestart
field on influencer code.
Filter influencer codes based on the datestart
field. The value is less or equal to datestart
field on influencer code.
Filter influencer codes based on the dateend
field. The value is greater or equal to dateend
field on influencer code.
Filter influencer codes based on the dateend
field. The value is less or equal to dateend
field on influencer code.
Filter influencer codes based on the datelstused
field. The value is greater or equal to datelastused
field on influencer code.
Filter influencer codes based on the datelstused
field. The value is less or equal to datelastused
field on influencer code.
Sort the result.
- code
- -code
- name
- -name
- vouchername
- -vouchername
- voucherpassword
- -voucherpassword
- datestart
- -datestart
- dateend
- -dateend
- datelastused
- -datelastused
The index of the item to start from
The number of items returned
Comma separated list of fields to return. Use this to query only the fields you are using. See influencercode for all fields.
{ "totalcount": 2, "items": [ { "code": "PREPARE4SUMMER", "name": "Taylor Smith", "active": true, "datestart": 1555711200, "dateend": 1559339999, "voucherpassword": "Lzs5MvMr", "vouchercode": null, "vouchername": null, "vouchercomment": null, "maxuses": 1000, "numused": 2, "datelastused": 1556466245, "moneyordertotal": "174.00", "moneyinfluencertotal": "97.00", "moneyinfluencerdiscount": "38.00" }, { "code": "RUN-FASTER-2019", "name": "Joe Mason", "active": true, "datestart": 1548975600, "dateend": null, "voucherpassword": "dJTv4gHE", "vouchercode": null, "vouchername": null, "vouchercomment": "Discount on smartwatches.", "maxuses": 600, "numused": 1, "datelastused": 1549985297, "moneyordertotal": "1250.00", "moneyinfluencertotal": "1000.00", "moneyinfluencerdiscount": "250.00" } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type influencercode. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Update Influencer Codes
put /sites/{siteid}/influencercodes[ { "code": "SCRAPBOOK101", "maxuses": 2000 }]
[ { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns batch envelope with return value true on success. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Delete Influencer Codes
delete /sites/{siteid}/influencercodes[ { "code": "SCRAPBOOK101" }]
[ { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns batch envelope with return value true on success. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Influencer Code
get /sites/{siteid}/influencercodes/{code}Comma separated list of fields to return. Use this to query only the fields you are using. See influencercode for all fields.
{ "code": "SCRAPBOOK101", "name": "Emily Hadfield", "active": false, "datestart": null, "dateend": null, "voucherpassword": "RLFm3bef", "vouchercode": null, "vouchername": "All scrapbooks 10% off", "vouchercomment": null, "maxuses": 1400, "numused": 0, "datelastused": null, "moneyordertotal": "0.00", "moneyinfluencertotal": "0.00", "moneyinfluencerdiscount": "0.00"}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type influencercode. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
influencercodeobject
The object for influencer codes in Sitoo
The unique influencer code. Can only contain [0-9a-zA-Z&_-.]
The name of the influencer for this code.
If true, then this influencer code is active.
The date used for the activation of this influencer code. No activation date if value is null.
The date used for the expiration of this influencer code. No expiration date if value is null.
The password used for unlocking the voucher.
Value used to override vouchercode in the voucher applied for the purchase, or null to leave original value.
Value used to override vouchername in the voucher applied for the purchase, or null to leave original value.
Value used to override vouchercomment in voucher the voucher applied for the purchase, or null to leave original value.
The maximum times the influencer code can be used or null for unlimited use.
The number of times the influencer code has been used.
The date for latest redeem of the influencer code.
The total amount of sales for purchases where the influencer code was applied.
The total amount of sales for items affected by the influencer code.
The total amount of discounts given for the influencer code.
moneystring
timestampinteger
Number of seconds since the Unix Epoch.