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

PowerBuilder 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

 

 

 

(PowerBuilder) Ecwid - Search Orders

See more Ecwid Examples

Search or filter orders in an Ecwid store. The response provides full details of the found orders.

For more information, see https://api-docs.ecwid.com/reference/orders#search-orders

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_JsonToken
oleobject loo_Params
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Id
string ls_Subtotal
string ls_Total_str
string ls_GiftCardRedemption
string ls_TotalBeforeGiftCardRedemption
integer li_GiftCardDoubleSpending
string ls_UsdTotal
string ls_Tax
string ls_PaymentMethod
string ls_PaymentStatus
string ls_FulfillmentStatus
string ls_VendorOrderNumber
integer li_OrderNumber
string ls_RefererUrl
string ls_GlobalReferer
string ls_CreateDate
string ls_UpdateDate
integer li_CreateTimestamp
integer li_UpdateTimestamp
integer li_Hidden
string ls_OrderComments
string ls_PrivateAdminNotes
string ls_Email
string ls_IpAddress
integer li_CustomerId
integer li_CustomerGroupId
string ls_CustomerGroup
integer li_CustomerTaxExempt
string ls_CustomerTaxId
integer li_CustomerTaxIdValid
integer li_ReversedTaxApplied
integer li_Discount
integer li_CouponDiscount
integer li_VolumeDiscount
integer li_MembershipBasedDiscount
integer li_TotalAndMembershipBasedDiscount
integer li_DiscountCouponId
string ls_DiscountCouponName
string ls_DiscountCouponCode
string ls_DiscountCouponDiscountType
string ls_DiscountCouponStatus
integer li_DiscountCouponDiscount
string ls_DiscountCouponLaunchDate
string ls_DiscountCouponUsesLimit
string ls_DiscountCouponApplicationLimit
string ls_DiscountCouponCreationDate
string ls_DiscountCouponUpdateDate
integer li_DiscountCouponOrderCount
string ls_RefundedAmount
string ls_BillingPersonName
string ls_BillingPersonCompanyName
string ls_BillingPersonStreet
string ls_BillingPersonCity
string ls_BillingPersonCountryCode
string ls_BillingPersonCountryName
string ls_BillingPersonPostalCode
string ls_BillingPersonStateOrProvinceCode
string ls_BillingPersonStateOrProvinceName
string ls_BillingPersonPhone
string ls_ShippingPersonName
string ls_ShippingPersonCompanyName
string ls_ShippingPersonStreet
string ls_ShippingPersonCity
string ls_ShippingPersonCountryCode
string ls_ShippingPersonCountryName
string ls_ShippingPersonPostalCode
string ls_ShippingPersonStateOrProvinceCode
string ls_ShippingPersonStateOrProvinceName
string ls_ShippingPersonPhone
string ls_ShippingOptionShippingCarrierName
string ls_ShippingOptionShippingMethodName
string ls_ShippingOptionShippingRate
string ls_ShippingOptionEstimatedTransitTime
integer li_ShippingOptionIsPickup
string ls_HandlingFeeName
integer li_HandlingFeeValue
string ls_HandlingFeeDescription
string ls_PaymentModule
string ls_AdditionalInfoGoogle_customer_id
integer li_AcceptMarketing
string ls_RefererId
integer li_DisableAllCustomerNotifications
integer li_ExternalFulfillment
integer li_PricesIncludeTax
integer j
integer li_Count_j
integer li_Value
string ls_V_type
string ls_Base
integer li_OrderTotal
integer li_Id_int
integer li_ProductId
integer li_CategoryId
integer li_Price
integer li_ProductPrice
string ls_Sku
integer li_Quantity
string ls_ShortDescription
integer li_Shipping
integer li_QuantityInStock
string ls_Name
integer li_IsShippingRequired
integer li_Weight
integer li_TrackQuantity
integer li_FixedShippingRateOnly
string ls_ImageUrl
string ls_SmallThumbnailUrl
string ls_HdThumbnailUrl
integer li_FixedShippingRate
integer li_Digital
integer li_CouponApplied
integer li_DimensionsLength
integer li_DimensionsWidth
integer li_DimensionsHeight
string ls_CouponAmount
integer li_SubscriptionId
string ls_RecurringChargeSettingsRecurringInterval
integer li_RecurringChargeSettingsRecurringIntervalCount
integer k
integer li_Count_k
string ls_Value_str
oleobject loo_Json1
integer li_I1
integer li_Count_i1
string ls_StrVal
string ls_SelectionTitle
integer li_SelectionModifier
string ls_SelectionModifierType
string ls_TaxOnDiscountedSubtotal
integer li_TaxOnShipping
integer li_IncludeInPrice
integer li_DiscountInfoValue
string ls_DiscountInfoType
string ls_DiscountInfoBase
integer li_DiscountInfoOrderTotal
string ls_Date
string ls_Source
string ls_Reason
string ls_Amount
integer li_Length
integer li_Width
integer li_Height
string ls_Weight_str
string ls_DeclaredValue
string ls_Created
string ls_ShipToName
string ls_ShipToCompanyName
string ls_ShipToStreet
string ls_ShipToCity
string ls_ShipToCountryCode
string ls_ShipToCountryName
string ls_ShipToPostalCode
string ls_ShipToStateOrProvinceCode
string ls_ShipToStateOrProvinceName
string ls_ShipToPhone
string ls_ShipFromCompanyName
string ls_ShipFromStreet
string ls_ShipFromCity
string ls_ShipFromCountryCode
string ls_ShipFromCountryName
string ls_ShipFromPostalCode
string ls_ShipFromStateOrProvinceCode
string ls_ShipFromStateOrProvinceName
string ls_ShipFromPhone
string ls_ParcelWeight
integer li_ParcelWeightUnit
integer li_ParcelWidth
integer li_ParcelHeight
integer li_ParcelLength
integer li_ParcelDimensionUnit
integer li_ShippingServiceCarrier
integer li_ShippingServiceCarrierName
string ls_ShippingServiceCarrierServiceName
string ls_ShippingServiceCarrierServiceCode
string ls_TrackingTracking_number
string ls_TrackingTracking_url
integer li_TrackingEstimatedDays
string ls_ShippingLabelLabel_url
string ls_ShippingLabelCommercial_invoice_url
string ls_CustomerInputType
string ls_Title
string ls_OrderDetailsDisplaySection
string ls_OrderBy
integer li_Total
integer li_Count
integer li_Offset
integer li_Limit
integer i
integer li_Count_i

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

loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Implements the following CURL command:

// curl --request GET \
//      --url 'https://app.ecwid.com/api/v3/storeId/orders?token=token' \
//      --header 'Accept: application/json'

// Use the following online tool to generate HTTP code from a CURL command
// Convert a cURL Command to HTTP Source Code

// Load the access token previously obtained in Ecwid Get Access Token
loo_JsonToken = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JsonToken.ConnectToNewObject("Chilkat.JsonObject")

loo_JsonToken.LoadFile("qa_data/tokens/ecwid.json")

loo_Http.SetRequestHeader("Accept","application/json")

loo_Params = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_Params.ConnectToNewObject("Chilkat.JsonObject")

loo_Params.UpdateInt("limit",100)
loo_Params.UpdateString("email","joe@example.com")
loo_Params.UpdateString("token",loo_JsonToken.StringOf("access_token"))

loo_Resp = loo_Http.QuickRequestParams("GET","https://app.ecwid.com/api/v3/storeId/orders",loo_Params)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_JsonToken
    destroy loo_Params
    return
end if

loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")

loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Resp.StatusCode
destroy loo_Resp

Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode <> 200 then
    Write-Debug "Failed."
    destroy loo_Http
    destroy loo_JsonToken
    destroy loo_Params
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "total": 1,
//   "count": 1,
//   "offset": 0,
//   "limit": 100,
//   "items": [
//     {
//       "id": "XJ12H",
//       "subtotal": 1076.64,
//       "total": 2014.97,
//       "giftCardRedemption": 2.23,
//       "totalBeforeGiftCardRedemption": 2.23,
//       "giftCardDoubleSpending": false,
//       "usdTotal": 2014.97,
//       "tax": 488.48,
//       "paymentMethod": "Credit or debit card (Mollie)",
//       "paymentStatus": "PARTIALLY_REFUNDED",
//       "fulfillmentStatus": "DELIVERED",
//       "vendorOrderNumber": "XJ12H",
//       "orderNumber": 1082727626,
//       "refererUrl": "https://mdemo.ecwid.com/",
//       "globalReferer": "https://my.ecwid.com/",
//       "createDate": "2018-05-31 15:08:36 +0000",
//       "updateDate": "2018-05-31 15:09:35 +0000",
//       "createTimestamp": 1527779316,
//       "updateTimestamp": 1527779375,
//       "hidden": false,
//       "orderComments": "Test order comments",
//       "privateAdminNotes": "Must be delivered till Sunday.",
//       "email": "mscott@gmail.com",
//       "ipAddress": "123.431.234.243",
//       "customerId": 40201284,
//       "customerGroupId": 12345,
//       "customerGroup": "Gold",
//       "customerTaxExempt": false,
//       "customerTaxId": "",
//       "customerTaxIdValid": false,
//       "reversedTaxApplied": false,
//       "discount": 4,
//       "couponDiscount": 22,
//       "volumeDiscount": 4,
//       "membershipBasedDiscount": 0,
//       "totalAndMembershipBasedDiscount": 0,
//       "customDiscount": [
//       ],
//       "discountCoupon": {
//         "id": 29567026,
//         "name": "API Testing",
//         "code": "APITESTING",
//         "discountType": "ABS",
//         "status": "ACTIVE",
//         "discount": 22,
//         "launchDate": "2018-05-24 20:00:00 +0000",
//         "usesLimit": "UNLIMITED",
//         "applicationLimit": "UNLIMITED",
//         "creationDate": "2018-05-31 15:08:33 +0000",
//         "updateDate": "2018-05-24 13:40:32 +0000",
//         "orderCount": 0
//       },
//       "discountInfo": [
//         {
//           "value": 4,
//           "type": "ABS",
//           "base": "ON_TOTAL",
//           "orderTotal": 1
//         }
//       ],
//       "items": [
//         {
//           "id": 140273658,
//           "productId": 66722487,
//           "categoryId": 19563207,
//           "price": 1060,
//           "productPrice": 1000,
//           "sku": "ABCA-IAC",
//           "quantity": 1,
//           "shortDescription": "",
//           "tax": 331.01,
//           "shipping": 0,
//           "quantityInStock": 0,
//           "name": "iMac",
//           "isShippingRequired": true,
//           "weight": 0,
//           "trackQuantity": false,
//           "fixedShippingRateOnly": false,
//           "imageUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/391870914.jpg",
//           "smallThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/650638292.jpg",
//           "hdThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/650638293.jpg",
//           "fixedShippingRate": 0,
//           "digital": false,
//           "couponApplied": true,
//           "selectedOptions": [
//             {
//               "name": "Price-Optimizer",
//               "value": "6",
//               "valuesArray": [
//                 "6"
//               ],
//               "selections": [
//                 {
//                   "selectionTitle": "6",
//                   "selectionModifier": 6,
//                   "selectionModifierType": "PERCENT"
//                 }
//               ],
//               "type": "CHOICE"
//             }
//           ],
//           "taxes": [
//             {
//               "name": "State tax",
//               "value": 12,
//               "total": 124.13,
//               "taxOnDiscountedSubtotal": 124.13,
//               "taxOnShipping": 0,
//               "includeInPrice": false
//             },
//             {
//               "name": "TVA",
//               "value": 20,
//               "total": 206.88,
//               "taxOnDiscountedSubtotal": 206.88,
//               "taxOnShipping": 0,
//               "includeInPrice": true
//             }
//           ],
//           "dimensions": {
//             "length": 0,
//             "width": 0,
//             "height": 0
//           },
//           "couponAmount": 21.66,
//           "discounts": [
//             {
//               "discountInfo": {
//                 "value": 4,
//                 "type": "ABS",
//                 "base": "ON_TOTAL",
//                 "orderTotal": 1
//               },
//               "total": 3.94
//             }
//           ]
//         },
//         {
//           "id": 140273659,
//           "productId": 66821181,
//           "categoryId": 0,
//           "price": 16.64,
//           "productPrice": 16,
//           "sku": "001001",
//           "quantity": 1,
//           "shortDescription": "This sturdy white, glossy ceramic mug is an essential to your cupboard. This brawny version of ceramic mugs shows it’s ...",
//           "tax": 157.47,
//           "shipping": 471.85,
//           "quantityInStock": 0,
//           "name": "Mug",
//           "isShippingRequired": true,
//           "weight": 0.4,
//           "trackQuantity": false,
//           "fixedShippingRateOnly": false,
//           "imageUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/389900000.jpg",
//           "smallThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/475772545.jpg",
//           "hdThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/408631478.jpg",
//           "fixedShippingRate": 0,
//           "digital": false,
//           "couponApplied": true,
//           "selectedOptions": [
//             {
//               "name": "Color",
//               "value": "White",
//               "valuesArray": [
//                 "White"
//               ],
//               "selections": [
//                 {
//                   "selectionTitle": "White",
//                   "selectionModifier": 0,
//                   "selectionModifierType": "ABSOLUTE"
//                 }
//               ],
//               "type": "CHOICE"
//             },
//             {
//               "name": "Size",
//               "value": "11oz",
//               "valuesArray": [
//                 "11oz"
//               ],
//               "selections": [
//                 {
//                   "selectionTitle": "11oz",
//                   "selectionModifier": 0,
//                   "selectionModifierType": "ABSOLUTE"
//                 }
//               ],
//               "type": "CHOICE"
//             },
//             {
//               "name": "Price-Optimizer",
//               "value": "4",
//               "valuesArray": [
//                 "4"
//               ],
//               "selections": [
//                 {
//                   "selectionTitle": "4",
//                   "selectionModifier": 4,
//                   "selectionModifierType": "PERCENT"
//                 }
//               ],
//               "type": "CHOICE"
//             }
//           ],
//           "taxes": [
//             {
//               "name": "State tax",
//               "value": 12,
//               "total": 59.05,
//               "taxOnDiscountedSubtotal": 1.95,
//               "taxOnShipping": 57.1,
//               "includeInPrice": false
//             },
//             {
//               "name": "TVA",
//               "value": 20,
//               "total": 98.42,
//               "taxOnDiscountedSubtotal": 3.25,
//               "taxOnShipping": 95.17,
//               "includeInPrice": true
//             }
//           ],
//           "dimensions": {
//             "length": 0,
//             "width": 0,
//             "height": 0
//           },
//           "couponAmount": 0.34,
//           "discounts": [
//             {
//               "discountInfo": {
//                 "value": 4,
//                 "type": "ABS",
//                 "base": "ON_TOTAL",
//                 "orderTotal": 1
//               },
//               "total": 0.06
//             }
//           ]
//         },
//         {
//           "subscriptionId": 123456,
//           "recurringChargeSettings": {
//             "recurringInterval": "month",
//             "recurringIntervalCount": 1
//           }
//         }
//       ],
//       "refundedAmount": 3.5,
//       "refunds": [
//         {
//           "date": "2017-09-12 10:12:56 +0000",
//           "source": "CP",
//           "reason": "Testing!",
//           "amount": 3.5
//         }
//       ],
//       "billingPerson": {
//         "name": "Michael Scott",
//         "companyName": "",
//         "street": "555 Lackawanna Ave",
//         "city": "Scranton",
//         "countryCode": "US",
//         "countryName": "United States",
//         "postalCode": "18508",
//         "stateOrProvinceCode": "PA",
//         "stateOrProvinceName": "Pennsylvania",
//         "phone": ""
//       },
//       "shippingPerson": {
//         "name": "Michael Scott",
//         "companyName": "",
//         "street": "555 Lackawanna Ave",
//         "city": "Scranton",
//         "countryCode": "US",
//         "countryName": "United States",
//         "postalCode": "18508",
//         "stateOrProvinceCode": "PA",
//         "stateOrProvinceName": "Pennsylvania",
//         "phone": ""
//       },
//       "shippingOption": {
//         "shippingCarrierName": "Shipping app the-printful",
//         "shippingMethodName": "USPS Priority Mail",
//         "shippingRate": 471.85,
//         "estimatedTransitTime": "1-3",
//         "isPickup": false
//       },
//       "handlingFee": {
//         "name": "Handling Fee",
//         "value": 4,
//         "description": ""
//       },
//       "predictedPackage": [
//         {
//           "length": 0,
//           "width": 0,
//           "height": 0,
//           "weight": 0.4,
//           "declaredValue": 1076.64
//         }
//       ],
//       "shipments": [
//         {
//           "id": "5e79bd4f-9ebf-4ab8-b901-24c9b48b19eb",
//           "created": "2020-04-23 19:13:43 +0000",
//           "shipTo": {
//             "name": "Michael Scott",
//             "companyName": "",
//             "street": "555 Lackawanna Ave",
//             "city": "Scranton",
//             "countryCode": "US",
//             "countryName": "United States",
//             "postalCode": "18508",
//             "stateOrProvinceCode": "PA",
//             "stateOrProvinceName": "Pennsylvania",
//             "phone": ""
//           },
//           "shipFrom": {
//             "companyName": "Roga Kopyty Inc",
//             "street": "444 fff",
//             "city": "New York",
//             "countryCode": "US",
//             "countryName": "United States",
//             "postalCode": "10001",
//             "stateOrProvinceCode": "NY",
//             "stateOrProvinceName": "New York",
//             "phone": "1011991919"
//           },
//           "parcel": {
//             "weight": 0.5,
//             "weightUnit": 'KILOGRAM',
//             "width": 10,
//             "height": 10,
//             "length": 10,
//             "dimensionUnit": 'CM'
//           },
//           "shippingService": {
//             "carrier": 'USPS',
//             "carrierName": 'Shipping,
//             "carrierServiceName": "Priority Mail",
//             "carrierServiceCode": "usps_priority"
//           },
//           "tracking": {
//             "tracking_number": "9499907123456123456781",
//             "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781",
//             "estimatedDays": 3
//           },
//           "shippingLabel": {
//             "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
//             "commercial_invoice_url": ""
//           }
//         }
//       ],
//       "taxesOnShipping": [
//         {
//           "name": "State tax",
//           "value": 12,
//           "total": 57.1
//         },
//         {
//           "name": "TVA",
//           "value": 20,
//           "total": 95.17
//         }
//       ],
//       "paymentModule": "CUSTOM_PAYMENT_APP-mollie-pg",
//       "additionalInfo": {
//         "google_customer_id": "2008512504.1526280224"
//       },
//       "paymentParams": {},
//       "orderExtraFields": [
//         {
//           "id": "lang",
//           "value": "en",
//           "customerInputType": "",
//           "title": "",
//           "orderDetailsDisplaySection": "",
//           "orderBy": "1"
//         },
//         {
//           "id": "askHowYouFoundUsApp",
//           "value": "From a friend",
//           "customerInputType": "SELECT",
//           "title": "How did you hear about us?",
//           "orderDetailsDisplaySection": "order_comments",
//           "orderBy": "2"
//         }
//       ],
//       "acceptMarketing": true,
//       "refererId": "Amazon",
//       "disableAllCustomerNotifications": false,
//       "externalFulfillment": false,
//       "pricesIncludeTax": false
//     }
//   ]
// }

