Skip to main content

Add products

Last updated: 25-Sep-2019
Rate this article:

Overview

Use addPromotionProducts to add products to an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to add products to.

promotionProducts

Required (object)

 

Code

Required (string)

 

 

System generated product code.

 

pricingConfigurationCode

Optional (string)

 

 

System generated pricing configuration code.

 

pricingOptionCodes

Optional (array of strings)

 

 

Pricing option codes that you control.

Response

Parameter Type/Description
PromotionProducts Object

Request

<?php

require ('PATH_TO_AUTH');

$promotionCode = 'MY_PROMO_CODE_1';

// Define a product to add to the promotion
$newProduct1 = new stdClass;
$newProduct1->Code = '';
$newProduct1->PricingConfigurationCode = '';
$newProduct1->PricingOptionCodes = ['',''];

// Define another product to add to the promotion
$newProduct2 = new stdClass;
$newProduct2->Code = '';
$newProduct2->PricingOptionCodes = [''];

$productPromotion = [$newProduct1, $newProduct2];

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'addPromotionProducts',
'params' => array($sessionID, $promotionCode, $productPromotion)
);
var_dump (callRPC($jsonRpcRequest, $host));
Rate this article:

Need help?

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.

Not yet a Verifone customer?

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.

Verifone logo