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
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
To ship packages via UPS SurePost service, you must first have a UPS Account along with a UPS Developer Account to gain access to their XML API.
https://www.ups.com/upsdeveloperkit
The example by @ayesh is the format of the xml payload you would send with your request for Rates, which with the correct SERVICE CODES, will return SurePost specific rates (if available to your ShipTo destination).
But ...
SurePost is not normally available to low volume UPS shippers and probably wouldn't be available to new shippers (not until enough volume is determined by UPS). SurePost must be added to an existing UPS account, which is done by contacting UPS and filling out additional applications.
Hope that helps!
It is interesting that SurePost is out of the list of service codes in the official docs. So the only info about the service code of this method is this topic. Thanks for that!
The mentioned 9x codes are working now.
And yes, you need to switch from the Shop
request option to the Rate
to fetch rates for a needed code with additional Service
block (example for the JSON API:
"Service": {
"Code": "93",
"Description": ""
}
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