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

VB.NET 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
Jira
Lightspeed
MYOB
Magento
Mailgun

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
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
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

 

 

 

(VB.NET) Walmart V3 API - Get All Released Orders

Retrieves all the orders with line items that are in the "created" status, that is, these orders have been released from the Walmart Order Management System to the seller for processing. The released orders are the orders that are ready for a seller to fulfill.

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

Chilkat .NET Downloads

Chilkat .NET Assemblies

Chilkat for .NET Core

Chilkat for Mono

' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http

http.Accept = "application/json"

' Setting the Login and Password properties to the clientId and clientSecret
' will cause the Basic Auth header to be added (i.e. BaseEncode64(clientId:clientSecret))
http.Login = "clientId"
http.Password = "clientSecret"
http.BasicAuth = True

http.SetRequestHeader("Content-Type","application/json")
http.SetRequestHeader("WM_QOS.CORRELATION_ID","b3261d2d-028a-4ef7-8602-633c23200af6")
' Use the access token obtained from this example:  Walmart v3 API Get OAuth2 Access Token using Client Credentials
http.SetRequestHeader("WM_SEC.ACCESS_TOKEN","eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM.....")
http.SetRequestHeader("WM_SVC.NAME","Walmart Marketplace")

http.SetUrlVar("createdStartDate","2020-01-16T10:30:15Z")
http.SetUrlVar("limit","200")
' Can also be 3PLFulfilled
http.SetUrlVar("shippingProgramType","SellerFulfilled")
http.SetUrlVar("shipNodeType","TWO_DAY")

Dim resp As Chilkat.HttpResponse = http.QuickRequest("GET","/v3/orders/released?createdStartDate={$createdStartDate}&limit={$limit}&shippingProgramType={$shippingProgramType}&shipNodeType={$shipNodeType}")
If (http.LastMethodSuccess <> True) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("Response Status Code: " & resp.StatusCode)

Dim jsonResponse As New Chilkat.JsonObject
jsonResponse.Load(resp.BodyStr)
jsonResponse.EmitCompact = False
Debug.WriteLine(jsonResponse.Emit())

If (resp.StatusCode <> 200) Then
    Debug.WriteLine("Failed.")

    Exit Sub
End If




' Sample output...
' (See the parsing code below..)
' 
' Use the this online tool to generate parsing code from sample JSON: 
' Generate Parsing Code from JSON


