RequestedService Property
Service type for which the shipping rate is requested.
Object Oriented Interface
public function getRequestedService(); public function setRequestedService($value);
Procedural Interface
inship_uspsrates_get($res, 33 ); inship_uspsrates_set($res, 33, $value );
Default Value
0
Remarks
If you send a request with the RequestedService set to svcPriority, after a call to GetRates, the price to send a Priority Mail package will be returned in ServiceListNetCharge. However, if you set the RequestedService to stUnspecified, the rates for all service types will be returned.
The RequestedService is used to filter the postage rates that are returned by service type. If you are only interested in Priority Mail rates, there is no need to receive Parcel Post or Library mail, for instance. Rates will be returned in the ServiceListNetCharge array property, with the service it corresponds located in the ServiceType and ServiceTypeDescription properties.
This property is only valid for domestic shipments.
The stUnspecified value is not valid when PostageProvider is set to ppEndicia.
The available service types for USPS include:
Valid values for USPS are:
stUnspecified (0) | |
stUSPSExpress (70) | |
stUSPSFirstClass (71) | |
stUSPSPriority (72) | |
stUSPSParcelPost (73) | |
stUSPSMedia (75) | |
stUSPSLibrary (76) | |
stUSPSOnline (77) (USPS Only) | |
stUSPSParcelSelect (79) (Endicia only) | |
stUSPSCriticalMail (80) (Endicia only) | |
stUSPSStandardMail (81) (Endicia only) |
Please note that the RequestedService stUSPSBoundPrintedMatter (74) is no longer supported by USPS or Endicia.
Please note that some ShipmentSpecialServices flags such as Hold For Pickup, Premium Service (Sunday/Holiday), and Commercial will affect the rate.
Also, please note that all ServiceListNetCharges are also dependant on the SenderZipCode, SenderZipCode (or SenderCountryCode for international shipments), PackageWeight, PackageSize and PackageType. Priority Mail packages larger than 1 cubic foot in size also require PackageLength, PackageWidth, and PackageHeight to accurately calculate the postage.
Note that when using any of the commercial service types, you must use the CommercialRate configuration setting to retrieve the commercial rate for the postage service at index i.
Data Type
Integer