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

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

 

 

 

(AutoIt) 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

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

$oHttp = ObjCreate("Chilkat_9_5_0.Http")
Local $bSuccess

; 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
$oJsonToken = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJsonToken.LoadFile("qa_data/tokens/ecwid.json")

$oHttp.SetRequestHeader "Accept","application/json"

$oParams = ObjCreate("Chilkat_9_5_0.JsonObject")
$oParams.UpdateInt("limit",100)
$oParams.UpdateString("email","joe@example.com")
$oParams.UpdateString("token",$oJsonToken.StringOf("access_token"))

Local $oResp = $oHttp.QuickRequestParams("GET","https://app.ecwid.com/api/v3/storeId/orders",$oParams)
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

$oSbResponseBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$oResp.GetBodySb($oSbResponseBody)
$oJResp = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJResp.LoadSb($oSbResponseBody)
$oJResp.EmitCompact = False

ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oJResp.Emit() & @CRLF)

Local $iRespStatusCode = $oResp.StatusCode

ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 200) Then
    ConsoleWrite("Failed." & @CRLF)
    Exit
EndIf

; 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

Local $sId
Local $subtotal
Local $sTotal_str
Local $sGiftCardRedemption
Local $sTotalBeforeGiftCardRedemption
Local $bGiftCardDoubleSpending
Local $sUsdTotal
Local $sTax
Local $sPaymentMethod
Local $sPaymentStatus
Local $sFulfillmentStatus
Local $sVendorOrderNumber
Local $iOrderNumber
Local $sRefererUrl
Local $sGlobalReferer
Local $sCreateDate
Local $sUpdateDate
Local $iCreateTimestamp
Local $iUpdateTimestamp
Local $bHidden
Local $sOrderComments
Local $sPrivateAdminNotes
Local $sEmail
Local $sIpAddress
Local $iCustomerId
Local $iCustomerGroupId
Local $sCustomerGroup
Local $bCustomerTaxExempt
Local $sCustomerTaxId
Local $bCustomerTaxIdValid
Local $bReversedTaxApplied
Local $iDiscount
Local $iCouponDiscount
Local $iVolumeDiscount
Local $iMembershipBasedDiscount
Local $iTotalAndMembershipBasedDiscount
Local $iDiscountCouponId
Local $sDiscountCouponName
Local $sDiscountCouponCode
Local $sDiscountCouponDiscountType
Local $sDiscountCouponStatus
Local $iDiscountCouponDiscount
Local $sDiscountCouponLaunchDate
Local $sDiscountCouponUsesLimit
Local $sDiscountCouponApplicationLimit
Local $sDiscountCouponCreationDate
Local $sDiscountCouponUpdateDate
Local $iDiscountCouponOrderCount
Local $sRefundedAmount
Local $sBillingPersonName
Local $sBillingPersonCompanyName
Local $sBillingPersonStreet
Local $sBillingPersonCity
Local $sBillingPersonCountryCode
Local $sBillingPersonCountryName
Local $sBillingPersonPostalCode
Local $sBillingPersonStateOrProvinceCode
Local $sBillingPersonStateOrProvinceName
Local $sBillingPersonPhone
Local $shippingPersonName
Local $shippingPersonCompanyName
Local $shippingPersonStreet
Local $shippingPersonCity
Local $shippingPersonCountryCode
Local $shippingPersonCountryName
Local $shippingPersonPostalCode
Local $shippingPersonStateOrProvinceCode
Local $shippingPersonStateOrProvinceName
Local $shippingPersonPhone
Local $shippingOptionShippingCarrierName
Local $shippingOptionShippingMethodName
Local $shippingOptionShippingRate
Local $shippingOptionEstimatedTransitTime
Local $bShippingOptionIsPickup
Local $sHandlingFeeName
Local $iHandlingFeeValue
Local $sHandlingFeeDescription
Local $sPaymentModule
Local $sAdditionalInfoGoogle_customer_id
Local $bAcceptMarketing
Local $sRefererId
Local $bDisableAllCustomerNotifications
Local $bExternalFulfillment
Local $bPricesIncludeTax
Local $iJ
Local $iCount_j
Local $iValue
Local $sV_type
Local $sBase
Local $iOrderTotal
Local $id_int
Local $iProductId
Local $iCategoryId
Local $iPrice
Local $iProductPrice
Local $sku
Local $iQuantity
Local $shortDescription
Local $iShipping
Local $iQuantityInStock
Local $sName
Local $bIsShippingRequired
Local $iWeight
Local $bTrackQuantity
Local $bFixedShippingRateOnly
Local $sImageUrl
Local $smallThumbnailUrl
Local $sHdThumbnailUrl
Local $iFixedShippingRate
Local $bDigital
Local $bCouponApplied
Local $iDimensionsLength
Local $iDimensionsWidth
Local $iDimensionsHeight
Local $sCouponAmount
Local $iSubscriptionId
Local $sRecurringChargeSettingsRecurringInterval
Local $iRecurringChargeSettingsRecurringIntervalCount
Local $iK
Local $iCount_k
Local $sValue_str
Local $oJson1
Local $i1
Local $iCount_i1
Local $strVal
Local $selectionTitle
Local $iSelectionModifier
Local $selectionModifierType
Local $sTaxOnDiscountedSubtotal
Local $iTaxOnShipping
Local $bIncludeInPrice
Local $iDiscountInfoValue
Local $sDiscountInfoType
Local $sDiscountInfoBase
Local $iDiscountInfoOrderTotal
Local $sDate
Local $source
Local $sReason
Local $sAmount
Local $iLength
Local $iWidth
Local $iHeight
Local $sWeight_str
Local $sDeclaredValue
Local $sCreated
Local $shipToName
Local $shipToCompanyName
Local $shipToStreet
Local $shipToCity
Local $shipToCountryCode
Local $shipToCountryName
Local $shipToPostalCode
Local $shipToStateOrProvinceCode
Local $shipToStateOrProvinceName
Local $shipToPhone
Local $shipFromCompanyName
Local $shipFromStreet
Local $shipFromCity
Local $shipFromCountryCode
Local $shipFromCountryName
Local $shipFromPostalCode
Local $shipFromStateOrProvinceCode
Local $shipFromStateOrProvinceName
Local $shipFromPhone
Local $sParcelWeight
Local $iParcelWeightUnit
Local $iParcelWidth
Local $iParcelHeight
Local $iParcelLength
Local $iParcelDimensionUnit
Local $iShippingServiceCarrier
Local $iShippingServiceCarrierName
Local $shippingServiceCarrierServiceName
Local $shippingServiceCarrierServiceCode
Local $sTrackingTracking_number
Local $sTrackingTracking_url
Local $iTrackingEstimatedDays
Local $shippingLabelLabel_url
Local $shippingLabelCommercial_invoice_url
Local $sCustomerInputType
Local $sTitle
Local $sOrderDetailsDisplaySection
Local $sOrderBy

