Creating a Shipment with Signature Options

FedEx

Example of requiring direct signature:

<?php
$rate = new \RocketShipIt\Rate('fedex');
$rate->setParameter('toCode','90210');
$rate->setParameter('weight','5');
$rate->setParameter('signatureType','DIRECT');
$response = $rate->getAllRates();

UPS

Example of requiring direct signature:

<?php
$shipment = new \RocketShipIt\Shipment('UPS');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$package = new \RocketShipIt\Package('UPS');
$package->setParameter('length','5');
$package->setParameter('width','5');
$package->setParameter('height','5');
$package->setParameter('weight','5');
$package->setParameter('signatureType', 'DIRECT'); // Signature Required

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

Note

For international shipments set the signatureType parameter on the shipment level.

Canada Post

Example of requiring direct signature:

<?php
$shipment = new \RocketShipIt\Shipment('CANADA');
$shipment->setParameter('shipCountry', 'CA');
$shipment->setParameter('shipState', 'ON');
$shipment->setParameter('shipCity', 'Ottawa');
$shipment->setParameter('shipCode', 'K1A0B1');
$shipment->setParameter('toName', 'Mark Sanborn');
$shipment->setParameter('toAddr1', '361A Old Finch Avenue');
$shipment->setParameter('toCity', 'Toronto');
$shipment->setParameter('toState', 'ON');
$shipment->setParameter('toCode', 'M1B5K7');
$shipment->setParameter('toCountry', 'CA');
$shipment->setParameter('weight', '5');
$shipment->setParameter('length', '5');
$shipment->setParameter('width', '5');
$shipment->setParameter('height', '5');
$shipment->setParameter('signatureType', 'DIRECT'); // Signature Required

$response = $shipment->submitShipment();

Canada Post also suports adult signature:

$shipment->setParameter('signatureType', 'ADULT');

signatureType

INDIRECT Delivery confirmation driver’s discretion
DIRECT Direct signature is required
ADULT Adult signature is required
USPS USPS Delivery Confirmation
NO_SIGNATURE_REQUIRED No signature