Get Parcel Rates

Get Parcel Rates

Status
Request Type

POST

The parcel rating endpoint accepts information about a parcel shipment and returns a formatted list of available carriers and services.

The parcel rating endpoint will only return rates for carriers that have been set up for your company within TargetTMS.

On this page:

Related:

Endpoint

 https://tms.targetfmi.com/?p=api&r=text&c=parcelRateRequest&m=getParcelRates

Request Parameters

ParameterRequired

Available Options/Data Type

Max LengthDescription
/shipperYesn/an/aShipper container node
/shipper/stateYesValid state abbreviation / String2The state abbreviation where the shipment will move from.
/shipper/zipYesValid postal code / String10The zip code where the shipment will move from.
/shipper/countryYes
  • US
  • CAN
3The country code where the shipment will move from.
/consigneeYesn/an/aConsignee container node
/consignee/addressNoString~65k

Consignee address

/consignee/stateYesValid state abbreviation / String2The state code where the shipment will move to.
/consignee/zipYesValid postal code / String10The zip code where the shipment will move to.
/consignee/countryYes
  • US
  • CAN
3The country code where the shipment will move to.
/residentialYes[True][False] / Boolean1Indicates whether the shipment will be delivered to a residential address.
/packagingTypeYes
  • BOX*
  • ENVELOPE
  • PAK
  • TUBE
  • EXPRESS_BOX
  • LARGE_BOX
  • MEDIUM_BOX
  • SMALL_BOX
  • FEDEX_EXTRA_LARGE_BOX*
  • PALLET*
  • 10KG_BOX*
  • 25KG_BOX*
n/a

The type of packaging used for the shipment.

Applies to the entire rate request. Multi-piece shipments must contain the same packaging type in order to be valid.

BOX should be used for customer provided packaging that does not fall into any other category.
Only FedEx shipments support FEDEX_EXTRA_LARGE_BOX package types.
10KG_BOX and 25KG_BOX are only supported for international shipments.
PALLET is only allowed for UPS international shipments.

/dropoffTypeYes
  • REGULAR_PICKUP
  • DROP_BOX
  • REQUEST_COURIER
n/aIndicates how the shipment will be tendered to the carrier. This field does not initiate any type of pickup or drop off, it simply indicates how the package will be tendered in order to provide the most accurate rates.
/warehouseCodeYesString20The warehouse (facility) you wish to get a rate for (TFM will provide this). Case sensitive.
/shipDateNoYYYY/MM/DD / Stringn/aRequested ship date for the shipment.
/packagesYesn/an/aPackages container node.
/packages/lengthCondFloat > 0n/a, rounding may be appliedThe length of the package, in inches. Required for packaging of type BOX*
/packages/widthCondFloat > 0n/a, rounding may be appliedThe width of the package, in inches. Required for packaging of type BOX*
/packages/heightCondFloat > 0n/a, rounding may be appliedThe height of the package, in inches. Required for packaging of type BOX*
/packages/weightYesFloat > 0n/a, rounding may be appliedThe weight of the package, in pounds.
/packages/qtyYesInteger > 0depends on carrier limits

The number of packages in the shipment that are identical in every way to this one.

Enter 1 for a single unique package.

/packages/standardUnitsNo[True][False] / Boolean1

Indicates whether units are standard (in/lbs) or metric (cm/kg).

Default value: true.

/packages/declaredValueNoInteger >= 100depends on carrier limitsDeclared value is covered up to the first $100 on a package by default. If you require additional insurance, enter a declared value higher than $100 for an additional surcharge.
/packages/dgInfoNon/an/a

Dangerous goods / hazardous materials container node.

Must be a contracted HazMat shipper to request dangerous goods.

/packages/dgInfo/regulationSetCond
  • IATA
  • DOT
  • ORMD
n/aThe regulatory set associated with regulated shipment. Must be the same across the entire shipment.
/packages/dgInfo/unNumCond'####' / String4The four digit UN number for the specified commodity.
/packages/dgInfo/classNumCondStringn/aThe hazard class associated to the specified commodity.
/packages/dgInfo/subriskClassNumCondStringn/aThe sub risk class associated with the specified commodity. Required if the field applies to the material by regulation.
/packages/dgInfo/properShippingNameCondStringn/aThe proper shipping name assigned by the regulating body.
/packages/dgInfo/technicalNameCondStringn/aThe technical name (when required) for the specified commodity.
/packages/dgInfo/transportModeCond
  • Ground
  • Passenger
  • Cargo
