Add Reference Values to Labels

UPS

Example:

<?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('referenceCode','ON');
$package->setParameter('referenceValue','12345');
$package->setParameter('referenceCode2','ON');
$package->setParameter('referenceValue2','987654');

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

referenceCode

Value Description
AJ Accounts Receivable Customer Account
AT Appropriation Number
BM Bill of Lading Number
9V Collect on Delivery (COD) Number
ON Dealer Order Number
DP Department Number
3Q Food and Drug Administration (FDA) Product Code
IK Invoice Number
MK Manifest Key Number
MJ Model Number
PM Part Number
PC Production Code
PO Purchase Order Number
RQ Purchase Request Number
RZ Return Authorization Number
SA Salesperson Number
SE Serial Number
ST Store Number
TN Transaction Reference Number

referenceValue

  • Limited to 35 characters for UPS.

FedEx

Example:

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

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

$shipment->setParameter('length', '5');
$shipment->setParameter('width', '5');
$shipment->setParameter('height', '5');
$shipment->setParameter('weight','5');

$shipment->setParameter('referenceCode','CUSTOMER_REFERENCE');
$shipment->setParameter('referenceValue','asdf11111');

// Multiple reference values, note referenceCode must be different you cannot specify three values of 'CUSTOMER_REFERENCE' for example.
$shipment->setParameter('referenceCode2','INVOICE_NUMBER');
$shipment->setParameter('referenceValue2','referencetwo');

$shipment->setParameter('referenceCode3','P_O_NUMBER');
$shipment->setParameter('referenceValue3','referencethree');

$response = $shipment->submitShipment();

referenceCode

  • BILL_OF_LADING
  • CUSTOMER_REFERENCE
  • DEPARTMENT_NUMBER
  • ELECTRONIC_PRODUCT_CODE
  • INTRACOUNTRY_REGULATORY_REFERENCE
  • INVOICE_NUMBER
  • P_O_NUMBER
  • SHIPMENT_INTEGRITY
  • STORE_NUMBER

referenceValue

  • Limited to 30 characters for FedEx.

USPS

Just set the referenceValue parameter:

<?php
$shipment->setParameter('referenceValue', 'Your reference info');

DHL

Just set the referenceValue parameter:

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

$shipment->setParameter('referenceValue', 'ABC123'); // Your reference value

$shipment->setParameter('shipper', 'RocketShipIt');
$shipment->setParameter('shipAddr1', '1 Zoo Rd');
$shipment->setParameter('shipCity', 'San Francisco');
$shipment->setParameter('shipState', 'California');
$shipment->setParameter('shipCode', '94132');
$shipment->setParameter('shipCountry', 'US');

$shipment->setParameter('toCompany', 'San Diego Zoo');
$shipment->setParameter('toName', 'Mark Sanborn');
$shipment->setParameter('toAddr1', '2920 Zoo Dr');
$shipment->setParameter('toCity', 'San Diego');
$shipment->setParameter('toState', 'California');
$shipment->setParameter('toCode', '92101');
$shipment->setParameter('toCountry', 'US');
$shipment->setParameter('toPhone', '1234567');

$shipment->setParameter('service', 'D');
$shipment->setParameter('weight', '5');

$response = $shipment->submitShipment();