For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remove coupon

Use the deletePromotionCoupon method to remove multiple coupons from a promotion. You cannot delete a single coupon. The coupon is required for the promotion.

Request parameters

Parameter
Type / Description

promotionCode

Required (string) The code corresponding to the promotion that you want to remove coupons from.

promotionCoupon

Required (object)

promotionCoupon.Type

Required (string)

Coupon type. Available values:

  • MULTIPLE, use in conjunction with Codes

promotionCoupon.Code/Codes

Required (string/array of strings) Array of coupon codes (for MULTIPLE).

Request sample

<?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));

Response parameters

Parameter
Type

Last updated

Was this helpful?