n/aDeclares that a package was prepared according to ground, passenger aircraft or cargo aircraft only.
/packages/dgInfo/packagingTypeCond
  • CYLINDER
  • FIBERBOARD
  • METAL BOX
  • PLASTIC BOX
  • PLASTIC DRUM
  • PLASTIC JERRICAN
  • PLASTIC PAIL
  • STEEL DRUM
  • STYROFOAM BOX
  • WOODEN BOX
  • OTHER
n/aThe type of package used to contain the regulated good.
/packages/dgInfo/regulatoryQuantityCond
  • FR
  • LQ
n/aIndicates the type of commodity. FR = Fully Regulated, LQ = Limited Quantity
/packages/dgInfo/packingInstructionCodeCondStringn/aThe packing instructions related to the chemical record. Required if the field applies to the material by regulation.
/packages/dgInfo/packagingGroupCond
  • I
  • II
  • III
n/aThe packing group category associated to the specified commodity. Required if the field applies to the material by regulation.
/packages/dgInfo/innerContainerTypeOptional
  • AluminiumBag
  • AluminiumCans
  • AluminiumTin
  • AluminiumTube
  • Earthenware
  • FiberBox
  • FiberCan
  • GlassAmpoule
  • GlassTube
  • MetalCans
  • MetalFlexibleTube
  • MetalTin
  • MetalTube
  • MultiWallPaperBag
  • PaperBag
  • PlasticBag
  • PlasticContainer
  • PlasticFlexibleTube
  • Receptable
n/aAn inner container packages inside of the packagingType.
/packages/dgInfo/accessibilityCond
  • ACCESSIBLE
  • INACCESSIBLE
n/aThe packing group category associated to the specified commodity. Required if the field applies to the material by regulation.
/packages/dgInfo/requiredLabelCondStringn/aThe required label identifying the type of hazardous material being shipped. e.g. 'NON FLAMMABLE GAS'
/packages/dgInfo/emergencyPhoneCondStringn/aA valid phone number to contact in case of an emergency during shipping.
/packages/dgInfo/internationalEmergencyPhoneCondStringn/aA valid phone number to contact in case of an emergency during shipping.
/packages/dgInfo/emergencyResponseRegistrantCondStringn/aThe emergency response registrant number
/packages/dgInfo/offerorCondStringn/aThe offeror name
/packages/dgInfo/signatoryContactNameCondString
The signatory contact name
/packages/dgInfo/signatoryTitleCondString
The signatory title
/packages/dgInfo/signatoryPlaceCondString
The location of the signatory.
/packages/dgInfo/packagingTypeQtyCondn/an/aPackaging type quantity container node.
/packages/dgInfo/packagingTypeQty/uomCond
  • cylinder
  • g
  • gallon
  • kg
  • kg G
  • L
  • ml
  • ounce
  • pint
  • pound
  • quart
n/aThe unit of measure used for the mass capacity of the regulated good.
/packages/dgInfo/packagingTypeQty/qtyCondFloat > 0.0n/a, rounding may be appliedThe numerical value of the mass capacity of the regulated good.
/customs/Cond

Customs container node
/customs/customs_valueCondInteger > 0n/aValue of package reported to customs

Required if:

  • FedEx International Shipment
  • Inbound International UPS Shipment
/customs/commodity_unitsCondInteger > 0n/aThe number of units in the package 

Required if:

  • FedEx International Shipment
  • Inbound International UPS Shipment
/customs/unit_valueCondInteger > 0n/a

The value of each commodity unit 

Required for FedEx International Shipment

/customs/unit_countCondInteger > 0n/a
/customs/part_numberCondString

Part number of the commodity being shipped

Required for inbound international UPS shipments.

/customs/descriptionCondString
Description of the commodity being shipped.
/customs/import_uomCond
  • BA (Barrel)
  • BE (Bundle)
  • BG (Bag)
  • BH (Bunch)
  • BOX
  • BT (Bolt)
  • BU (Butt)
  • CI (Canister)
  • CM (Centimeter)
  • CON (Container)
  • CR (Crate)
    CS (Case)
  • CT (Carton)
  • CY (Cylinder)
  • DOX (Dozen)
  • EA (Each)
  • EN (Envelope)
  • Ft (Feet)
  • KG (Kilogram)
  • KGS (Kilograms)
  • Pound (LB)
  • LBS (Pounds)
  • L (Liters)
  • M (Meter)
  • NMB (Number)
  • PA (Packet)
  • PAL (Pallet)
  • PC (Piece)
  • PCS (Pieces)
  • PL (Proof Liters)
  • PKG (Package)
  • PR (Pair)
  • PRS (Pairs)
  • RL (Roll)
  • SET (Set)
  • SME (Sq Meters)
  • SYD (SYD)
  • TU (Tube)
  • YD (Yard)

A description of the units of measure of the commodity.

Required for inbound international UPS shipments.


/customs/export_reasonCond
  • SALE
  • GIFT
  • SAMPLE
  • RETURN
  • REPAIR
  • INTERCOMPANYDATA

The reason the commodity is being exported.

Only required for inbound international UPS shipments.

/customs/origin_countryCondString2

The country code of the origin of the commodity being shipped.

/specialServicesNon/an/aSpecial services container node.
/specialServices/typeNo
  • COD
  • SIGNATURE_OPTION
  • SATURDAY_DELIVERY
n/aType of special service for the shipment. Numerically indexed if both are required.
/specialServices/additionalInfoNo
  • INDIRECT
  • DIRECT
  • ADULT
n/aType of signature option for the shipment. COD does not require additional information for a rate.
/carrierNo
  • FEDEX
  • UPS
  • USPS
n/aThe carrier for which a rate is being requested
/serviceNo
  • FEDEX_GROUND
  • GROUND_HOME_DELIVERY
  • FEDEX_EXPRESS_SAVER
  • FEDEX_2_DAY
  • FEDEX_2_DAY_AM
  • STANDARD_OVERNIGHT
  • PRIORITY_OVERNIGHT
  • FIRST_OVERNIGHT
  • INTERNATIONAL_PRIORITY
  • INTERNATIONAL_ECONOMY
  • 01 (UPS Next Day Air/UPS Express)
  • 02 (UPS 2nd Day Air/UPS Expedited)
  • 03 (UPS Ground)
  • 04 (UPS
  • 05 (UPS
  • 06 (UPS
  • 07 (UPS Worldwide Express)
  • 08 (UPS Worldwide Expedited)
  • 09 (UPS
  • 10
  • 11 (UPS Standard)
  • 12 (UPS 3 Day Select)
  • 13 (UPS Next Day Air Saver/UPS Express Saver)
  • 14 (UPS Next Day Air Early/ UPS Express Early)
  • 54 (UPS Worldwide Express Plus)
  • 59 (UPS 2nd Day Air AM)
  • 65 (UPS Express Saver / UPS Worldwide Saver)
  • 70 (UPS Acess Point Economy
  • usps_priority
  • usps_express
  • usps_first_class
n/a

A specified service for which a rate is being requested.

UPS codes are numeric strings. In parentheses are the services they correspond to.

A Note on HazMat shipping

We currently only support Hazardous Materials shipping with FedEx and this service is available only by contractual basis.

Examples

Using an Array
 <?php
/**
 * Parcel Rate Example (Using Array Format)
 */
$data = array(
	'shipper' => array(
		'state' => 'PA',
		'zip' => '15236',
		'country' => 'US',
	),
	'consignee' => array(
		'state' => 'PA',
		'zip' => '15129',
		'country' => 'US',
	),
	'residential' => TRUE,
	'packagingType' => 'BOX',
	'dropoffType' => 'REGULAR_PICKUP',
	'warehouseCode' => 'CODE',
	'packages' => array(
		array(
			'length' => '10',
			'width' => '10',
			'height' => '10',
			'weight' => '5',
			'declaredValue' => 400,
			'qty' => 12,
		),
		array(
			'length' => '24',
			'width' => '17',
			'height' => '10',
			'weight' => '12',
			'qty' => 3,
		),
	),
);
?>
Using an Array - HazMat
 <?php
/**
 * Parcel Rate Example - HazMat (Using Array Format)
 */
$data = array (
    'warehouseCode' => 'CODE',
    'shipper' => 
    array (
      'zip' => '15056',
      'country' => 'US',
      'state' => 'PA',
    ),
    'consignee' => 
    array (
      'zip' => '15236',
      'country' => 'US',
      'state' => 'PA',
    ),
    'packages' => 
    array (
      0 => 
      array (
        'id' => '',
        'length' => '20',
        'width' => '20',
        'height' => '20',
        'weight' => '15',
        'declaredValue' => '',
        'qty' => '1',
        'standardUnits' => '1',
        'dgInfo' => 
        array (
          'selectedKey' => '',
          'regulationSet' => 'IATA',
          'unNum' => '1002',
          'classNum' => '2.2',
          'subriskClassNum' => '2.2',
          'properShippingName' => 'Air, compressed',
          'technicalName' => '',
          'transportMode' => 'Ground',
          'packagingType' => 'CYLINDER',
          'innerContainerType' => '',
          'regulatoryQuantity' => '',
          'packingInstructionCode' => '200',
          'packagingGroup' => 'None',
          'accessibility' => 'ACCESSIBLE',
          'requiredLabel' => 'NON FLAMMABLE GAS',
          'emergencyPhone' => '8005551234',
          'intlEmergencyPhone' => '8005551234',
          'emergencyResponseRegistrant' => 'REGISTRANT_NUM',
          'offeror' => 'OFFEROR',
          'signatoryContactName' => 'SIGNATORY_CONTACT',
          'signatoryTitle' => 'SIGNATORY_TITLE',
          'signatoryPlace' => 'SIGNATORY_PLACE',
          'packagingTypeQty' => 
          array (
            'uom' => 'kg',
            'qty' => '1',
          ),
        ),
      ),
    ),
    'residential' => FALSE,
    'dropoffType' => 'REGULAR_PICKUP',
    'shipDate' => '',
    'asnEmail' => '',
    'packagingType' => 'BOX',
    'shipmentId' => '',
    'carrier' => 'FEDEX',
    'service' => 'FEDEX_GROUND',
);
?>
Using stdClass()
 <?php
/**
* Parcel Rate Example (Using stdClass() Format)
*/

// Base request node
$data = new stdClass();

// Shipper details
$data->shipper = new stdClass();
$data->shipper->state = 'NY';
$data->shipper->zip = '10980';
$data->shipper->country = 'US';


// Consignee details
$data->consignee = new stdClass();
$data->consignee->state = 'PA';
$data->consignee->zip = '15129';
$data->consignee->country = 'US';

// General shipment information
$data->residential = TRUE;
$data->packagingType = 'BOX';
$data->dropoffType = 'REGULAR_PICKUP';
$data->warehouseCode = 'CODE';
$data->shipDate = '2019/01/09';

// Packages container
$data->packages = array();

// First package in the shipment
$package = new stdClass();
$package->length = '10';
$package->width = '10';
$package->height = '10';
$package->weight = '10';
$package->declaredValue = 400;
$package->qty = 2;
	
// Add the package to the container
$data->packages[] = $package;

// Second package in the shipment
$package = new stdClass();
$package->length = '20';
$package->width = '45';
$package->height = '15';
$package->weight = '8';
$package->qty = 2;

// Add the package to the container
$data->packages[] = $package;
?>

Response Parameters

Parameter Name

Description

/body/parcelRatesContainer for returned parcel rates
/body/parcelRates/carrierName of the carrier
/body/parcelRates/shipperShipper zip code
/body/parcelRates/consigneeConsignee zip code
/body/parcelRates/shipDateDate the shipment is rated for
/body/parcelRates/shipmentTypeIndicates if the shipment is domestic or international
/body/parcelRates/ratingMethodThe method used to rate the package. DIM (dimensional) or ACTUAL may be returned. UPS does not return this value, but it can be inferred from the total billing weight vs. actual weight of the shipment.
/body/parcelRates/dimDivisorThe dimensional divisor that is used to calculate the shipment.
/body/parcelRates/billingWeightThe total weight that was used to calculate billing for the shipment.
/body/parcelRates/ratesContainer for returned rates for this carrier.
/body/parcelRates/rates/serviceTextual name of the service type.
/body/parcelRates/rates/serviceCodeCode used by the API to denote the service type.
/body/parcelRates/rates/deliveryContainer for delivery date and time information.
/body/parcelRates/rates/delivery/dayOfWeekDay of the week and date that the shipment will arrive by.
/body/parcelRates/rates/delivery/dateTimeTime of the day that the shipment will arrive by.
/body/parcelRates/rates/delivery/guaranteedIndicates whether the delivery day of week and date time are guaranteed or estimated. 1 = Guaranteed, 0 = Estimated.
/body/parcelRates/rates/baseChargeBase charge of the shipment.
/body/parcelRates/rates/discountDiscount amount that has been applied to the shipment.
/body/parcelRates/rates/surchargesContainer to hold surcharge information.
/body/parcelRates/rates/surcharges/typeType of surcharge that has been applied.
/body/parcelRates/rates/surcharges/amountMonetary amount of the surcharge.
/body/parcelRates/rates/totalSurchargesTotal monetary amount of all surcharges applied to the shipment
/body/parcelRates/rates/totalChargeTotal monetary charge for the shipment
/body/residential/

True if the address is determined to be residential.

[True][False] / Boolean

(only returned if rating for a UPS shipment, or if carrier/service are not specified)

Example

Example Response
 Array
(
    [body] => Array
        (
            [parcelRates] => Array
                (
                    [0] => Array
                        (
                            [carrier] => UPS
                            [shipper] => 10980
                            [consignee] => 15129
                            [shipDate] => 2019-01-09
                            [shipmentType] => DOMESTIC
                            [ratingMethod] => 
                            [dimDivisor] => 
                            [billingWeight] => 8.0
                            [rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [service] => UPS Ground
                                            [serviceCode] => 03
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Fri 01-11-2019
                                                    [dateTime] => 11:00 PM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 12.51
                                            [discount] => 6.94
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 3.95
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 35
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 1.19
                                                        )

                                                )

                                            [totalSurcharges] => 44.34
                                            [totalCharge] => 49.91
                                        )

                                    [1] => Array
                                        (
                                            [service] => UPS 3 Day Select
                                            [serviceCode] => 12
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Mon 01-14-2019
                                                    [dateTime] => 11:00 PM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 24.32
                                            [discount] => 13.64
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 4.55
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 98
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 1.8
                                                        )

                                                )

                                            [totalSurcharges] => 108.55
                                            [totalCharge] => 119.23
                                        )

                                    [2] => Array
                                        (
                                            [service] => UPS 2nd Day Air
                                            [serviceCode] => 02
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Fri 01-11-2019
                                                    [dateTime] => 11:00 PM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 32.71
                                            [discount] => 21.75
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 4.55
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 98
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 2.33
                                                        )

                                                )

                                            [totalSurcharges] => 109.08
                                            [totalCharge] => 120.04
                                        )

                                    [3] => Array
                                        (
                                            [service] => UPS Next Day Air Saver
                                            [serviceCode] => 13
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Thu 01-10-2019
                                                    [dateTime] => 3:00 PM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 93.01
                                            [discount] => 66.47
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 4.55
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 98
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 6.1
                                                        )

                                                )

                                            [totalSurcharges] => 112.85
                                            [totalCharge] => 139.39
                                        )

                                    [4] => Array
                                        (
                                            [service] => UPS Next Day Air Early
                                            [serviceCode] => 14
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Thu 01-10-2019
                                                    [dateTime] => 8:30 AM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 95.18
                                            [discount] => 1.24
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 4.55
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 98
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 8.11
                                                        )

                                                )

                                            [totalSurcharges] => 114.86
                                            [totalCharge] => 238.80
                                        )

                                    [5] => Array
                                        (
                                            [service] => UPS Next Day Air
                                            [serviceCode] => 01
                                            [delivery] => Array
                                                (
                                                    [dayOfWeek] => Thu 01-10-2019
                                                    [dateTime] => 10:30 AM
                                                    [guaranteed] => 1
                                                )

                                            [baseCharge] => 95.18
                                            [discount] => 67.98
                                            [surcharges] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [type] => RESIDENTIAL ADDRESS
                                                            [amount] => 4.55
                                                        )

                                                    [1] => Array
                                                        (
                                                            [type] => INSURANCE
                                                            [amount] => 4.2
                                                        )

                                                    [2] => Array
                                                        (
                                                            [type] => HAZMAT ACCESSORIAL
                                                            [amount] => 98
                                                        )

                                                    [3] => Array
                                                        (
                                                            [type] => FUEL
                                                            [amount] => 6.23
                                                        )

                                                )

                                            [totalSurcharges] => 112.98
                                            [totalCharge] => 140.18
                                        )

                                )

                        )

                )

        )

    [message] => Array
        (
        )

    [notice] => Array
        (
        )

)

Full Example

Example
<?php
/**
*Parcel Rate Full Example (Using Array Format)
*/
require_once "../../restClient.class.php";
 
$resource = "https://tms.targetfmi.com/index.php";
$user = "API_KEY";
$pass = "";
$separator = "?";
 
$rest = new restClient($resource, $user, $pass, $separator);
	
$data = array(
	'shipper' => array(
		'state' => 'PA',
		'zip' => '15236',
		'country' => 'US',
	),
	'consignee' => array(
		'state' => 'PA',
		'zip' => '15129',
		'country' => 'US',
	),
	'residential' => TRUE,
	'packagingType' => 'BOX',
	'dropoffType' => 'REGULAR_PICKUP',
	'warehouseCode' => 'CODE',
	'packages' => array(
		array(
			'length' => '10',
			'width' => '10',
			'height' => '10',
			'weight' => '5',
			'declaredValue' => 400,
			'qty' => 1,
		),
	),
);

$res = $rest->post("p=api&r=text&c=parcelRateRequest&m=getParcelRates", $data);

?>