Add Discount
To add a discount you would simply POST a request to the following style URL along with your X-API-KEY included as a HEADER or ARG.
https://CARTNAME.cartloom.com/api/discounts/add
Parameters
- enabled( 0 or 1 )required
- auto( 0 or 1 )required
- type( fixed or percent )required
- unlimited( 0 or 1 )required
- amount( percentage or fixed amount )required
- target( product, total or all )required
- start_date ( YYY-MM-DD )required
- stop_date ( YYY-MM-DD )required
- code( What customer enters to get discount )optional
- target_pid( id(s) of target product(s) )optional
- target_amount( amount required to trigger discount )optional
- target_quantity( quantity required to trigger discount )optional
- allowance( how many times can discount be redeemed )optional
A successful attempt will return the id of the newly created discount.
Comments
0 comments
Article is closed for comments.