<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: USPS API PROC HTTP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707695#M217321</link>
    <description>&lt;P&gt;The site only accepts https: queries.&lt;/P&gt;
&lt;P&gt;The API User manual recommends using POST as the request method&lt;/P&gt;
&lt;P&gt;specifying the full URL in the PROC HTTP statement causes a SAS syntax error.&amp;nbsp; Also, this will not solve root problem since I would like to make the requests dynamic and, if possible, automated from a database query by using the in= clause.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 16:11:26 GMT</pubDate>
    <dc:creator>Jim_Cooper_hmsa</dc:creator>
    <dc:date>2020-12-22T16:11:26Z</dc:date>
    <item>
      <title>USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707036#M217071</link>
      <description>&lt;P&gt;I am trying to write a PROC HTTP program to validate Zip+4 for mailing addresses using PROC HTTP and the USPS API webtools.&amp;nbsp;&amp;nbsp;I have a successful HTTP URL that I need to replicate with PROC HTTP.&amp;nbsp; The program creates an XML library to format the addresses for validation but I am getting an XML syntax error when run the PROC HTTP.&amp;nbsp; The URL I am trying to reproduce returns an XML response record without error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;&lt;A href="http://production.shippingapis.com/ShippingAPI.dll?API=Verify" target="_blank"&gt;http://production.shippingapis.com/ShippingAPI.dll?API=Verify&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;&amp;amp;XML=&amp;lt;&lt;SPAN class="SpellE"&gt;AddressValidateRequest&lt;/SPAN&gt;&amp;nbsp;USERID="165THEQU4205"&amp;gt;&amp;lt;Address ID="0"&amp;gt;&amp;lt;Address1&amp;gt;&amp;lt;/Address1&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;&amp;lt;Address2&amp;gt;6406 Ivy Lane&amp;lt;/Address2&amp;gt;&amp;lt;City&amp;gt;Greenbelt&amp;lt;/City&amp;gt;&amp;lt;State&amp;gt;MD&amp;lt;/State&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;&amp;lt;Zip5&amp;gt;&amp;lt;/Zip5&amp;gt;&amp;lt;Zip4&amp;gt;&amp;lt;/Zip4&amp;gt;&amp;lt;/Address&amp;gt;&amp;lt;/&lt;SPAN class="SpellE"&gt;AddressValidateRequest&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;test program that returns an XML Error Response Message:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;Error&amp;gt;&amp;lt;Number&amp;gt;80040B19&amp;lt;/Number&amp;gt;&amp;lt;Description&amp;gt;XML Syntax Error: Please check the XML request to see if it can be parsed.&amp;lt;/Description&amp;gt;&amp;lt;Source&amp;gt;USPSCOM::DoAuth&amp;lt;/Source&amp;gt;&amp;lt;/Error&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="code"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="code"&gt;&lt;SPAN&gt;SAS code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;libname test xml "/sasuser.v94/AddressValidateRequest.xml";&lt;BR /&gt;filename in "/sasuser.v94/AddressValidateRequest.xml";&lt;BR /&gt;filename out "/sasuser.v94/AddressValidateResponse.xml";&lt;/P&gt;
&lt;P&gt;data test.Address;&lt;BR /&gt;Revision=1; ID=1; Address1=''; Address2='&lt;SPAN&gt;6406 Ivy Lane&lt;/SPAN&gt;'; City='&lt;SPAN&gt;Greenbelt&lt;/SPAN&gt;';&lt;BR /&gt;State='&lt;SPAN&gt;MD&lt;/SPAN&gt;';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;* Pass information to USPS API webtool for processing;&lt;BR /&gt;proc http &lt;BR /&gt;url="&lt;A href="https://stg-secure.shippingapis.com/ShippingAPI.dll?API=AddressValidateRequest" target="_blank"&gt;https://stg-secure.shippingapis.com/ShippingAPI.dll?API=AddressValidateRequest&lt;/A&gt;" &lt;BR /&gt;webusername="165THEQU4205"&lt;BR /&gt;webpassword="120RW00US168" &lt;BR /&gt;method="POST"&lt;BR /&gt;in=in &lt;BR /&gt;out=out;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 18:05:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707036#M217071</guid>
      <dc:creator>Jim_Cooper_hmsa</dc:creator>
      <dc:date>2020-12-18T18:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707328#M217160</link>
      <description>&lt;P&gt;I don't see where &lt;FONT face="courier new,courier"&gt;&amp;amp;xml i&lt;/FONT&gt;s used.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 00:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707328#M217160</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-12-21T00:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707348#M217166</link>
      <description>&lt;P&gt;Oh sorry. You formatted your question badly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The link is&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier" size="2"&gt;http://production.shippingapis.com/ShippingAPI.dll?API=Verify&amp;amp;XML=&amp;lt;AddressValidateRequest USERID="165THEQU4205"&amp;gt;&amp;lt;Address ID="0"&amp;gt;&amp;lt;Address1&amp;gt;&amp;lt;/Address1&amp;gt;&amp;lt;Address2&amp;gt;6406 Ivy Lane&amp;lt;/Address2&amp;gt;&amp;lt;City&amp;gt;Greenbelt&amp;lt;/City&amp;gt;&amp;lt;State&amp;gt;MD&amp;lt;/State&amp;gt;&amp;lt;Zip5&amp;gt;&amp;lt;/Zip5&amp;gt;&amp;lt;Zip4&amp;gt;&amp;lt;/Zip4&amp;gt;&amp;lt;/Address&amp;gt;&amp;lt;/AddressValidateRequest&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 02:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707348#M217166</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-12-21T02:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707368#M217173</link>
      <description>&lt;P style="line-height: 1.71429; font-family: Arial, Helvetica, sans-serif;"&gt;What happens if you use http instead of https?&lt;/P&gt;
