Remove sources
Last updated: 25-Sep-2019
Use the deletePromotionSources method to define new sources for an existing promotion.
Parameter | Type/Description |
---|---|
sessionID |
Required (string) |
|
Output of the Login method. |
promotionCode |
Required (string) |
|
The code corresponding to the promotion that you want to remove sources from. |
promotionSources |
Required (string array) |
|
Array of strings defining the promotion sources to be removed. |
Parameter | Type/Description |
---|---|
Status |
Boolean |
|
True or false |
<?php
require ('PATH_TO_AUTH');
// Promotion code corresponding to the promotion you want to remove sources from
$promotionCode = '';
// Sources array with the source values
$sources = ['source1', 'source2'];
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'deletePromotionSources',
'params' => array($sessionID, $promotionCode, $sources)
);
var_dump (callRPC($jsonRpcRequest, $host));