Skip to content

Products Update

Brad Ploeger edited this page Apr 3, 2019 · 1 revision

Services \ Products \ Update

Purpose

Updates a product.

Basic Usage:

$rezdyApi->products->update($productCode, $request);

Required Parameters

Optional Parameters

  • none

Returns

Throws

Code Example

use Rezdy\RezdyAPI;
use Rezdy\Requests\ProductUpdate;
use Rezdy\Requests\Objects\PriceOption;

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

$productCode = 'P12345';

$productParams = [
   'name' => 'Product Updated From API',
   'advertisedPrice' => 89.95 ];

// Create the Product request
$product = new Product($productParams);  

// Send the ProductUpdate request to the API
$response = $rezdyAPI->products->update($productCode, $product);

// View the response
echo $response;

Clone this wiki locally