Local $iTotal = $oJResp.IntOf("total")
Local $iCount = $oJResp.IntOf("count")
Local $iOffset = $oJResp.IntOf("offset")
Local $iLimit = $oJResp.IntOf("limit")
Local $i = 0
Local $iCount_i = $oJResp.SizeOfArray("items")
While $i < $iCount_i
    $oJResp.I = $i
    $sId = $oJResp.StringOf("items[i].id")
    $subtotal = $oJResp.StringOf("items[i].subtotal")
    $sTotal_str = $oJResp.StringOf("items[i].total")
    $sGiftCardRedemption = $oJResp.StringOf("items[i].giftCardRedemption")
    $sTotalBeforeGiftCardRedemption = $oJResp.StringOf("items[i].totalBeforeGiftCardRedemption")
    $bGiftCardDoubleSpending = $oJResp.BoolOf("items[i].giftCardDoubleSpending")
    $sUsdTotal = $oJResp.StringOf("items[i].usdTotal")
    $sTax = $oJResp.StringOf("items[i].tax")
    $sPaymentMethod = $oJResp.StringOf("items[i].paymentMethod")
    $sPaymentStatus = $oJResp.StringOf("items[i].paymentStatus")
    $sFulfillmentStatus = $oJResp.StringOf("items[i].fulfillmentStatus")
    $sVendorOrderNumber = $oJResp.StringOf("items[i].vendorOrderNumber")
    $iOrderNumber = $oJResp.IntOf("items[i].orderNumber")
    $sRefererUrl = $oJResp.StringOf("items[i].refererUrl")
    $sGlobalReferer = $oJResp.StringOf("items[i].globalReferer")
    $sCreateDate = $oJResp.StringOf("items[i].createDate")
    $sUpdateDate = $oJResp.StringOf("items[i].updateDate")
    $iCreateTimestamp = $oJResp.IntOf("items[i].createTimestamp")
    $iUpdateTimestamp = $oJResp.IntOf("items[i].updateTimestamp")
    $bHidden = $oJResp.BoolOf("items[i].hidden")
    $sOrderComments = $oJResp.StringOf("items[i].orderComments")
    $sPrivateAdminNotes = $oJResp.StringOf("items[i].privateAdminNotes")
    $sEmail = $oJResp.StringOf("items[i].email")
    $sIpAddress = $oJResp.StringOf("items[i].ipAddress")
    $iCustomerId = $oJResp.IntOf("items[i].customerId")
    $iCustomerGroupId = $oJResp.IntOf("items[i].customerGroupId")
    $sCustomerGroup = $oJResp.StringOf("items[i].customerGroup")
    $bCustomerTaxExempt = $oJResp.BoolOf("items[i].customerTaxExempt")
    $sCustomerTaxId = $oJResp.StringOf("items[i].customerTaxId")
    $bCustomerTaxIdValid = $oJResp.BoolOf("items[i].customerTaxIdValid")
    $bReversedTaxApplied = $oJResp.BoolOf("items[i].reversedTaxApplied")
    $iDiscount = $oJResp.IntOf("items[i].discount")
    $iCouponDiscount = $oJResp.IntOf("items[i].couponDiscount")
    $iVolumeDiscount = $oJResp.IntOf("items[i].volumeDiscount")
    $iMembershipBasedDiscount = $oJResp.IntOf("items[i].membershipBasedDiscount")
    $iTotalAndMembershipBasedDiscount = $oJResp.IntOf("items[i].totalAndMembershipBasedDiscount")
    $iDiscountCouponId = $oJResp.IntOf("items[i].discountCoupon.id")
    $sDiscountCouponName = $oJResp.StringOf("items[i].discountCoupon.name")
    $sDiscountCouponCode = $oJResp.StringOf("items[i].discountCoupon.code")
    $sDiscountCouponDiscountType = $oJResp.StringOf("items[i].discountCoupon.discountType")
    $sDiscountCouponStatus = $oJResp.StringOf("items[i].discountCoupon.status")
    $iDiscountCouponDiscount = $oJResp.IntOf("items[i].discountCoupon.discount")
    $sDiscountCouponLaunchDate = $oJResp.StringOf("items[i].discountCoupon.launchDate")
    $sDiscountCouponUsesLimit = $oJResp.StringOf("items[i].discountCoupon.usesLimit")
    $sDiscountCouponApplicationLimit = $oJResp.StringOf("items[i].discountCoupon.applicationLimit")
    $sDiscountCouponCreationDate = $oJResp.StringOf("items[i].discountCoupon.creationDate")
    $sDiscountCouponUpdateDate = $oJResp.StringOf("items[i].discountCoupon.updateDate")
    $iDiscountCouponOrderCount = $oJResp.IntOf("items[i].discountCoupon.orderCount")
    $sRefundedAmount = $oJResp.StringOf("items[i].refundedAmount")
    $sBillingPersonName = $oJResp.StringOf("items[i].billingPerson.name")
    $sBillingPersonCompanyName = $oJResp.StringOf("items[i].billingPerson.companyName")
    $sBillingPersonStreet = $oJResp.StringOf("items[i].billingPerson.street")
    $sBillingPersonCity = $oJResp.StringOf("items[i].billingPerson.city")
    $sBillingPersonCountryCode = $oJResp.StringOf("items[i].billingPerson.countryCode")
    $sBillingPersonCountryName = $oJResp.StringOf("items[i].billingPerson.countryName")
    $sBillingPersonPostalCode = $oJResp.StringOf("items[i].billingPerson.postalCode")
    $sBillingPersonStateOrProvinceCode = $oJResp.StringOf("items[i].billingPerson.stateOrProvinceCode")
    $sBillingPersonStateOrProvinceName = $oJResp.StringOf("items[i].billingPerson.stateOrProvinceName")
    $sBillingPersonPhone = $oJResp.StringOf("items[i].billingPerson.phone")
    $shippingPersonName = $oJResp.StringOf("items[i].shippingPerson.name")
    $shippingPersonCompanyName = $oJResp.StringOf("items[i].shippingPerson.companyName")
    $shippingPersonStreet = $oJResp.StringOf("items[i].shippingPerson.street")
    $shippingPersonCity = $oJResp.StringOf("items[i].shippingPerson.city")
    $shippingPersonCountryCode = $oJResp.StringOf("items[i].shippingPerson.countryCode")
    $shippingPersonCountryName = $oJResp.StringOf("items[i].shippingPerson.countryName")
    $shippingPersonPostalCode = $oJResp.StringOf("items[i].shippingPerson.postalCode")
    $shippingPersonStateOrProvinceCode = $oJResp.StringOf("items[i].shippingPerson.stateOrProvinceCode")
    $shippingPersonStateOrProvinceName = $oJResp.StringOf("items[i].shippingPerson.stateOrProvinceName")
    $shippingPersonPhone = $oJResp.StringOf("items[i].shippingPerson.phone")
    $shippingOptionShippingCarrierName = $oJResp.StringOf("items[i].shippingOption.shippingCarrierName")
    $shippingOptionShippingMethodName = $oJResp.StringOf("items[i].shippingOption.shippingMethodName")
    $shippingOptionShippingRate = $oJResp.StringOf("items[i].shippingOption.shippingRate")
    $shippingOptionEstimatedTransitTime = $oJResp.StringOf("items[i].shippingOption.estimatedTransitTime")
    $bShippingOptionIsPickup = $oJResp.BoolOf("items[i].shippingOption.isPickup")
    $sHandlingFeeName = $oJResp.StringOf("items[i].handlingFee.name")
    $iHandlingFeeValue = $oJResp.IntOf("items[i].handlingFee.value")
    $sHandlingFeeDescription = $oJResp.StringOf("items[i].handlingFee.description")
    $sPaymentModule = $oJResp.StringOf("items[i].paymentModule")
    $sAdditionalInfoGoogle_customer_id = $oJResp.StringOf("items[i].additionalInfo.google_customer_id")
    $bAcceptMarketing = $oJResp.BoolOf("items[i].acceptMarketing")
    $sRefererId = $oJResp.StringOf("items[i].refererId")
    $bDisableAllCustomerNotifications = $oJResp.BoolOf("items[i].disableAllCustomerNotifications")
    $bExternalFulfillment = $oJResp.BoolOf("items[i].externalFulfillment")
    $bPricesIncludeTax = $oJResp.BoolOf("items[i].pricesIncludeTax")
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].customDiscount")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].discountInfo")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $iValue = $oJResp.IntOf("items[i].discountInfo[j].value")
        $sV_type = $oJResp.StringOf("items[i].discountInfo[j].type")
        $sBase = $oJResp.StringOf("items[i].discountInfo[j].base")
        $iOrderTotal = $oJResp.IntOf("items[i].discountInfo[j].orderTotal")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].items")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $id_int = $oJResp.IntOf("items[i].items[j].id")
        $iProductId = $oJResp.IntOf("items[i].items[j].productId")
        $iCategoryId = $oJResp.IntOf("items[i].items[j].categoryId")
        $iPrice = $oJResp.IntOf("items[i].items[j].price")
        $iProductPrice = $oJResp.IntOf("items[i].items[j].productPrice")
        $sku = $oJResp.StringOf("items[i].items[j].sku")
        $iQuantity = $oJResp.IntOf("items[i].items[j].quantity")
        $shortDescription = $oJResp.StringOf("items[i].items[j].shortDescription")
        $sTax = $oJResp.StringOf("items[i].items[j].tax")
        $iShipping = $oJResp.IntOf("items[i].items[j].shipping")
        $iQuantityInStock = $oJResp.IntOf("items[i].items[j].quantityInStock")
        $sName = $oJResp.StringOf("items[i].items[j].name")
        $bIsShippingRequired = $oJResp.BoolOf("items[i].items[j].isShippingRequired")
        $iWeight = $oJResp.IntOf("items[i].items[j].weight")
        $bTrackQuantity = $oJResp.BoolOf("items[i].items[j].trackQuantity")
        $bFixedShippingRateOnly = $oJResp.BoolOf("items[i].items[j].fixedShippingRateOnly")
        $sImageUrl = $oJResp.StringOf("items[i].items[j].imageUrl")
        $smallThumbnailUrl = $oJResp.StringOf("items[i].items[j].smallThumbnailUrl")
        $sHdThumbnailUrl = $oJResp.StringOf("items[i].items[j].hdThumbnailUrl")
        $iFixedShippingRate = $oJResp.IntOf("items[i].items[j].fixedShippingRate")
        $bDigital = $oJResp.BoolOf("items[i].items[j].digital")
        $bCouponApplied = $oJResp.BoolOf("items[i].items[j].couponApplied")
        $iDimensionsLength = $oJResp.IntOf("items[i].items[j].dimensions.length")
        $iDimensionsWidth = $oJResp.IntOf("items[i].items[j].dimensions.width")
        $iDimensionsHeight = $oJResp.IntOf("items[i].items[j].dimensions.height")
        $sCouponAmount = $oJResp.StringOf("items[i].items[j].couponAmount")
        $iSubscriptionId = $oJResp.IntOf("items[i].items[j].subscriptionId")
        $sRecurringChargeSettingsRecurringInterval = $oJResp.StringOf("items[i].items[j].recurringChargeSettings.recurringInterval")
        $iRecurringChargeSettingsRecurringIntervalCount = $oJResp.IntOf("items[i].items[j].recurringChargeSettings.recurringIntervalCount")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("items[i].items[j].selectedOptions")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sName = $oJResp.StringOf("items[i].items[j].selectedOptions[k].name")
            $sValue_str = $oJResp.StringOf("items[i].items[j].selectedOptions[k].value")
            $sV_type = $oJResp.StringOf("items[i].items[j].selectedOptions[k].type")

            $oJson1 = $oJResp.ObjectOf("items[i].items[j].selectedOptions[k]")
            $i1 = 0
            $iCount_i1 = $oJson1.SizeOfArray("valuesArray")
            While $i1 < $iCount_i1
                $oJson1.I = $i1
                $strVal = $oJson1.StringOf("valuesArray[i]")
                $i1 = $i1 + 1
            Wend

            $oJson1 = $oJResp.ObjectOf("items[i].items[j].selectedOptions[k]")
            $i1 = 0
            $iCount_i1 = $oJson1.SizeOfArray("selections")
            While $i1 < $iCount_i1
                $oJson1.I = $i1
                $selectionTitle = $oJson1.StringOf("selections[i].selectionTitle")
                $iSelectionModifier = $oJson1.IntOf("selections[i].selectionModifier")
                $selectionModifierType = $oJson1.StringOf("selections[i].selectionModifierType")
                $i1 = $i1 + 1
            Wend

            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("items[i].items[j].taxes")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sName = $oJResp.StringOf("items[i].items[j].taxes[k].name")
            $iValue = $oJResp.IntOf("items[i].items[j].taxes[k].value")
            $sTotal_str = $oJResp.StringOf("items[i].items[j].taxes[k].total")
            $sTaxOnDiscountedSubtotal = $oJResp.StringOf("items[i].items[j].taxes[k].taxOnDiscountedSubtotal")
            $iTaxOnShipping = $oJResp.IntOf("items[i].items[j].taxes[k].taxOnShipping")
            $bIncludeInPrice = $oJResp.BoolOf("items[i].items[j].taxes[k].includeInPrice")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("items[i].items[j].discounts")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $iDiscountInfoValue = $oJResp.IntOf("items[i].items[j].discounts[k].discountInfo.value")
            $sDiscountInfoType = $oJResp.StringOf("items[i].items[j].discounts[k].discountInfo.type")
            $sDiscountInfoBase = $oJResp.StringOf("items[i].items[j].discounts[k].discountInfo.base")
            $iDiscountInfoOrderTotal = $oJResp.IntOf("items[i].items[j].discounts[k].discountInfo.orderTotal")
            $sTotal_str = $oJResp.StringOf("items[i].items[j].discounts[k].total")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].refunds")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sDate = $oJResp.StringOf("items[i].refunds[j].date")
        $source = $oJResp.StringOf("items[i].refunds[j].source")
        $sReason = $oJResp.StringOf("items[i].refunds[j].reason")
        $sAmount = $oJResp.StringOf("items[i].refunds[j].amount")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].predictedPackage")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $iLength = $oJResp.IntOf("items[i].predictedPackage[j].length")
        $iWidth = $oJResp.IntOf("items[i].predictedPackage[j].width")
        $iHeight = $oJResp.IntOf("items[i].predictedPackage[j].height")
        $sWeight_str = $oJResp.StringOf("items[i].predictedPackage[j].weight")
        $sDeclaredValue = $oJResp.StringOf("items[i].predictedPackage[j].declaredValue")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].shipments")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sId = $oJResp.StringOf("items[i].shipments[j].id")
        $sCreated = $oJResp.StringOf("items[i].shipments[j].created")
        $shipToName = $oJResp.StringOf("items[i].shipments[j].shipTo.name")
        $shipToCompanyName = $oJResp.StringOf("items[i].shipments[j].shipTo.companyName")
        $shipToStreet = $oJResp.StringOf("items[i].shipments[j].shipTo.street")
        $shipToCity = $oJResp.StringOf("items[i].shipments[j].shipTo.city")
        $shipToCountryCode = $oJResp.StringOf("items[i].shipments[j].shipTo.countryCode")
        $shipToCountryName = $oJResp.StringOf("items[i].shipments[j].shipTo.countryName")
        $shipToPostalCode = $oJResp.StringOf("items[i].shipments[j].shipTo.postalCode")
        $shipToStateOrProvinceCode = $oJResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceCode")
        $shipToStateOrProvinceName = $oJResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceName")
        $shipToPhone = $oJResp.StringOf("items[i].shipments[j].shipTo.phone")
        $shipFromCompanyName = $oJResp.StringOf("items[i].shipments[j].shipFrom.companyName")
        $shipFromStreet = $oJResp.StringOf("items[i].shipments[j].shipFrom.street")
        $shipFromCity = $oJResp.StringOf("items[i].shipments[j].shipFrom.city")
        $shipFromCountryCode = $oJResp.StringOf("items[i].shipments[j].shipFrom.countryCode")
        $shipFromCountryName = $oJResp.StringOf("items[i].shipments[j].shipFrom.countryName")
        $shipFromPostalCode = $oJResp.StringOf("items[i].shipments[j].shipFrom.postalCode")
        $shipFromStateOrProvinceCode = $oJResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceCode")
        $shipFromStateOrProvinceName = $oJResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceName")
        $shipFromPhone = $oJResp.StringOf("items[i].shipments[j].shipFrom.phone")
        $sParcelWeight = $oJResp.StringOf("items[i].shipments[j].parcel.weight")
        $iParcelWeightUnit = $oJResp.IntOf("items[i].shipments[j].parcel.weightUnit")
        $iParcelWidth = $oJResp.IntOf("items[i].shipments[j].parcel.width")
        $iParcelHeight = $oJResp.IntOf("items[i].shipments[j].parcel.height")
        $iParcelLength = $oJResp.IntOf("items[i].shipments[j].parcel.length")
        $iParcelDimensionUnit = $oJResp.IntOf("items[i].shipments[j].parcel.dimensionUnit")
        $iShippingServiceCarrier = $oJResp.IntOf("items[i].shipments[j].shippingService.carrier")
        $iShippingServiceCarrierName = $oJResp.IntOf("items[i].shipments[j].shippingService.carrierName")
        $shippingServiceCarrierServiceName = $oJResp.StringOf("items[i].shipments[j].shippingService.carrierServiceName")
        $shippingServiceCarrierServiceCode = $oJResp.StringOf("items[i].shipments[j].shippingService.carrierServiceCode")
        $sTrackingTracking_number = $oJResp.StringOf("items[i].shipments[j].tracking.tracking_number")
        $sTrackingTracking_url = $oJResp.StringOf("items[i].shipments[j].tracking.tracking_url")
        $iTrackingEstimatedDays = $oJResp.IntOf("items[i].shipments[j].tracking.estimatedDays")
        $shippingLabelLabel_url = $oJResp.StringOf("items[i].shipments[j].shippingLabel.label_url")
        $shippingLabelCommercial_invoice_url = $oJResp.StringOf("items[i].shipments[j].shippingLabel.commercial_invoice_url")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].taxesOnShipping")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sName = $oJResp.StringOf("items[i].taxesOnShipping[j].name")
        $iValue = $oJResp.IntOf("items[i].taxesOnShipping[j].value")
        $sTotal_str = $oJResp.StringOf("items[i].taxesOnShipping[j].total")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("items[i].orderExtraFields")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sId = $oJResp.StringOf("items[i].orderExtraFields[j].id")
        $sValue_str = $oJResp.StringOf("items[i].orderExtraFields[j].value")
        $sCustomerInputType = $oJResp.StringOf("items[i].orderExtraFields[j].customerInputType")
        $sTitle = $oJResp.StringOf("items[i].orderExtraFields[j].title")
        $sOrderDetailsDisplaySection = $oJResp.StringOf("items[i].orderExtraFields[j].orderDetailsDisplaySection")
        $sOrderBy = $oJResp.StringOf("items[i].orderExtraFields[j].orderBy")
        $iJ = $iJ + 1
    Wend
    $i = $i + 1
Wend

 

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