Skip to content

PickupList Create

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

Services \ PickupList \ Create

Purpose

Creates a new pickup list

Basic Usage:

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

Required Parameters

Optional Parameters

  • none

Returns

Throws

Code Example

use Rezdy\RezdyAPI;
use Rezdy\Requests\PickupList;
use Rezdy\Requests\Objects\PickupLocation;

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

$pickupParams = [
   'name' => 'Local Hotels',
   'otherLocationInstructions' => 'Honk horn in front of each location' ];

$locationParams = [
   'locationName' => 'The Plaza',
   'pickupInstructions' => 'Meet in lobby of the hotel',
   'minutesPrior' => 30,
   'address' => '768 5th Ave, New York, NY 10019'

// Create a PickupList request
$pickupList = new PickupList($pickupParams);

// Create a PickupLocation request
$pickupLocation = new PickupLocation($locationParams);

// Attach the PickupLocation request to the PickupList request
$pickupList->attach($pickuplocation);

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

// View the response
echo $response;

Clone this wiki locally