' {
'   "list": {
'     "meta": {
'       "totalCount": 25228,
'       "limit": 10,
'       "nextCursor": "?limit=10&hasMoreElements=true&soIndex=25228&poIndex=10&sellerId=152&createdStartDate=2019-04-02T00:00:00.000Z&createdEndDate=2019-09-26T16:05:49.648Z"
'     },
'     "elements": {
'       "order": [
'         {
'           "purchaseOrderId": "4792701510371",
'           "customerOrderId": "5401973367419",
'           "customerEmailId": "47B81ACD2C62434DBE64F47B9E1F7630@relay.walmart.com",
'           "orderDate": 1569513584000,
'           "shippingInfo": {
'             "phone": "2134488377",
'             "estimatedDeliveryDate": 1569870000000,
'             "estimatedShipDate": 1569553200000,
'             "methodCode": "Express",
'             "postalAddress": {
'               "name": "Julio Hernandez",
'               "address1": "9713 pleasant view dr",
'               "address2": null,
'               "city": "Rancho Cucamonga",
'               "state": "CA",
'               "postalCode": "91701",
'               "country": "USA",
'               "addressType": "RESIDENTIAL"
'             }
'           },
'           "orderLines": {
'             "orderLine": [
'               {
'                 "lineNumber": "1",
'                 "item": {
'                   "productName": "Refurbished Lenovo YB1-X90F Grey Yoga Book with WiFi 10.1\" Touchscreen Tablet Android 6.0.1",
'                   "sku": "VO190403007727R"
'                 },
'                 "charges": {
'                   "charge": [
'                     {
'                       "chargeType": "PRODUCT",
'                       "chargeName": "ItemPrice",
'                       "chargeAmount": {
'                         "currency": "USD",
'                         "amount": 259
'                       },
'                       "tax": {
'                         "taxName": "Tax1",
'                         "taxAmount": {
'                           "currency": "USD",
'                           "amount": 20.07
'                         }
'                       }
'                     },
'                     {
'                       "chargeType": "FEE",
'                       "chargeName": "Fee",
'                       "chargeAmount": {
'                         "currency": "USD",
'                         "amount": 0
'                       },
'                       "tax": {
'                         "taxName": "Electronic Waste Recycling Fee",
'                         "taxAmount": {
'                           "currency": "USD",
'                           "amount": 5
'                         }
'                       }
'                     }
'                   ]
'                 },
'                 "orderLineQuantity": {
'                   "unitOfMeasurement": "EACH",
'                   "amount": "1"
'                 },
'                 "statusDate": 1569513724000,
'                 "orderLineStatuses": {
'                   "orderLineStatus": [
'                     {
'                       "status": "Acknowledged",
'                       "statusQuantity": {
'                         "unitOfMeasurement": "EACH",
'                         "amount": "1"
'                       },
'                       "cancellationReason": null,
'                       "trackingInfo": null,
'                       "returnCenterAddress": null
'                     }
'                   ]
'                 },
'                 "refund": null,
'                 "fulfillment": {
'                   "fulfillmentOption": "S2H",
'                   "shipMethod": "EXPEDITED",
'                   "storeId": null,
'                   "pickUpDateTime": 1569870000000,
'                   "pickUpBy": null,
'                   "shippingProgramType": "TWO_DAY"
'                 }
'               }
'             ]
'           },
'           "shipNode": {
'             "type": "3PLFulfilled"
'           }
'         }
'       ]
'     }
'   }
' }
' 



Dim purchaseOrderId As String
Dim customerOrderId As String
Dim customerEmailId As String
Dim orderDate As Integer
Dim shippingInfoPhone As String
Dim shippingInfoEstimatedDeliveryDate As Integer
Dim shippingInfoEstimatedShipDate As Integer
Dim shippingInfoMethodCode As String
Dim shippingInfoPostalAddressName As String
Dim shippingInfoPostalAddressAddress1 As String
Dim shippingInfoPostalAddressAddress2 As String
Dim shippingInfoPostalAddressCity As String
Dim shippingInfoPostalAddressState As String
Dim shippingInfoPostalAddressPostalCode As String
Dim shippingInfoPostalAddressCountry As String
Dim shippingInfoPostalAddressAddressType As String
Dim shipNodeType As String
Dim j As Integer
Dim count_j As Integer
Dim lineNumber As String
Dim itemProductName As String
Dim itemSku As String
Dim orderLineQuantityUnitOfMeasurement As String
Dim orderLineQuantityAmount As String
Dim statusDate As Integer
Dim refund As String
Dim fulfillmentFulfillmentOption As String
Dim fulfillmentShipMethod As String
Dim fulfillmentStoreId As String
Dim fulfillmentPickUpDateTime As Integer
Dim fulfillmentPickUpBy As String
Dim fulfillmentShippingProgramType As String
Dim k As Integer
Dim count_k As Integer
Dim chargeType As String
Dim chargeName As String
Dim chargeAmountCurrency As String
Dim chargeAmountAmount As Integer
Dim taxTaxName As String
Dim taxTaxAmountCurrency As String
Dim taxTaxAmountAmount As String
Dim status As String
Dim statusQuantityUnitOfMeasurement As String
Dim statusQuantityAmount As String
Dim cancellationReason As String
Dim trackingInfo As String
Dim returnCenterAddress As String

