Skip to content

Categories AddProduct

Brad Ploeger edited this page Apr 3, 2019 · 2 revisions

Services \ Categories \ AddProduct

Purpose

Adds a product to an existing category.

Basic Usage:

$rezdyApi->categories->addProduct($categoryId, $productCode);

Required Parameters

  • integer: $categoryId
  • string: $productCode

Optional Parameters

  • none

Returns

Throws (with errors)

Code Example

use Rezdy\RezdyAPI;

// Initialize the API
$rezdyAPI = new RezdyAPI('your api key');

$categoryId = 123456;

$productCode = 'P12345';

// Send the request to the API
$response = $rezdyAPI->categories->addProduct($categoryId, $productCode);

// View the Response
echo $response;

Clone this wiki locally