USPS Web Tools API Issue with Regional Rate Boxes

If you’re programming for the USPS Web Tools for the Regional Rate A, B and C boxes and get the error:
REGIONALRATEBOXA is an invalid container type for a REGULAR package and PRIORITY service.

You need to change the Service to PRIORITY COMMERCIAL. This isn’t in the documentation and no-one at the technical support center will know the answer. It took three weeks of fighting this error to figure it out.

Sample with error:
<RateV4Request USERID="SECRET" PASSWORD="xxxxxxxxx">
<Package ID="0">
<Service>PRIORITY</Service>
<ZipOrigination>20852</ZipOrigination>
<ZipDestination>53110</ZipDestination>
<Pounds>15</Pounds><Ounces>11</Ounces>
<Container>REGIONALRATEBOXA</Container>
<Size>REGULAR</Size>
<Machinable>True</Machinable>
</Package>
</RateV4Request>

<RateV4Response>
<Package ID="0">
<Error>
<Number>-2147219407</Number>
<Source>DomesticRatesV4;clsRateV4.ValidateContainer;RateEngineV4.ProcessRequest</Source>
<Description>REGIONALRATEBOXA is an invalid container type for a REGULAR package and PRIORITY service.</Description>
<HelpFile></HelpFile>
<HelpContext>1000440</HelpContext>
</Error>
</Package>
</RateV4Response>


If done with priority commercial will get a price:
<RateV4Request USERID="SECRET" PASSWORD="xxxxxxxxx">
<Package ID="0">
<Service>PRIORITY COMMERCIAL</Service>
<ZipOrigination>20852</ZipOrigination>
<ZipDestination>53110</ZipDestination>
<Pounds>15</Pounds><Ounces>11</Ounces>
<Container>REGIONALRATEBOXA</Container>
<Size>REGULAR</Size>
<Machinable>True</Machinable>
</Package>
</RateV4Request>


Solves the problem with these two related errors as well:
REGIONALRATEBOXB is an invalid container type for a REGULAR package and PRIORITY service.
REGIONALRATEBOXC is an invalid container type for a REGULAR package and PRIORITY service.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.