Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

SQL Server Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(SQL Server) Walmart v3 Get All Feed Statuses

Returns the feed statuses for all the specified Feed IDs.

For more information, see https://developer.walmart.com/#/apicenter/marketPlace/latest#getAllFeedStatuses

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- 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'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'WM_QOS.CORRELATION_ID', 'b3261d2d-028a-4ef7-8602-633c23200af6'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/xml'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'WM_SEC.ACCESS_TOKEN', 'eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM.....'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/xml'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'WM_SVC.NAME', 'Walmart Marketplace'

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @http, 'QuickGetSb', @success OUT, 'https://marketplace.walmartapis.com/v3/feeds?feedId={feedId}&limit={limit}&offset={offset}', @sbResponseBody
    IF @success = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END

    DECLARE @xmlResponse int
    -- Use "Chilkat_9_5_0.Xml" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Xml', @xmlResponse OUT

    EXEC sp_OAMethod @xmlResponse, 'LoadSb', @success OUT, @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

    DECLARE @ns2_list_xmlns_ns2 nvarchar(4000)

    DECLARE @ns2_totalResults int

    DECLARE @ns2_offset int

    DECLARE @ns2_limit int

    DECLARE @i int

    DECLARE @count_i int

    DECLARE @ns2_feedId nvarchar(4000)

    DECLARE @ns2_feedSource nvarchar(4000)

    DECLARE @ns2_feedType nvarchar(4000)

    DECLARE @ns2_partnerId int

    DECLARE @ns2_itemsReceived int

    DECLARE @ns2_itemsSucceeded int

    DECLARE @ns2_itemsFailed int

    DECLARE @ns2_itemsProcessing int

    DECLARE @ns2_feedStatus nvarchar(4000)

    DECLARE @ns2_feedDate nvarchar(4000)

    DECLARE @ns2_batchId nvarchar(4000)

    DECLARE @ns2_modifiedDtm nvarchar(4000)

    DECLARE @ns2_fileName nvarchar(4000)

    DECLARE @ns2_itemDataErrorCount int

    DECLARE @ns2_itemSystemErrorCount int

    DECLARE @ns2_itemTimeoutErrorCount int

    DECLARE @ns2_channelType nvarchar(4000)

    EXEC sp_OAMethod @xmlResponse, 'GetAttrValue', @ns2_list_xmlns_ns2 OUT, 'xmlns:ns2'
    EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_totalResults OUT, 'ns2:totalResults'
    EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_offset OUT, 'ns2:offset'
    EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_limit OUT, 'ns2:limit'
    SELECT @i = 0
    EXEC sp_OAMethod @xmlResponse, 'NumChildrenHavingTag', @count_i OUT, 'ns2:results|ns2:feed'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @xmlResponse, 'I', @i
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_feedId OUT, 'ns2:results|ns2:feed[i]|ns2:feedId'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_feedSource OUT, 'ns2:results|ns2:feed[i]|ns2:feedSource'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_feedType OUT, 'ns2:results|ns2:feed[i]|ns2:feedType'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_partnerId OUT, 'ns2:results|ns2:feed[i]|ns2:partnerId'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemsReceived OUT, 'ns2:results|ns2:feed[i]|ns2:itemsReceived'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemsSucceeded OUT, 'ns2:results|ns2:feed[i]|ns2:itemsSucceeded'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemsFailed OUT, 'ns2:results|ns2:feed[i]|ns2:itemsFailed'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemsProcessing OUT, 'ns2:results|ns2:feed[i]|ns2:itemsProcessing'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_feedStatus OUT, 'ns2:results|ns2:feed[i]|ns2:feedStatus'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_feedDate OUT, 'ns2:results|ns2:feed[i]|ns2:feedDate'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_batchId OUT, 'ns2:results|ns2:feed[i]|ns2:batchId'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_modifiedDtm OUT, 'ns2:results|ns2:feed[i]|ns2:modifiedDtm'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_fileName OUT, 'ns2:results|ns2:feed[i]|ns2:fileName'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemDataErrorCount OUT, 'ns2:results|ns2:feed[i]|ns2:itemDataErrorCount'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemSystemErrorCount OUT, 'ns2:results|ns2:feed[i]|ns2:itemSystemErrorCount'
        EXEC sp_OAMethod @xmlResponse, 'GetChildIntValue', @ns2_itemTimeoutErrorCount OUT, 'ns2:results|ns2:feed[i]|ns2:itemTimeoutErrorCount'
        EXEC sp_OAMethod @xmlResponse, 'GetChildContent', @ns2_channelType OUT, 'ns2:results|ns2:feed[i]|ns2:channelType'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @xmlResponse


END
GO

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.