<?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: Proc HTTP Method=&amp;quot;Put&amp;quot; Running Correctly But Not Updating Product in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788855#M81397</link>
    <description>&lt;P&gt;According &lt;A href="https://developer.bigcommerce.com/api-reference/store-management/catalog/products/updateproduct" target="_self"&gt;to the bigcommerce doc&lt;/A&gt; and what I see in your code, it seems you're doing the right things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to simplify the call by including just the field you want to update (ex: weight) and see if that helps. Perhaps use a tool like Postman to verify that all works as expected before running in SAS.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 13:23:57 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2022-01-07T13:23:57Z</dc:date>
    <item>
      <title>Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788761#M81396</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am trying to test updating a product using a Proc HTTP Put statement, but not having much luck. The code runs fine and I get a successful response, however what I am trying to update is not getting updated. Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc json out="XXXXXXXX\SAS\SAS Output\Test.json";&lt;BR /&gt;export XX / nosastags;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;filename test 'XXXXXXXX\SAS\SAS Output\SAS Output\test.json';&lt;/P&gt;&lt;P&gt;filename resp 'XXXXXXXX\SAS\SAS Output\SAS Output\resp.txt';&lt;/P&gt;&lt;P&gt;filename head 'XXXXXXXX\SAS\SAS Output\SAS Output\head.txt';&lt;BR /&gt;&lt;BR /&gt;proc http&lt;BR /&gt;method="put"&lt;BR /&gt;url="&lt;A href="https://api.bigcommerce.com/stores/XXXXXXX/v3/catalog/products/114" target="_blank" rel="noopener"&gt;https://api.bigcommerce.com/stores/XXXXXXX/v3/catalog/products/114&lt;/A&gt;"&lt;BR /&gt;ct="application/json"&lt;BR /&gt;in=test&lt;BR /&gt;out=resp headerout=head;&lt;BR /&gt;headers&lt;BR /&gt;"Accept"="application/json"&lt;BR /&gt;"x-auth-token"="XXXXXXXXXXXXXX";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the headers (head.txt), response (resp.txt) and the json file I am using in the in statement (test.json) for proc http.&lt;BR /&gt;&lt;BR /&gt;Any idea why it would be running fine but not updating the weight from 50 to 100?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 01:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788761#M81396</guid>
      <dc:creator>CR-Horton</dc:creator>
      <dc:date>2022-01-07T01:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788855#M81397</link>
      <description>&lt;P&gt;According &lt;A href="https://developer.bigcommerce.com/api-reference/store-management/catalog/products/updateproduct" target="_self"&gt;to the bigcommerce doc&lt;/A&gt; and what I see in your code, it seems you're doing the right things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to simplify the call by including just the field you want to update (ex: weight) and see if that helps. Perhaps use a tool like Postman to verify that all works as expected before running in SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 13:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788855#M81397</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-01-07T13:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788945#M81399</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I thought the same and did try and limit it to just the weight field and ended up with the same result.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I sent a test request using the tool at the bottom of the page &lt;A href="https://developer.bigcommerce.com/api-reference/store-management/catalog/products/updateproduct" target="_self"&gt;here&lt;/A&gt; and it worked successfully. I also verified I have the appropriate permissions. Just strange the response I am getting without anything successfully updating.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 19:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788945#M81399</guid>
      <dc:creator>CR-Horton</dc:creator>
      <dc:date>2022-01-07T19:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788953#M81400</link>
      <description>&lt;P&gt;Quick update - I was able to get this to work by removing the array wrapper "[" and "]" Is there a way to suppress this in the proc JSON statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Interesting.png" style="width: 341px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67210i1D923DC91A2C8B01/image-size/large?v=v2&amp;amp;px=999" role="button" title="Interesting.png" alt="Interesting.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Updating my proc JSON statement to the following works, but I don't want to have to define each specific value since in many cases I will be dealing with dozens at a time.&lt;BR /&gt;proc json out="XXXXX\SAS\SAS Output\Test.json" pretty nosastags;&lt;BR /&gt;write open object;&lt;BR /&gt;write values "id" "114";&lt;BR /&gt;write values "weight" "300";&lt;BR /&gt;write close ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;I am hoping for a single statement that will suppress the array so I only have an object.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 21:26:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/788953#M81400</guid>
      <dc:creator>CR-Horton</dc:creator>
      <dc:date>2022-01-07T21:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/791937#M81472</link>
      <description>Following up on my previous message.&lt;BR /&gt;&lt;BR /&gt;Just curious is there is a way to suppress the array wrapper "[" and "]" within the proc JSON output file.</description>
      <pubDate>Mon, 24 Jan 2022 17:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/791937#M81472</guid>
      <dc:creator>CR-Horton</dc:creator>
      <dc:date>2022-01-24T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc HTTP Method="Put" Running Correctly But Not Updating Product</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/792012#M81477</link>
      <description>&lt;P&gt;As you have found, there does not appear to be a way to get the export statement to give you the JSON format you want. While not ideal, one possibility is to write a program to strip off the outer array characters after the JSON file is created.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Another possibility might be to write a program to dynamically create the PROC JSON code that utilizes WRITE statements to produce the desired output. A proof-of-concept of this technique is in &lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-JSON-create-a-hierarchical-file/m-p/413679#M101279" target="_self"&gt;this post.&amp;nbsp;&lt;/A&gt;I do not know enough about your requirements to be able to say if the dynamically generated PROC JSON code will work in your case.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 22:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-HTTP-Method-quot-Put-quot-Running-Correctly-But-Not/m-p/792012#M81477</guid>
      <dc:creator>BillM_SAS</dc:creator>
      <dc:date>2022-01-24T22:14:42Z</dc:date>
    </item>
  </channel>
</rss>

