Skip to content
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.

USPS international letter rates not available #465

Open
ravenchorus opened this issue Jan 11, 2017 · 0 comments
Open

USPS international letter rates not available #465

ravenchorus opened this issue Jan 11, 2017 · 0 comments

Comments

@ravenchorus
Copy link

Apologies if this is not the right place to ask this.

I'm based in the US and I'm attempting to get USPS international letter rates via the API but am not able to retrieve them. Domestic letter rates come back just fine for US addresses but for international addresses the cheapest rate I can get back is USPS First-Class Package International.

I've had a ticket open with USPS API support for months and they've been absolutely useless.

I'm testing using an origination address in Portland, Oregon and a destination in Dubai, UAE. A 2 ounce 6x6x0.5 package gives me a rate of $13.

When I use the USPS-supplied XML HTTP request in a browser or via curl, I get:

<Service ID="14">
	<Pounds>0</Pounds>
	<Ounces>5</Ounces>
	<Machinable>True</Machinable>
	<MailType>LETTER</MailType>
	<Container>ENVELOPE</Container>
	<Size>REGULAR</Size>
	<Width>.5</Width>
	<Length>9</Length>
	<Height>6</Height>
	<Girth>0</Girth>
	<Country>UNITED ARAB EMIRATES</Country>
	<Postage>5.83</Postage>
	<ExtraServices />
	<ValueOfContents>10.00</ValueOfContents>
	<InsComment>SERVICE</InsComment>
	<SvcCommitments>Varies by destination</SvcCommitments>
	<SvcDescription>First-Class Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; International Large Envelope</SvcDescription>
	<MaxDimensions>Max. length 15", height 12" or thickness 3/4"</MaxDimensions>
	<MaxWeight>4</MaxWeight>
</Service>

Here's the URL used to retrieve the above. Replace "XXXXXXXXXXXX" with your USPS API login.

http://production.shippingapis.com/ShippingApi.dll?API=IntlRateV2&XML= <IntlRateV2Request USERID="XXXXXXXXXXXX"><Revision>2</Revision><Package ID="0"><Pounds>0</Pounds><Ounces>5</Ounces><Machinable>True</Machinable><MailType>LETTER</MailType><ValueOfContents>10</ValueOfContents><Country>United Arab Emirates</Country><Container>Envelope</Container><Size>Regular</Size><Width>.5</Width><Length>9</Length><Height>6</Height><Girth>0</Girth><OriginZip>22201</OriginZip><CommercialFlag>N</CommercialFlag><ExtraServices><ExtraService>1</ExtraService></ExtraServices></Package></IntlRateV2Request>

I suspect this is an issue with ActiveShipping because the rate is available via that URL but not in my application. My first thought was that letter rates are simply not used by the gem except that I am able to get them for US addresses.

Is this a bug, a known limitation, or something else? I'm happy to provide further details as needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant