Skip to content

Availability Create

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

Services \ Availability \ Create

Creates a new session - creates availability for a specific start time.

Note: Sessions can be created only for INVENTORY mode products.

Basic Usage:

$rezdyApi->availability->create($request);

Required Parameters

Optional Parameters

  • none

Returns

Throws (with errors)

Code Example

use Rezdy\RezdyAPI;
use Rezdy\Requests\SessionCreate;

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

// Set the array of session create parameters 
$sessionParams = [  
   'productCode'     => 'P12345', 
   'seats'           => '50',
   'allDay'          => false,
   'startTimeLocal'  => '2019-04-02 17:00:00'];         

// Create the Session Create Request
$session = new SessionCreate($sessionParams);

// Send the request to the API
$response = $rezdyAPI->availability->create($session);

// View the Response
echo $response;

Clone this wiki locally