// Sample code for parsing the JSON response...
// Use the following online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON

li_Total = loo_JResp.IntOf("total")
li_Count = loo_JResp.IntOf("count")
li_Offset = loo_JResp.IntOf("offset")
li_Limit = loo_JResp.IntOf("limit")
i = 0
li_Count_i = loo_JResp.SizeOfArray("items")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Id = loo_JResp.StringOf("items[i].id")
    ls_Subtotal = loo_JResp.StringOf("items[i].subtotal")
    ls_Total_str = loo_JResp.StringOf("items[i].total")
    ls_GiftCardRedemption = loo_JResp.StringOf("items[i].giftCardRedemption")
    ls_TotalBeforeGiftCardRedemption = loo_JResp.StringOf("items[i].totalBeforeGiftCardRedemption")
    li_GiftCardDoubleSpending = loo_JResp.BoolOf("items[i].giftCardDoubleSpending")
    ls_UsdTotal = loo_JResp.StringOf("items[i].usdTotal")
    ls_Tax = loo_JResp.StringOf("items[i].tax")
    ls_PaymentMethod = loo_JResp.StringOf("items[i].paymentMethod")
    ls_PaymentStatus = loo_JResp.StringOf("items[i].paymentStatus")
    ls_FulfillmentStatus = loo_JResp.StringOf("items[i].fulfillmentStatus")
    ls_VendorOrderNumber = loo_JResp.StringOf("items[i].vendorOrderNumber")
    li_OrderNumber = loo_JResp.IntOf("items[i].orderNumber")
    ls_RefererUrl = loo_JResp.StringOf("items[i].refererUrl")
    ls_GlobalReferer = loo_JResp.StringOf("items[i].globalReferer")
    ls_CreateDate = loo_JResp.StringOf("items[i].createDate")
    ls_UpdateDate = loo_JResp.StringOf("items[i].updateDate")
    li_CreateTimestamp = loo_JResp.IntOf("items[i].createTimestamp")
    li_UpdateTimestamp = loo_JResp.IntOf("items[i].updateTimestamp")
    li_Hidden = loo_JResp.BoolOf("items[i].hidden")
    ls_OrderComments = loo_JResp.StringOf("items[i].orderComments")
    ls_PrivateAdminNotes = loo_JResp.StringOf("items[i].privateAdminNotes")
    ls_Email = loo_JResp.StringOf("items[i].email")
    ls_IpAddress = loo_JResp.StringOf("items[i].ipAddress")
    li_CustomerId = loo_JResp.IntOf("items[i].customerId")
    li_CustomerGroupId = loo_JResp.IntOf("items[i].customerGroupId")
    ls_CustomerGroup = loo_JResp.StringOf("items[i].customerGroup")
    li_CustomerTaxExempt = loo_JResp.BoolOf("items[i].customerTaxExempt")
    ls_CustomerTaxId = loo_JResp.StringOf("items[i].customerTaxId")
    li_CustomerTaxIdValid = loo_JResp.BoolOf("items[i].customerTaxIdValid")
    li_ReversedTaxApplied = loo_JResp.BoolOf("items[i].reversedTaxApplied")
    li_Discount = loo_JResp.IntOf("items[i].discount")
    li_CouponDiscount = loo_JResp.IntOf("items[i].couponDiscount")
    li_VolumeDiscount = loo_JResp.IntOf("items[i].volumeDiscount")
    li_MembershipBasedDiscount = loo_JResp.IntOf("items[i].membershipBasedDiscount")
    li_TotalAndMembershipBasedDiscount = loo_JResp.IntOf("items[i].totalAndMembershipBasedDiscount")
    li_DiscountCouponId = loo_JResp.IntOf("items[i].discountCoupon.id")
    ls_DiscountCouponName = loo_JResp.StringOf("items[i].discountCoupon.name")
    ls_DiscountCouponCode = loo_JResp.StringOf("items[i].discountCoupon.code")
    ls_DiscountCouponDiscountType = loo_JResp.StringOf("items[i].discountCoupon.discountType")
    ls_DiscountCouponStatus = loo_JResp.StringOf("items[i].discountCoupon.status")
    li_DiscountCouponDiscount = loo_JResp.IntOf("items[i].discountCoupon.discount")
    ls_DiscountCouponLaunchDate = loo_JResp.StringOf("items[i].discountCoupon.launchDate")
    ls_DiscountCouponUsesLimit = loo_JResp.StringOf("items[i].discountCoupon.usesLimit")
    ls_DiscountCouponApplicationLimit = loo_JResp.StringOf("items[i].discountCoupon.applicationLimit")
    ls_DiscountCouponCreationDate = loo_JResp.StringOf("items[i].discountCoupon.creationDate")
    ls_DiscountCouponUpdateDate = loo_JResp.StringOf("items[i].discountCoupon.updateDate")
    li_DiscountCouponOrderCount = loo_JResp.IntOf("items[i].discountCoupon.orderCount")
    ls_RefundedAmount = loo_JResp.StringOf("items[i].refundedAmount")
    ls_BillingPersonName = loo_JResp.StringOf("items[i].billingPerson.name")
    ls_BillingPersonCompanyName = loo_JResp.StringOf("items[i].billingPerson.companyName")
    ls_BillingPersonStreet = loo_JResp.StringOf("items[i].billingPerson.street")
    ls_BillingPersonCity = loo_JResp.StringOf("items[i].billingPerson.city")
    ls_BillingPersonCountryCode = loo_JResp.StringOf("items[i].billingPerson.countryCode")
    ls_BillingPersonCountryName = loo_JResp.StringOf("items[i].billingPerson.countryName")
    ls_BillingPersonPostalCode = loo_JResp.StringOf("items[i].billingPerson.postalCode")
    ls_BillingPersonStateOrProvinceCode = loo_JResp.StringOf("items[i].billingPerson.stateOrProvinceCode")
    ls_BillingPersonStateOrProvinceName = loo_JResp.StringOf("items[i].billingPerson.stateOrProvinceName")
    ls_BillingPersonPhone = loo_JResp.StringOf("items[i].billingPerson.phone")
    ls_ShippingPersonName = loo_JResp.StringOf("items[i].shippingPerson.name")
    ls_ShippingPersonCompanyName = loo_JResp.StringOf("items[i].shippingPerson.companyName")
    ls_ShippingPersonStreet = loo_JResp.StringOf("items[i].shippingPerson.street")
    ls_ShippingPersonCity = loo_JResp.StringOf("items[i].shippingPerson.city")
    ls_ShippingPersonCountryCode = loo_JResp.StringOf("items[i].shippingPerson.countryCode")
    ls_ShippingPersonCountryName = loo_JResp.StringOf("items[i].shippingPerson.countryName")
    ls_ShippingPersonPostalCode = loo_JResp.StringOf("items[i].shippingPerson.postalCode")
    ls_ShippingPersonStateOrProvinceCode = loo_JResp.StringOf("items[i].shippingPerson.stateOrProvinceCode")
    ls_ShippingPersonStateOrProvinceName = loo_JResp.StringOf("items[i].shippingPerson.stateOrProvinceName")
    ls_ShippingPersonPhone = loo_JResp.StringOf("items[i].shippingPerson.phone")
    ls_ShippingOptionShippingCarrierName = loo_JResp.StringOf("items[i].shippingOption.shippingCarrierName")
    ls_ShippingOptionShippingMethodName = loo_JResp.StringOf("items[i].shippingOption.shippingMethodName")
    ls_ShippingOptionShippingRate = loo_JResp.StringOf("items[i].shippingOption.shippingRate")
    ls_ShippingOptionEstimatedTransitTime = loo_JResp.StringOf("items[i].shippingOption.estimatedTransitTime")
    li_ShippingOptionIsPickup = loo_JResp.BoolOf("items[i].shippingOption.isPickup")
    ls_HandlingFeeName = loo_JResp.StringOf("items[i].handlingFee.name")
    li_HandlingFeeValue = loo_JResp.IntOf("items[i].handlingFee.value")
    ls_HandlingFeeDescription = loo_JResp.StringOf("items[i].handlingFee.description")
    ls_PaymentModule = loo_JResp.StringOf("items[i].paymentModule")
    ls_AdditionalInfoGoogle_customer_id = loo_JResp.StringOf("items[i].additionalInfo.google_customer_id")
    li_AcceptMarketing = loo_JResp.BoolOf("items[i].acceptMarketing")
    ls_RefererId = loo_JResp.StringOf("items[i].refererId")
    li_DisableAllCustomerNotifications = loo_JResp.BoolOf("items[i].disableAllCustomerNotifications")
    li_ExternalFulfillment = loo_JResp.BoolOf("items[i].externalFulfillment")
    li_PricesIncludeTax = loo_JResp.BoolOf("items[i].pricesIncludeTax")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].customDiscount")
    do while j < li_Count_j
        loo_JResp.J = j
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].discountInfo")
    do while j < li_Count_j
        loo_JResp.J = j
        li_Value = loo_JResp.IntOf("items[i].discountInfo[j].value")
        ls_V_type = loo_JResp.StringOf("items[i].discountInfo[j].type")
        ls_Base = loo_JResp.StringOf("items[i].discountInfo[j].base")
        li_OrderTotal = loo_JResp.IntOf("items[i].discountInfo[j].orderTotal")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].items")
    do while j < li_Count_j
        loo_JResp.J = j
        li_Id_int = loo_JResp.IntOf("items[i].items[j].id")
        li_ProductId = loo_JResp.IntOf("items[i].items[j].productId")
        li_CategoryId = loo_JResp.IntOf("items[i].items[j].categoryId")
        li_Price = loo_JResp.IntOf("items[i].items[j].price")
        li_ProductPrice = loo_JResp.IntOf("items[i].items[j].productPrice")
        ls_Sku = loo_JResp.StringOf("items[i].items[j].sku")
        li_Quantity = loo_JResp.IntOf("items[i].items[j].quantity")
        ls_ShortDescription = loo_JResp.StringOf("items[i].items[j].shortDescription")
        ls_Tax = loo_JResp.StringOf("items[i].items[j].tax")
        li_Shipping = loo_JResp.IntOf("items[i].items[j].shipping")
        li_QuantityInStock = loo_JResp.IntOf("items[i].items[j].quantityInStock")
        ls_Name = loo_JResp.StringOf("items[i].items[j].name")
        li_IsShippingRequired = loo_JResp.BoolOf("items[i].items[j].isShippingRequired")
        li_Weight = loo_JResp.IntOf("items[i].items[j].weight")
        li_TrackQuantity = loo_JResp.BoolOf("items[i].items[j].trackQuantity")
        li_FixedShippingRateOnly = loo_JResp.BoolOf("items[i].items[j].fixedShippingRateOnly")
        ls_ImageUrl = loo_JResp.StringOf("items[i].items[j].imageUrl")
        ls_SmallThumbnailUrl = loo_JResp.StringOf("items[i].items[j].smallThumbnailUrl")
        ls_HdThumbnailUrl = loo_JResp.StringOf("items[i].items[j].hdThumbnailUrl")
        li_FixedShippingRate = loo_JResp.IntOf("items[i].items[j].fixedShippingRate")
        li_Digital = loo_JResp.BoolOf("items[i].items[j].digital")
        li_CouponApplied = loo_JResp.BoolOf("items[i].items[j].couponApplied")
        li_DimensionsLength = loo_JResp.IntOf("items[i].items[j].dimensions.length")
        li_DimensionsWidth = loo_JResp.IntOf("items[i].items[j].dimensions.width")
        li_DimensionsHeight = loo_JResp.IntOf("items[i].items[j].dimensions.height")
        ls_CouponAmount = loo_JResp.StringOf("items[i].items[j].couponAmount")
        li_SubscriptionId = loo_JResp.IntOf("items[i].items[j].subscriptionId")
        ls_RecurringChargeSettingsRecurringInterval = loo_JResp.StringOf("items[i].items[j].recurringChargeSettings.recurringInterval")
        li_RecurringChargeSettingsRecurringIntervalCount = loo_JResp.IntOf("items[i].items[j].recurringChargeSettings.recurringIntervalCount")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("items[i].items[j].selectedOptions")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_Name = loo_JResp.StringOf("items[i].items[j].selectedOptions[k].name")
            ls_Value_str = loo_JResp.StringOf("items[i].items[j].selectedOptions[k].value")
            ls_V_type = loo_JResp.StringOf("items[i].items[j].selectedOptions[k].type")

            loo_Json1 = loo_JResp.ObjectOf("items[i].items[j].selectedOptions[k]")
            li_I1 = 0
            li_Count_i1 = loo_Json1.SizeOfArray("valuesArray")
            do while li_I1 < li_Count_i1
                loo_Json1.I = li_I1
                ls_StrVal = loo_Json1.StringOf("valuesArray[i]")
                li_I1 = li_I1 + 1
            loop
            destroy loo_Json1

            loo_Json1 = loo_JResp.ObjectOf("items[i].items[j].selectedOptions[k]")
            li_I1 = 0
            li_Count_i1 = loo_Json1.SizeOfArray("selections")
            do while li_I1 < li_Count_i1
                loo_Json1.I = li_I1
                ls_SelectionTitle = loo_Json1.StringOf("selections[i].selectionTitle")
                li_SelectionModifier = loo_Json1.IntOf("selections[i].selectionModifier")
                ls_SelectionModifierType = loo_Json1.StringOf("selections[i].selectionModifierType")
                li_I1 = li_I1 + 1
            loop
            destroy loo_Json1
            k = k + 1
        loop
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("items[i].items[j].taxes")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_Name = loo_JResp.StringOf("items[i].items[j].taxes[k].name")
            li_Value = loo_JResp.IntOf("items[i].items[j].taxes[k].value")
            ls_Total_str = loo_JResp.StringOf("items[i].items[j].taxes[k].total")
            ls_TaxOnDiscountedSubtotal = loo_JResp.StringOf("items[i].items[j].taxes[k].taxOnDiscountedSubtotal")
            li_TaxOnShipping = loo_JResp.IntOf("items[i].items[j].taxes[k].taxOnShipping")
            li_IncludeInPrice = loo_JResp.BoolOf("items[i].items[j].taxes[k].includeInPrice")
            k = k + 1
        loop
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("items[i].items[j].discounts")
        do while k < li_Count_k
            loo_JResp.K = k
            li_DiscountInfoValue = loo_JResp.IntOf("items[i].items[j].discounts[k].discountInfo.value")
            ls_DiscountInfoType = loo_JResp.StringOf("items[i].items[j].discounts[k].discountInfo.type")
            ls_DiscountInfoBase = loo_JResp.StringOf("items[i].items[j].discounts[k].discountInfo.base")
            li_DiscountInfoOrderTotal = loo_JResp.IntOf("items[i].items[j].discounts[k].discountInfo.orderTotal")
            ls_Total_str = loo_JResp.StringOf("items[i].items[j].discounts[k].total")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].refunds")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Date = loo_JResp.StringOf("items[i].refunds[j].date")
        ls_Source = loo_JResp.StringOf("items[i].refunds[j].source")
        ls_Reason = loo_JResp.StringOf("items[i].refunds[j].reason")
        ls_Amount = loo_JResp.StringOf("items[i].refunds[j].amount")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].predictedPackage")
    do while j < li_Count_j
        loo_JResp.J = j
        li_Length = loo_JResp.IntOf("items[i].predictedPackage[j].length")
        li_Width = loo_JResp.IntOf("items[i].predictedPackage[j].width")
        li_Height = loo_JResp.IntOf("items[i].predictedPackage[j].height")
        ls_Weight_str = loo_JResp.StringOf("items[i].predictedPackage[j].weight")
        ls_DeclaredValue = loo_JResp.StringOf("items[i].predictedPackage[j].declaredValue")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].shipments")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Id = loo_JResp.StringOf("items[i].shipments[j].id")
        ls_Created = loo_JResp.StringOf("items[i].shipments[j].created")
        ls_ShipToName = loo_JResp.StringOf("items[i].shipments[j].shipTo.name")
        ls_ShipToCompanyName = loo_JResp.StringOf("items[i].shipments[j].shipTo.companyName")
        ls_ShipToStreet = loo_JResp.StringOf("items[i].shipments[j].shipTo.street")
        ls_ShipToCity = loo_JResp.StringOf("items[i].shipments[j].shipTo.city")
        ls_ShipToCountryCode = loo_JResp.StringOf("items[i].shipments[j].shipTo.countryCode")
        ls_ShipToCountryName = loo_JResp.StringOf("items[i].shipments[j].shipTo.countryName")
        ls_ShipToPostalCode = loo_JResp.StringOf("items[i].shipments[j].shipTo.postalCode")
        ls_ShipToStateOrProvinceCode = loo_JResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceCode")
        ls_ShipToStateOrProvinceName = loo_JResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceName")
        ls_ShipToPhone = loo_JResp.StringOf("items[i].shipments[j].shipTo.phone")
        ls_ShipFromCompanyName = loo_JResp.StringOf("items[i].shipments[j].shipFrom.companyName")
        ls_ShipFromStreet = loo_JResp.StringOf("items[i].shipments[j].shipFrom.street")
        ls_ShipFromCity = loo_JResp.StringOf("items[i].shipments[j].shipFrom.city")
        ls_ShipFromCountryCode = loo_JResp.StringOf("items[i].shipments[j].shipFrom.countryCode")
        ls_ShipFromCountryName = loo_JResp.StringOf("items[i].shipments[j].shipFrom.countryName")
        ls_ShipFromPostalCode = loo_JResp.StringOf("items[i].shipments[j].shipFrom.postalCode")
        ls_ShipFromStateOrProvinceCode = loo_JResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceCode")
        ls_ShipFromStateOrProvinceName = loo_JResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceName")
        ls_ShipFromPhone = loo_JResp.StringOf("items[i].shipments[j].shipFrom.phone")
        ls_ParcelWeight = loo_JResp.StringOf("items[i].shipments[j].parcel.weight")
        li_ParcelWeightUnit = loo_JResp.IntOf("items[i].shipments[j].parcel.weightUnit")
        li_ParcelWidth = loo_JResp.IntOf("items[i].shipments[j].parcel.width")
        li_ParcelHeight = loo_JResp.IntOf("items[i].shipments[j].parcel.height")
        li_ParcelLength = loo_JResp.IntOf("items[i].shipments[j].parcel.length")
        li_ParcelDimensionUnit = loo_JResp.IntOf("items[i].shipments[j].parcel.dimensionUnit")
        li_ShippingServiceCarrier = loo_JResp.IntOf("items[i].shipments[j].shippingService.carrier")
        li_ShippingServiceCarrierName = loo_JResp.IntOf("items[i].shipments[j].shippingService.carrierName")
        ls_ShippingServiceCarrierServiceName = loo_JResp.StringOf("items[i].shipments[j].shippingService.carrierServiceName")
        ls_ShippingServiceCarrierServiceCode = loo_JResp.StringOf("items[i].shipments[j].shippingService.carrierServiceCode")
        ls_TrackingTracking_number = loo_JResp.StringOf("items[i].shipments[j].tracking.tracking_number")
        ls_TrackingTracking_url = loo_JResp.StringOf("items[i].shipments[j].tracking.tracking_url")
        li_TrackingEstimatedDays = loo_JResp.IntOf("items[i].shipments[j].tracking.estimatedDays")
        ls_ShippingLabelLabel_url = loo_JResp.StringOf("items[i].shipments[j].shippingLabel.label_url")
        ls_ShippingLabelCommercial_invoice_url = loo_JResp.StringOf("items[i].shipments[j].shippingLabel.commercial_invoice_url")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].taxesOnShipping")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Name = loo_JResp.StringOf("items[i].taxesOnShipping[j].name")
        li_Value = loo_JResp.IntOf("items[i].taxesOnShipping[j].value")
        ls_Total_str = loo_JResp.StringOf("items[i].taxesOnShipping[j].total")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("items[i].orderExtraFields")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Id = loo_JResp.StringOf("items[i].orderExtraFields[j].id")
        ls_Value_str = loo_JResp.StringOf("items[i].orderExtraFields[j].value")
        ls_CustomerInputType = loo_JResp.StringOf("items[i].orderExtraFields[j].customerInputType")
        ls_Title = loo_JResp.StringOf("items[i].orderExtraFields[j].title")
        ls_OrderDetailsDisplaySection = loo_JResp.StringOf("items[i].orderExtraFields[j].orderDetailsDisplaySection")
        ls_OrderBy = loo_JResp.StringOf("items[i].orderExtraFields[j].orderBy")
        j = j + 1
    loop
    i = i + 1
loop


destroy loo_Http
destroy loo_JsonToken
destroy loo_Params
destroy loo_SbResponseBody
destroy loo_JResp

 

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