Negotiated Rates¶
What are Negotiated Rates?¶
Negotiated rates are the retail rates subtracted by your shipper discount. This is the carrier’s most accurate estimate to what you would actually be charged for the shipment.
If the negotiatedRates parameter is present and the shipper is authorized then negotiated rates will be returned in the response.
UPS¶
Here is a UPS rate example using the negotiatedRates parameter:
<?php
$rate = new \RocketShipIt\Rate('UPS');
$rate->setParameter('toCity', 'Bozeman');
$rate->setParameter('toState', 'MT'); // required for negotiated rates
$rate->setParameter('toCode', '59715');
$rate->setParameter('negotiatedRates', true);
$package = new \RocketShipIt\Package('UPS');
$package->setParameter('weight', '5.5');
$rate->addPackageToShipment($package);
$response = $rate->getAllRates();
Note
The UPS development server will not return an accurate negotiated rate.
Note
Once moved to the production server you may need to enable negotiated rates with your UPS representitive in order for them to show up in the response.
See Also: UPS: Account-Specific Negotiated Rates.
FedEx¶
FedEx always returns list/retail and negotiated rates when using getAllRates().
In the output this would indicate the negotiated rate:
[RateType] => PAYOR_ACCOUNT_PACKAGE
and this would indicate the list/retail rate:
[RateType] => PAYOR_LIST_PACKAGE
USPS Online Discounted Rates¶
USPS doesn’t have negotiated rates but you can fetch the online discounted rates by setting the service to ONLINE. Currently, the USPS API does not allow querying a single online/discounted rate. You must query all online/discounted rates in a single request.
Example:
<?php
$rate = new \RocketShipIt\Rate('USPS');
$rate->setParameter('shipCode', '35115');
$rate->setParameter('toCode', '10007');
// Fetch online rates, will return as CommercialRate
$rate->setParameter('service', 'ONLINE');
$package = new \RocketShipIt\Package('USPS');
$package->setparameter('weight', '1.5');
$package->setparameter('length', '45');
$package->setparameter('width', '10');
$package->setparameter('height', '10');
$package->setParameter('container', 'rectangular');
$rate->addPackageToShipment($package);
$response = $rate->getSimpleRates();
Output will include online rate as CommercialRate
Partial Response:
...
[0] => Array
(
[CLASSID] => 3
[MailService] => Priority Mail Express 1-Day<sup>™</sup>
[Rate] => 25.75
[CommercialRate] => 23.23
)
...
Stamps.com¶
Stamps.com will always return your discounted rates.