Pergunta

I have a small problem. I have a script that gets rates from USPS, but the problem is that when i try to put package type "LARGE", i get error:

"Warning! Dimensions are missing for package; unable to calculate postage. Additional Info: All dimensions must be greater than 0."

The funny part is that i send the dimensions of the package. The xml request folows:

<RateV4Request USERID="XXXXXXXXXX" PASSWORD="XXXXXXXXXXXX"> 
    <Revision>2</Revision> 
    <Package ID="0"> 
        <Service>Parcel</Service> 
        <ZipOrigination>92008</ZipOrigination> 
        <ZipDestination>92056</ZipDestination> 
        <Pounds>14</Pounds> 
        <Ounces>3</Ounces> 
        <Container>VARIABLE</Container> 
        <Size>Large</Size> 
        <Width>2.0</Width> 
        <Length>10.0</Length> 
        <Height>1.0</Height> 
        <Value>60.00</Value> 
        <Machinable>FALSE</Machinable> 
    </Package> 
</RateV4Request>

What i miss there? Thanks.

Foi útil?

Solução

Been a while since I worked with USPS API, but i think this comes when you have the size set to large, but have not mentioned Girth as part of the dimensions. Check it that helps..

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top