Sdeeeeeeeeeeee
Sdeeeeeeeeeeee

Reputation: 87

Trying to use the USPS Api for address validation in postman get an error

I am using a post request in postman in order to validate the address against 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>

but I get this error:

80040B19 XML Syntax Error: Please check the XML request to see if it can be parsed. USPSCOM::DoAuth

The xml looks good to me, not sure what the issue here is

Upvotes: 1

Views: 1226

Answers (1)

rohit
rohit

Reputation: 11

the following worked in Postman as a GET request:

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>

Remember to substitute your values for: YOUR USERID HERE STREET ADDRESS HERE 2 LETTER STATE CODE FIVE DIGIT ZIP CODE

Upvotes: 1

Related Questions