4


i have registered myself with usps.com/webtools and get username/password.
when i am sending test request to usps test server, i am getting error "Error getting USERID attribute"

http://testing.shippingapis.com/ShippingAPITest.dll?API=[API_Name]&XML=[XML_String_containing_User_ID]"

i am sending request like this (userid is dummy in this case)
http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=<userid>018BITOC5420</userid>
how to sent test request with xml userid?

user1553658
  • 41
  • 1
  • 1
  • 5

1 Answers1

9

Try this:

http://production.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=<ZipCodeLookupRequest USERID="xxxxxxx"><Address ID="0"><Address1></Address1><Address2>6406 Ivy Lane</Address2><City>Greenbelt</City><State>MD</State></Address></ZipCodeLookupRequest>

Source: https://www.usps.com/business/web-tools-apis/address-information-v3-1d.htm

atp
  • 30,132
  • 47
  • 125
  • 187
Sharondio
  • 2,605
  • 13
  • 16
  • 4
    FWIW, the sign-up instructions from USPS are *awful*, referencing links and documents that don't exist on the page referenced. They should just include a direct link to this documentation on the sign-up email or attach it as a PDF. – Sharondio Jul 26 '12 at 13:24
  • Thanks Sharondio, it is done now, i was also following same Development Guide and made some test requests but i was getting error saying "ZipCodeLookup is not a valid API name for this protocol". – user1553658 Jul 26 '12 at 13:58
  • Great It working fine , thank you if anybody face problem read https://www.usps.com/business/web-tools-apis/address-information-v3-1d.htm#_Toc131231413 OR https://www.usps.com/business/web-tools-apis/development-guide-v3-1c.pdf –  Sep 06 '13 at 13:39