Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to send test request to usps test server to access ZipCodeLookup API?


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?

like image 740
user1553658 Avatar asked Jan 17 '23 00:01

user1553658


1 Answers

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

like image 103
Sharondio Avatar answered Jan 31 '23 01:01

Sharondio