Dim listMetaTotalCount As Integer = jsonResponse.IntOf("list.meta.totalCount")
Dim listMetaLimit As Integer = jsonResponse.IntOf("list.meta.limit")
Dim listMetaNextCursor As String = jsonResponse.StringOf("list.meta.nextCursor")
Dim i As Integer = 0
Dim count_i As Integer = jsonResponse.SizeOfArray("list.elements.order")
While i < count_i
    jsonResponse.I = i
    purchaseOrderId = jsonResponse.StringOf("list.elements.order[i].purchaseOrderId")
    customerOrderId = jsonResponse.StringOf("list.elements.order[i].customerOrderId")
    customerEmailId = jsonResponse.StringOf("list.elements.order[i].customerEmailId")
    orderDate = jsonResponse.IntOf("list.elements.order[i].orderDate")
    shippingInfoPhone = jsonResponse.StringOf("list.elements.order[i].shippingInfo.phone")
    shippingInfoEstimatedDeliveryDate = jsonResponse.IntOf("list.elements.order[i].shippingInfo.estimatedDeliveryDate")
    shippingInfoEstimatedShipDate = jsonResponse.IntOf("list.elements.order[i].shippingInfo.estimatedShipDate")
    shippingInfoMethodCode = jsonResponse.StringOf("list.elements.order[i].shippingInfo.methodCode")
    shippingInfoPostalAddressName = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.name")
    shippingInfoPostalAddressAddress1 = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.address1")
    shippingInfoPostalAddressAddress2 = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.address2")
    shippingInfoPostalAddressCity = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.city")
    shippingInfoPostalAddressState = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.state")
    shippingInfoPostalAddressPostalCode = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.postalCode")
    shippingInfoPostalAddressCountry = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.country")
    shippingInfoPostalAddressAddressType = jsonResponse.StringOf("list.elements.order[i].shippingInfo.postalAddress.addressType")
    shipNodeType = jsonResponse.StringOf("list.elements.order[i].shipNode.type")
    j = 0
    count_j = jsonResponse.SizeOfArray("list.elements.order[i].orderLines.orderLine")
    While j < count_j
        jsonResponse.J = j
        lineNumber = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].lineNumber")
        itemProductName = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].item.productName")
        itemSku = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].item.sku")
        orderLineQuantityUnitOfMeasurement = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineQuantity.unitOfMeasurement")
        orderLineQuantityAmount = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineQuantity.amount")
        statusDate = jsonResponse.IntOf("list.elements.order[i].orderLines.orderLine[j].statusDate")
        refund = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].refund")
        fulfillmentFulfillmentOption = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.fulfillmentOption")
        fulfillmentShipMethod = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.shipMethod")
        fulfillmentStoreId = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.storeId")
        fulfillmentPickUpDateTime = jsonResponse.IntOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.pickUpDateTime")
        fulfillmentPickUpBy = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.pickUpBy")
        fulfillmentShippingProgramType = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].fulfillment.shippingProgramType")
        k = 0
        count_k = jsonResponse.SizeOfArray("list.elements.order[i].orderLines.orderLine[j].charges.charge")
        While k < count_k
            jsonResponse.K = k
            chargeType = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].chargeType")
            chargeName = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].chargeName")
            chargeAmountCurrency = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].chargeAmount.currency")
            chargeAmountAmount = jsonResponse.IntOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].chargeAmount.amount")
            taxTaxName = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].tax.taxName")
            taxTaxAmountCurrency = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].tax.taxAmount.currency")
            taxTaxAmountAmount = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].charges.charge[k].tax.taxAmount.amount")
            k = k + 1
        End While
        k = 0
        count_k = jsonResponse.SizeOfArray("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus")
        While k < count_k
            jsonResponse.K = k
            status = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].status")
            statusQuantityUnitOfMeasurement = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].statusQuantity.unitOfMeasurement")
            statusQuantityAmount = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].statusQuantity.amount")
            cancellationReason = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].cancellationReason")
            trackingInfo = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].trackingInfo")
            returnCenterAddress = jsonResponse.StringOf("list.elements.order[i].orderLines.orderLine[j].orderLineStatuses.orderLineStatus[k].returnCenterAddress")
            k = k + 1
        End While
        j = j + 1
    End While
    i = i + 1
End While

 

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