Remove coupon
Last updated: 12-Jul-2019
Use the deletePromotionCoupon method to remove multiple coupons from a promotion. You cannot delete a single coupon. The coupon is required for the promotion.
Parameter | Type/Description | |
---|---|---|
promotionCode |
Required (string) |
|
|
The code corresponding to the promotion that you want to remove coupons from. |
|
promotionCoupon |
Required (object) |
|
|
Type |
Required (string) |
|
|
Coupon type. Available values:
|
|
Code/Codes |
Required (string/array of strings) |
|
|
Array of coupon codes (for MULTIPLE). |
Parameter | Type/Description |
---|---|
promotionCoupon | Object |
<?php
require ('PATH_TO_AUTH');
// Promotion code corresponding to the promotion you want to remove coupons from
$promotionCode = '';
// Define multiple coupon object
$promotionCoupon = new stdClass;
$promotionCoupon->Type = 'MULTIPLE';
$promotionCoupon->Codes = ['YOUR_CODE_1', 'YOUR_CODE_2'];
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'deletePromotionCoupon',
'params' => array($sessionID, $promotionCode, $promotionCoupon)
);
var_dump (callRPC($jsonRpcRequest, $host));
Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.
We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.