Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Tcl) Walmart v3 Get All Feed StatusesReturns the feed statuses for all the specified Feed IDs. For more information, see https://developer.walmart.com/#/apicenter/marketPlace/latest#getAllFeedStatuses
load ./chilkat.dll # This example assumes the Chilkat API to have been previously unlocked. # See Global Unlock Sample for sample code. set http [new_CkHttp] # Implements the following CURL command: # curl -X GET \ # https://marketplace.walmartapis.com/v3/feeds?feedId={feedId}&limit={limit}&offset={offset} \ # -H 'WM_SVC.NAME: Walmart Marketplace' # -H 'WM_SEC.ACCESS_TOKEN: eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM.....' # -H 'WM_QOS.CORRELATION_ID: b3261d2d-028a-4ef7-8602-633c23200af6' # -H 'Content-Type: application/xml' # -H 'Accept: application/xml' CkHttp_SetRequestHeader $http "WM_QOS.CORRELATION_ID" "b3261d2d-028a-4ef7-8602-633c23200af6" CkHttp_SetRequestHeader $http "Content-Type" "application/xml" CkHttp_SetRequestHeader $http "WM_SEC.ACCESS_TOKEN" "eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM....." CkHttp_SetRequestHeader $http "Accept" "application/xml" CkHttp_SetRequestHeader $http "WM_SVC.NAME" "Walmart Marketplace" set sbResponseBody [new_CkStringBuilder] set success [CkHttp_QuickGetSb $http "https://marketplace.walmartapis.com/v3/feeds?feedId={feedId}&limit={limit}&offset={offset}" $sbResponseBody] if {$success == 0} then { puts [CkHttp_lastErrorText $http] delete_CkHttp $http delete_CkStringBuilder $sbResponseBody exit } set xmlResponse [new_CkXml] CkXml_LoadSb $xmlResponse $sbResponseBody 1 # Sample XML response: # (Sample code for parsing the XML response is shown below) # <?xml version="1.0" encoding="UTF-8" standalone="yes"?> # <ns2:list xmlns:ns2="http://walmart.com/"> # <ns2:totalResults>2</ns2:totalResults> # <ns2:offset>0</ns2:offset> # <ns2:limit>50</ns2:limit> # <ns2:results> # <ns2:feed> # <ns2:feedId>12234EGGT564YTEGFA@AQMBAQA</ns2:feedId> # <ns2:feedSource>MARKETPLACE_PARTNER</ns2:feedSource> # <ns2:feedType>item</ns2:feedType> # <ns2:partnerId>1413254255</ns2:partnerId> # <ns2:itemsReceived>1</ns2:itemsReceived> # <ns2:itemsSucceeded>1</ns2:itemsSucceeded> # <ns2:itemsFailed>0</ns2:itemsFailed> # <ns2:itemsProcessing>0</ns2:itemsProcessing> # <ns2:feedStatus>PROCESSED</ns2:feedStatus> # <ns2:feedDate>2018-07-20T21:56:12.605Z</ns2:feedDate> # <ns2:batchId>HP_REQUEST_BATCH</ns2:batchId> # <ns2:modifiedDtm>2018-07-20T21:56:17.948Z</ns2:modifiedDtm> # <ns2:fileName>ItemFeed99_ParadiseCounty_paperback.xml</ns2:fileName> # <ns2:itemDataErrorCount>0</ns2:itemDataErrorCount> # <ns2:itemSystemErrorCount>0</ns2:itemSystemErrorCount> # <ns2:itemTimeoutErrorCount>0</ns2:itemTimeoutErrorCount> # <ns2:channelType>WM_TEST</ns2:channelType> # </ns2:feed> # <ns2:feed> # <ns2:feedId>12234EGGT564YTEGFA@AQMBAQA</ns2:feedId> # <ns2:feedSource>MARKETPLACE_PARTNER</ns2:feedSource> # <ns2:feedType>item</ns2:feedType> # <ns2:partnerId>1413254255</ns2:partnerId> # <ns2:itemsReceived>1</ns2:itemsReceived> # <ns2:itemsSucceeded>1</ns2:itemsSucceeded> # <ns2:itemsFailed>0</ns2:itemsFailed> # <ns2:itemsProcessing>0</ns2:itemsProcessing> # <ns2:feedStatus>PROCESSED</ns2:feedStatus> # <ns2:feedDate>2018-07-20T21:56:12.605Z</ns2:feedDate> # <ns2:batchId>HP_REQUEST_BATCH</ns2:batchId> # <ns2:modifiedDtm>2018-07-20T21:56:17.948Z</ns2:modifiedDtm> # <ns2:fileName>ItemFeed99_ParadiseCounty_paperback.xml</ns2:fileName> # <ns2:itemDataErrorCount>0</ns2:itemDataErrorCount> # <ns2:itemSystemErrorCount>0</ns2:itemSystemErrorCount> # <ns2:itemTimeoutErrorCount>0</ns2:itemTimeoutErrorCount> # <ns2:channelType>WM_TEST</ns2:channelType> # </ns2:feed> # </ns2:results> # </ns2:list> # Sample code for parsing the XML response... # Use the following online tool to generate parsing code from sample XML: # Generate Parsing Code from XML set ns2_list_xmlns_ns2 [CkXml_getAttrValue $xmlResponse "xmlns:ns2"] set ns2_totalResults [CkXml_GetChildIntValue $xmlResponse "ns2:totalResults"] set ns2_offset [CkXml_GetChildIntValue $xmlResponse "ns2:offset"] set ns2_limit [CkXml_GetChildIntValue $xmlResponse "ns2:limit"] set i 0 set count_i [CkXml_NumChildrenHavingTag $xmlResponse "ns2:results|ns2:feed"] while {$i < $count_i} { CkXml_put_I $xmlResponse $i set ns2_feedId [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:feedId"] set ns2_feedSource [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:feedSource"] set ns2_feedType [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:feedType"] set ns2_partnerId [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:partnerId"] set ns2_itemsReceived [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemsReceived"] set ns2_itemsSucceeded [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemsSucceeded"] set ns2_itemsFailed [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemsFailed"] set ns2_itemsProcessing [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemsProcessing"] set ns2_feedStatus [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:feedStatus"] set ns2_feedDate [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:feedDate"] set ns2_batchId [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:batchId"] set ns2_modifiedDtm [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:modifiedDtm"] set ns2_fileName [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:fileName"] set ns2_itemDataErrorCount [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemDataErrorCount"] set ns2_itemSystemErrorCount [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemSystemErrorCount"] set ns2_itemTimeoutErrorCount [CkXml_GetChildIntValue $xmlResponse "ns2:results|ns2:feed[i]|ns2:itemTimeoutErrorCount"] set ns2_channelType [CkXml_getChildContent $xmlResponse "ns2:results|ns2:feed[i]|ns2:channelType"] set i [expr $i + 1] } delete_CkHttp $http delete_CkStringBuilder $sbResponseBody delete_CkXml $xmlResponse |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.