Create product group
Request parameters
Parameter
Type / Description
Request sample
<?php
require ('PATH_TO_AUTH');
$ProductGroup = new stdClass();
$ProductGroup->Name = 'New Product Group from API';
$ProductGroup->Code = null; // Send null for the Code. 2Checkout generates unique product group code identifiers.
$ProductGroup->TemplateName = 'Default Template'; // '001 - Two Column Billing'; // the name of the cart template you want to associate with the product group
$ProductGroup->Description = 'This is a generic description';
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'addProductGroup',
'params' => array($sessionID, $ProductGroup)
);
var_dump (callRPC($jsonRpcRequest, $host));
?>Response
Last updated
Was this helpful?