Response from USPS Speed ​​Calculator

I need to get shipping cost from USPS.

I signed up with them, got the user ID and tried to use an XML sample request, as shown on the page - https://www.usps.com/webtools/htm/Rate-Calculators-v1-3.htm , but keeping the following answer about an error.

<Error> <Number>80040b1a</Number> <Description>API Authorization failure. RateV4 is not a valid API name for this protocol.</Description> <Source>UspsCom::DoAuth</Source> 

I can’t understand where I’m missing the point. Google also did not help: - (

I pass the API name as RateV4. I also tried with the international delivery API - IntlRateV2. And yes, I tried Secure https://secure.shippingapis.com/ShippingAPITest.dll api. And I sent a letter to customer support. Nothing worked.

Once this basic thing works, I plan to get classes and use custom serialization to serialize my request and then deserialize the response. That would be better than using XML directly. But this is likely to be more appropriate, as another question. Now the main occupation is the problem. Thanks

+8
c # web-services usps
source share
3 answers

This means that the server you are targeting does not support RateV4. I think you need to use the production server for RateV4 even when running the tests.

+7
source share

Currently, no version of the Rate API is running on USPS test servers (as noted in CountMurphy in a previous comment). However, you need several successful API requests on the test server before your account is approved to access the server. After a few years ago with USPS, they pointed me to the TrackV2 API certification. It also gives you access to the Rate API.

Here are two examples of TrackV2 requests I received from USPS support. Be sure to include the actual value of USERID. You must use these exact label numbers.

Example # 1

 http://production.shippingapis.com/ShippingAPITest.dll?API=TrackV2 &XML=<TrackRequest USERID="xxxxxxxx"> <TrackID ID="EJ958083578US"></TrackID></TrackRequest> 

Example # 2

 http://production.shippingapis.com/ShippingAPITest.dll?API=TrackV2 &XML=<TrackRequest USERID="xxxxxxxx"> <TrackID ID="EJ958088694US"></TrackID></TrackRequest> 
+2
source share

When you try V2, what you get

 <Error> <Number>80040b1a</Number> <Description>API Disabled: RateV2. </Description> <Source>UspsCom::DoAuth</Source> 

+1
source share

All Articles