USPS Shipping API Standard Post Machinable tag

321 views Asked by At

Ok so I've been trying to days now to figure out how to use the USPS shipping API to get the shipping rate of a package under the service "Standard Post". I can do media mail, priority mail and first class but every time I try to do "Standard Post" I get this error:

Machinable value must be 'True' or 'False' for service type Retail Gound and service type All.

If I then add either True or False I now get this error:

The element 'Package' has invalid child element 'Machinable'. List of possible elements expected: 'ZipOrigination'.

Here is the request that I've been toying with:

https://secure.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4Request USERID="(omitted)">

<Package ID="standard"> 
<Service>Standard Post</Service> 
<FirstClassMailType>PARCEL</FirstClassMailType>
<Machinable>True</Machinable>
<ZipOrigination>44121</ZipOrigination> 
<ZipDestination>99352</ZipDestination> 
<Pounds>6</Pounds> 
<Ounces>8</Ounces> 
<Container>VARIABLE</Container> 
<Size>LARGE</Size> 
<Width>17</Width> 
<Length>13</Length> 
<Height>11</Height> 
<Girth>1</Girth> 
</Package>


</RateV4Request> 

1

There are 1 answers

0
talha_ah On

Try this sample request:

XML=<RateV4Request USERID=""><Revision>3</Revision><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>22201</ZipOrigination><ZipDestination>26301</ZipDestination><Pounds>8</Pounds><Ounces>2</Ounces><Container></Container><Width>2</Width><Length>3</Length><Height>5</Height><Girth>1</Girth><Machinable>FALSE</Machinable></Package></RateV4Request>