I'm doing work for a client that has a custom shopping cart for their website. They were shipping only via FedEx but needed to add the US Postal Service as a shipping option. They need to get rates for shipping and needed me to implement this for their site. While the XML API was fairly straightforward I did run into a problem when testing.
I have never worked directly with USPS web services but surprisingly found it very easy to implement and was even more shocked at their service. I had a problem and was able to actually call an 800 number after 7 PM and speak with a person almost immediately.
Now I did run into one problem, hence the call. I like to thoroughly test my code in testing environments before I hit production servers. I went to test my Rate request and kept receiving an error:
API Authorization failure. RateV3 is not a valid API name for this protocol.
I checked back over their documentation and made sure my XML was correct. Everything seemed in order. I emailed support with this error information and got a reply telling me that I was approved for their production servers. They did not really address the issue. Anyway, the end result is what I found out was that their test servers are really not designed for actual testing beyond their preauthorized requests. In other words they want you to send a canned request with only the User ID changed to their test sever. If this works you start sending tests to production servers. While I'd prefer to hit test servers while still verifying my code this is how it work.
If you need rate, tracking or address validation check out the USPS web tools
. They implement a fairly simple XML request and response API that is decently documented and free.
| posted on Wednesday, April 30, 2008 3:56 PM