【问题标题】:Trying to use the USPS Api for address validation in postman get an error尝试在邮递员中使用 USPS Api 进行地址验证时出错
【发布时间】:2020-12-09 03:11:56
【问题描述】:

我正在使用 postman 中的 post 请求,以根据 usps api 验证地址:

<AddressValidateRequest USERID="123ITRS04217">
<Revision>1</Revision>
<Address ID="0">
<Address1>SUITE K</Address1>
<Address2>29851 Aventura</Address2>
<City/>
<State>CA</State>
<Zip5>92688</Zip5>
<Zip4/>
</Address>
</AddressValidateRequest>

但我收到此错误:

80040B19 XML 语法错误:请检查 XML 请求是否可以解析。 USPSCOM::DoAuth

xml 对我来说看起来不错,不确定这里的问题是什么

【问题讨论】:

    标签: xmlhttprequest usps


    【解决方案1】:

    以下内容在 Postman 中作为 GET 请求工作:

    https://secure.shippingapis.com/ShippingAPI.dll?API=Verify&XML=<AddressValidateRequest USERID="YOUR USERID HERE"><Revision>1</Revision><Address ID="0"><Address1/><Address2>STREET ADDRESS HERE</Address2><City/><State>2 LETTER STATE CODE</State><Zip5>FIVE DIGIT ZIP CODE</Zip5><Zip4/></Address></AddressValidateRequest>
    

    请记住将您的值替换为: 您的用户名在这里 街道地址在这里 2 字母州代码 五位数邮政编码

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-23
      • 1970-01-01
      • 2017-05-19
      • 1970-01-01
      相关资源
      最近更新 更多