I am trying to integrate UPS SurePost API in PHP to get the Rates for SurePost services. I have no idea where to get the API from and how to integrate it.
Any help would be greatly appreciated.
Thanks
Jayesh Vaya's answer is correct, but here is further detail. There are 4 separate service codes for SurePost rates.
92: UPS SurePost Less than 1LB
93: UPS SurePost 1LB or greater
94: UPS SurePost BPM
95: UPS SurePost Media Mail
When shipping with service code 92, the unit of measure of the package weight must be in ounces instead of pounds, rounded to the tens decimal place. I found that the ounces unit of measure code was "OZS".
Note that your account with UPS must be enabled to ship with SurePost. The documentation for the SurePost Web Services API is available upon request from your UPS account executive. Here is the UPS documentation for using their API: Rating Service API
I hope this helps anyone who wasn't sure how to start, like I was yesterday! :)
Service Code 93 Is for Surepost
<AccessLicenseNumber>xxxx</AccessLicenseNumber>
<UserId>xxxx</UserId>
<Password>xxxx</Password>
</AccessRequest>
<RatingServiceSelectionRequest>
<Request>
<TransactionReference>
<CustomerContext>Bare Bones Rate Request</CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Rate</RequestAction>
<RequestOption>Rate</RequestOption>
</Request>
<PickupType>
<Code>02</Code>
</PickupType>
<Shipment>
<Shipper>
<Address>
<PostalCode>123456</PostalCode>
<CountryCode>US</CountryCode>
</Address>
<ShipperNumber>123456</ShipperNumber>
</Shipper>
<ShipTo>
<Address>
<PostalCode>123123</PostalCode>
<StateProvinceCode>AL</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
</ShipTo>
<ShipFrom>
<Address>
<PostalCode>123123</PostalCode>
<StateProvinceCode>123</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
</ShipFrom>
<Service>
<Code>93</Code>
</Service>
<Package>
<PackagingType>
<Code>02</Code>
</PackagingType>
<Description>Rate Shopping</Description>
<Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>20</Length><Width>10</Width><Height>10</Height></Dimensions>
<PackageWeight><UnitOfMeasurement>
<Code>LBS</Code>
</UnitOfMeasurement>
<Weight>20.20</Weight>
</PackageWeight>
</Package>
<RateInformation><NegotiatedRatesIndicator/></RateInformation></Shipment></RatingServiceSelectionRequest>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With