&lt;P&gt;What happens if you use method GET?&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;What happens if you use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;proc http url='&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;A href="http://production.shippingapis.com/ShippingAPI.dll?API=Verify&amp;amp;XML=&amp;lt;AddressValidateRequest" target="_blank"&gt;http://production.shippingapis.com/ShippingAPI.dll?API=Verify&amp;amp;XML=&amp;lt;AddressValidateRequest&lt;/A&gt; USERID="165THEQU4205"&amp;gt;&amp;lt;Address ID="0"&amp;gt;&amp;lt;Address1&amp;gt;&amp;lt;/Address1&amp;gt;&amp;lt;Address2&amp;gt;6406 Ivy Lane&amp;lt;/Address2&amp;gt;&amp;lt;City&amp;gt;Greenbelt&amp;lt;/City&amp;gt;&amp;lt;State&amp;gt;MD&amp;lt;/State&amp;gt;&amp;lt;Zip5&amp;gt;&amp;lt;/Zip5&amp;gt;&amp;lt;Zip4&amp;gt;&amp;lt;/Zip4&amp;gt;&amp;lt;/Address&amp;gt;&amp;lt;/AddressValidateRequest&amp;gt;'&lt;/FONT&gt;&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 06:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707368#M217173</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-12-21T06:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707534#M217252</link>
      <description>Chris, Yes the question was formatted badly.  Let me restate:&lt;BR /&gt;&lt;BR /&gt;I am trying to create a process where I can send one or more addresses to the USPS API for validating addresses and correct the ZIP+4 codes using PROC HTTP.  The purpose of this test is to take this HTTP request:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://production.shippingapis.com/ShippingAPI.dll?API=Verify" target="_blank"&gt;http://production.shippingapis.com/ShippingAPI.dll?API=Verify&lt;/A&gt;&lt;BR /&gt;&amp;amp;XML=&lt;ADDRESSVALIDATEREQUEST userid="165THEQU4205"&gt;&lt;ADDRESS id="0"&gt;&lt;ADDRESS1&gt;&lt;/ADDRESS1&gt;&lt;BR /&gt;&lt;ADDRESS2&gt;6406 Ivy Lane&lt;/ADDRESS2&gt;&lt;CITY&gt;Greenbelt&lt;/CITY&gt;&lt;STATE&gt;MD&lt;/STATE&gt;&lt;BR /&gt;&lt;ZIP5&gt;&lt;/ZIP5&gt;&lt;ZIP4&gt;&lt;/ZIP4&gt;&lt;/ADDRESS&gt;&lt;/ADDRESSVALIDATEREQUEST&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and pass it from a PROC HTTP statement.&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:22:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707534#M217252</guid>
      <dc:creator>Jim_Cooper_hmsa</dc:creator>
      <dc:date>2020-12-21T17:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707695#M217321</link>
      <description>&lt;P&gt;The site only accepts https: queries.&lt;/P&gt;
&lt;P&gt;The API User manual recommends using POST as the request method&lt;/P&gt;
&lt;P&gt;specifying the full URL in the PROC HTTP statement causes a SAS syntax error.&amp;nbsp; Also, this will not solve root problem since I would like to make the requests dynamic and, if possible, automated from a database query by using the in= clause.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707695#M217321</guid>
      <dc:creator>Jim_Cooper_hmsa</dc:creator>
      <dc:date>2020-12-22T16:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: USPS API PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707796#M217368</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; The site only accepts https: queries.&amp;nbsp;The API User manual recommends using POST as the request method&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Pasting&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;A href="http://production.shippingapis.com/ShippingAPI.dll?API=Verify&amp;amp;XML=%3CAddressValidateRequest" target="_blank" rel="nofollow noopener noreferrer"&gt;http://production.shippingapis.com/ShippingAPI.dll?API=Verify&amp;amp;XML=&amp;lt;AddressValidateRequest&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;USERID="165THEQU4205"&amp;gt;&amp;lt;Address ID="0"&amp;gt;&amp;lt;Address1&amp;gt;&amp;lt;/Address1&amp;gt;&amp;lt;Address2&amp;gt;6406 Ivy Lane&amp;lt;/Address2&amp;gt;&amp;lt;City&amp;gt;Greenbelt&amp;lt;/City&amp;gt;&amp;lt;State&amp;gt;MD&amp;lt;/State&amp;gt;&amp;lt;Zip5&amp;gt;&amp;lt;/Zip5&amp;gt;&amp;lt;Zip4&amp;gt;&amp;lt;/Zip4&amp;gt;&amp;lt;/Address&amp;gt;&amp;lt;/AddressValidateRequest&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;in a browser works, so maybe the constraints are not as hard as they seem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;&amp;gt; Also, this will not solve root problem since I would like to make the requests dynamic &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can still make the query dynamic, for example with a call execute.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't run proc http, so these were just ideas for you to test. Feel free to ignore &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 01:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USPS-API-PROC-HTTP/m-p/707796#M217368</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-12-23T01:13:04Z</dc:date>
    </item>
  </channel>
</rss>

