我已经使用 usps.com/webtools 注册并获得用户名/密码
当我向usps测试服务器发送测试请求时,我收到错误“获取USERID属性时出错”
http://testing.shippingapis.com/ShippingAPITest.dll?API=[API_Name]&XML=[XML_String_containing_User_ID]"
我发送这样的请求(在这种情况下用户ID是假的)
http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=
<userid>
018BITOC5420</userid>
如何使用xml userid发送测试请求?
答案 0 :(得分:5)
试试这个:
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>
来源:https://www.usps.com/business/web-tools-apis/address-information-v3-1d.htm