Sample code for 30+ languages & platforms
Visual FoxPro

Ecwid - Search Orders

See more Ecwid Examples

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

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loHttp
LOCAL loJsonToken
LOCAL loParams
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcId
LOCAL lcSubtotal
LOCAL lcTotal_str
LOCAL lcGiftCardRedemption
LOCAL lcTotalBeforeGiftCardRedemption
LOCAL lnGiftCardDoubleSpending
LOCAL lcUsdTotal
LOCAL lcTax
LOCAL lcPaymentMethod
LOCAL lcPaymentStatus
LOCAL lcFulfillmentStatus
LOCAL lcVendorOrderNumber
LOCAL lnOrderNumber
LOCAL lcRefererUrl
LOCAL lcGlobalReferer
LOCAL lcCreateDate
LOCAL lcUpdateDate
LOCAL lnCreateTimestamp
LOCAL lnUpdateTimestamp
LOCAL lnHidden
LOCAL lcOrderComments
LOCAL lcPrivateAdminNotes
LOCAL lcEmail
LOCAL lcIpAddress
LOCAL lnCustomerId
LOCAL lnCustomerGroupId
LOCAL lcCustomerGroup
LOCAL lnCustomerTaxExempt
LOCAL lcCustomerTaxId
LOCAL lnCustomerTaxIdValid
LOCAL lnReversedTaxApplied
LOCAL lnDiscount
LOCAL lnCouponDiscount
LOCAL lnVolumeDiscount
LOCAL lnMembershipBasedDiscount
LOCAL lnTotalAndMembershipBasedDiscount
LOCAL lnDiscountCouponId
LOCAL lcDiscountCouponName
LOCAL lcDiscountCouponCode
LOCAL lcDiscountCouponDiscountType
LOCAL lcDiscountCouponStatus
LOCAL lnDiscountCouponDiscount
LOCAL lcDiscountCouponLaunchDate
LOCAL lcDiscountCouponUsesLimit
LOCAL lcDiscountCouponApplicationLimit
LOCAL lcDiscountCouponCreationDate
LOCAL lcDiscountCouponUpdateDate
LOCAL lnDiscountCouponOrderCount
LOCAL lcRefundedAmount
LOCAL lcBillingPersonName
LOCAL lcBillingPersonCompanyName
LOCAL lcBillingPersonStreet
LOCAL lcBillingPersonCity
LOCAL lcBillingPersonCountryCode
LOCAL lcBillingPersonCountryName
LOCAL lcBillingPersonPostalCode
LOCAL lcBillingPersonStateOrProvinceCode
LOCAL lcBillingPersonStateOrProvinceName
LOCAL lcBillingPersonPhone
LOCAL lcShippingPersonName
LOCAL lcShippingPersonCompanyName
LOCAL lcShippingPersonStreet
LOCAL lcShippingPersonCity
LOCAL lcShippingPersonCountryCode
LOCAL lcShippingPersonCountryName
LOCAL lcShippingPersonPostalCode
LOCAL lcShippingPersonStateOrProvinceCode
LOCAL lcShippingPersonStateOrProvinceName
LOCAL lcShippingPersonPhone
LOCAL lcShippingOptionShippingCarrierName
LOCAL lcShippingOptionShippingMethodName
LOCAL lcShippingOptionShippingRate
LOCAL lcShippingOptionEstimatedTransitTime
LOCAL lnShippingOptionIsPickup
LOCAL lcHandlingFeeName
LOCAL lnHandlingFeeValue
LOCAL lcHandlingFeeDescription
LOCAL lcPaymentModule
LOCAL lcAdditionalInfoGoogle_customer_id
LOCAL lnAcceptMarketing
LOCAL lcRefererId
LOCAL lnDisableAllCustomerNotifications
LOCAL lnExternalFulfillment
LOCAL lnPricesIncludeTax
LOCAL j
LOCAL lnCount_j
LOCAL lnValue
LOCAL lcV_type
LOCAL lcBase
LOCAL lnOrderTotal
LOCAL lnId_int
LOCAL lnProductId
LOCAL lnCategoryId
LOCAL lnPrice
LOCAL lnProductPrice
LOCAL lcSku
LOCAL lnQuantity
LOCAL lcShortDescription
LOCAL lnShipping
LOCAL lnQuantityInStock
LOCAL lcName
LOCAL lnIsShippingRequired
LOCAL lnWeight
LOCAL lnTrackQuantity
LOCAL lnFixedShippingRateOnly
LOCAL lcImageUrl
LOCAL lcSmallThumbnailUrl
LOCAL lcHdThumbnailUrl
LOCAL lnFixedShippingRate
LOCAL lnDigital
LOCAL lnCouponApplied
LOCAL lnDimensionsLength
LOCAL lnDimensionsWidth
LOCAL lnDimensionsHeight
LOCAL lcCouponAmount
LOCAL lnSubscriptionId
LOCAL lcRecurringChargeSettingsRecurringInterval
LOCAL lnRecurringChargeSettingsRecurringIntervalCount
LOCAL k
LOCAL lnCount_k
LOCAL lcValue_str
LOCAL loJson1
LOCAL lnI1
LOCAL lnCount_i1
LOCAL lcStrVal
LOCAL lcSelectionTitle
LOCAL lnSelectionModifier
LOCAL lcSelectionModifierType
LOCAL lcTaxOnDiscountedSubtotal
LOCAL lnTaxOnShipping
LOCAL lnIncludeInPrice
LOCAL lnDiscountInfoValue
LOCAL lcDiscountInfoType
LOCAL lcDiscountInfoBase
LOCAL lnDiscountInfoOrderTotal
LOCAL lcDate
LOCAL lcSource
LOCAL lcReason
LOCAL lcAmount
LOCAL lnLength
LOCAL lnWidth
LOCAL lnHeight
LOCAL lcWeight_str
LOCAL lcDeclaredValue
LOCAL lcCreated
LOCAL lcShipToName
LOCAL lcShipToCompanyName
LOCAL lcShipToStreet
LOCAL lcShipToCity
LOCAL lcShipToCountryCode
LOCAL lcShipToCountryName
LOCAL lcShipToPostalCode
LOCAL lcShipToStateOrProvinceCode
LOCAL lcShipToStateOrProvinceName
LOCAL lcShipToPhone
LOCAL lcShipFromCompanyName
LOCAL lcShipFromStreet
LOCAL lcShipFromCity
LOCAL lcShipFromCountryCode
LOCAL lcShipFromCountryName
LOCAL lcShipFromPostalCode
LOCAL lcShipFromStateOrProvinceCode
LOCAL lcShipFromStateOrProvinceName
LOCAL lcShipFromPhone
LOCAL lcParcelWeight
LOCAL lnParcelWeightUnit
LOCAL lnParcelWidth
LOCAL lnParcelHeight
LOCAL lnParcelLength
LOCAL lnParcelDimensionUnit
LOCAL lnShippingServiceCarrier
LOCAL lnShippingServiceCarrierName
LOCAL lcShippingServiceCarrierServiceName
LOCAL lcShippingServiceCarrierServiceCode
LOCAL lcTrackingTracking_number
LOCAL lcTrackingTracking_url
LOCAL lnTrackingEstimatedDays
LOCAL lcShippingLabelLabel_url
LOCAL lcShippingLabelCommercial_invoice_url
LOCAL lcCustomerInputType
LOCAL lcTitle
LOCAL lcOrderDetailsDisplaySection
LOCAL lcOrderBy
LOCAL lnTotal
LOCAL lnCount
LOCAL lnOffset
LOCAL lnLimit
LOCAL i
LOCAL lnCount_i

lnSuccess = 0

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

loHttp = CreateObject('Chilkat.Http')

* 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
loJsonToken = CreateObject('Chilkat.JsonObject')
loJsonToken.LoadFile("qa_data/tokens/ecwid.json")

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

loParams = CreateObject('Chilkat.JsonObject')
loParams.UpdateInt("limit",100)
loParams.UpdateString("email","joe@example.com")
loParams.UpdateString("token",loJsonToken.StringOf("access_token"))

loResp = CreateObject('Chilkat.HttpResponse')
lnSuccess = loHttp.HttpParams("GET","https://app.ecwid.com/api/v3/storeId/orders",loParams,loResp)
IF (lnSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJsonToken
    RELEASE loParams
    RELEASE loResp
    CANCEL
ENDIF

loSbResponseBody = CreateObject('Chilkat.StringBuilder')
loResp.GetBodySb(loSbResponseBody)
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0

? "Response Body:"
? loJResp.Emit()

lnRespStatusCode = loResp.StatusCode

? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 200) THEN
    ? "Failed."
    RELEASE loHttp
    RELEASE loJsonToken
    RELEASE loParams
    RELEASE loResp
    RELEASE loSbResponseBody
    RELEASE loJResp
    CANCEL
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

loJson1 = CreateObject('Chilkat.JsonObject')

lnTotal = loJResp.IntOf("total")
lnCount = loJResp.IntOf("count")
lnOffset = loJResp.IntOf("offset")
lnLimit = loJResp.IntOf("limit")
i = 0
lnCount_i = loJResp.SizeOfArray("items")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcId = loJResp.StringOf("items[i].id")
    lcSubtotal = loJResp.StringOf("items[i].subtotal")
    lcTotal_str = loJResp.StringOf("items[i].total")
    lcGiftCardRedemption = loJResp.StringOf("items[i].giftCardRedemption")
    lcTotalBeforeGiftCardRedemption = loJResp.StringOf("items[i].totalBeforeGiftCardRedemption")
    lnGiftCardDoubleSpending = loJResp.BoolOf("items[i].giftCardDoubleSpending")
    lcUsdTotal = loJResp.StringOf("items[i].usdTotal")
    lcTax = loJResp.StringOf("items[i].tax")
    lcPaymentMethod = loJResp.StringOf("items[i].paymentMethod")
    lcPaymentStatus = loJResp.StringOf("items[i].paymentStatus")
    lcFulfillmentStatus = loJResp.StringOf("items[i].fulfillmentStatus")
    lcVendorOrderNumber = loJResp.StringOf("items[i].vendorOrderNumber")
    lnOrderNumber = loJResp.IntOf("items[i].orderNumber")
    lcRefererUrl = loJResp.StringOf("items[i].refererUrl")
    lcGlobalReferer = loJResp.StringOf("items[i].globalReferer")
    lcCreateDate = loJResp.StringOf("items[i].createDate")
    lcUpdateDate = loJResp.StringOf("items[i].updateDate")
    lnCreateTimestamp = loJResp.IntOf("items[i].createTimestamp")
    lnUpdateTimestamp = loJResp.IntOf("items[i].updateTimestamp")
    lnHidden = loJResp.BoolOf("items[i].hidden")
    lcOrderComments = loJResp.StringOf("items[i].orderComments")
    lcPrivateAdminNotes = loJResp.StringOf("items[i].privateAdminNotes")
    lcEmail = loJResp.StringOf("items[i].email")
    lcIpAddress = loJResp.StringOf("items[i].ipAddress")
    lnCustomerId = loJResp.IntOf("items[i].customerId")
    lnCustomerGroupId = loJResp.IntOf("items[i].customerGroupId")
    lcCustomerGroup = loJResp.StringOf("items[i].customerGroup")
    lnCustomerTaxExempt = loJResp.BoolOf("items[i].customerTaxExempt")
    lcCustomerTaxId = loJResp.StringOf("items[i].customerTaxId")
    lnCustomerTaxIdValid = loJResp.BoolOf("items[i].customerTaxIdValid")
    lnReversedTaxApplied = loJResp.BoolOf("items[i].reversedTaxApplied")
    lnDiscount = loJResp.IntOf("items[i].discount")
    lnCouponDiscount = loJResp.IntOf("items[i].couponDiscount")
    lnVolumeDiscount = loJResp.IntOf("items[i].volumeDiscount")
    lnMembershipBasedDiscount = loJResp.IntOf("items[i].membershipBasedDiscount")
    lnTotalAndMembershipBasedDiscount = loJResp.IntOf("items[i].totalAndMembershipBasedDiscount")
    lnDiscountCouponId = loJResp.IntOf("items[i].discountCoupon.id")
    lcDiscountCouponName = loJResp.StringOf("items[i].discountCoupon.name")
    lcDiscountCouponCode = loJResp.StringOf("items[i].discountCoupon.code")
    lcDiscountCouponDiscountType = loJResp.StringOf("items[i].discountCoupon.discountType")
    lcDiscountCouponStatus = loJResp.StringOf("items[i].discountCoupon.status")
    lnDiscountCouponDiscount = loJResp.IntOf("items[i].discountCoupon.discount")
    lcDiscountCouponLaunchDate = loJResp.StringOf("items[i].discountCoupon.launchDate")
    lcDiscountCouponUsesLimit = loJResp.StringOf("items[i].discountCoupon.usesLimit")
    lcDiscountCouponApplicationLimit = loJResp.StringOf("items[i].discountCoupon.applicationLimit")
    lcDiscountCouponCreationDate = loJResp.StringOf("items[i].discountCoupon.creationDate")
    lcDiscountCouponUpdateDate = loJResp.StringOf("items[i].discountCoupon.updateDate")
    lnDiscountCouponOrderCount = loJResp.IntOf("items[i].discountCoupon.orderCount")
    lcRefundedAmount = loJResp.StringOf("items[i].refundedAmount")
    lcBillingPersonName = loJResp.StringOf("items[i].billingPerson.name")
    lcBillingPersonCompanyName = loJResp.StringOf("items[i].billingPerson.companyName")
    lcBillingPersonStreet = loJResp.StringOf("items[i].billingPerson.street")
    lcBillingPersonCity = loJResp.StringOf("items[i].billingPerson.city")
    lcBillingPersonCountryCode = loJResp.StringOf("items[i].billingPerson.countryCode")
    lcBillingPersonCountryName = loJResp.StringOf("items[i].billingPerson.countryName")
    lcBillingPersonPostalCode = loJResp.StringOf("items[i].billingPerson.postalCode")
    lcBillingPersonStateOrProvinceCode = loJResp.StringOf("items[i].billingPerson.stateOrProvinceCode")
    lcBillingPersonStateOrProvinceName = loJResp.StringOf("items[i].billingPerson.stateOrProvinceName")
    lcBillingPersonPhone = loJResp.StringOf("items[i].billingPerson.phone")
    lcShippingPersonName = loJResp.StringOf("items[i].shippingPerson.name")
    lcShippingPersonCompanyName = loJResp.StringOf("items[i].shippingPerson.companyName")
    lcShippingPersonStreet = loJResp.StringOf("items[i].shippingPerson.street")
    lcShippingPersonCity = loJResp.StringOf("items[i].shippingPerson.city")
    lcShippingPersonCountryCode = loJResp.StringOf("items[i].shippingPerson.countryCode")
    lcShippingPersonCountryName = loJResp.StringOf("items[i].shippingPerson.countryName")
    lcShippingPersonPostalCode = loJResp.StringOf("items[i].shippingPerson.postalCode")
    lcShippingPersonStateOrProvinceCode = loJResp.StringOf("items[i].shippingPerson.stateOrProvinceCode")
    lcShippingPersonStateOrProvinceName = loJResp.StringOf("items[i].shippingPerson.stateOrProvinceName")
    lcShippingPersonPhone = loJResp.StringOf("items[i].shippingPerson.phone")
    lcShippingOptionShippingCarrierName = loJResp.StringOf("items[i].shippingOption.shippingCarrierName")
    lcShippingOptionShippingMethodName = loJResp.StringOf("items[i].shippingOption.shippingMethodName")
    lcShippingOptionShippingRate = loJResp.StringOf("items[i].shippingOption.shippingRate")
    lcShippingOptionEstimatedTransitTime = loJResp.StringOf("items[i].shippingOption.estimatedTransitTime")
    lnShippingOptionIsPickup = loJResp.BoolOf("items[i].shippingOption.isPickup")
    lcHandlingFeeName = loJResp.StringOf("items[i].handlingFee.name")
    lnHandlingFeeValue = loJResp.IntOf("items[i].handlingFee.value")
    lcHandlingFeeDescription = loJResp.StringOf("items[i].handlingFee.description")
    lcPaymentModule = loJResp.StringOf("items[i].paymentModule")
    lcAdditionalInfoGoogle_customer_id = loJResp.StringOf("items[i].additionalInfo.google_customer_id")
    lnAcceptMarketing = loJResp.BoolOf("items[i].acceptMarketing")
    lcRefererId = loJResp.StringOf("items[i].refererId")
    lnDisableAllCustomerNotifications = loJResp.BoolOf("items[i].disableAllCustomerNotifications")
    lnExternalFulfillment = loJResp.BoolOf("items[i].externalFulfillment")
    lnPricesIncludeTax = loJResp.BoolOf("items[i].pricesIncludeTax")
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].customDiscount")
    DO WHILE j < lnCount_j
        loJResp.J = j
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].discountInfo")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnValue = loJResp.IntOf("items[i].discountInfo[j].value")
        lcV_type = loJResp.StringOf("items[i].discountInfo[j].type")
        lcBase = loJResp.StringOf("items[i].discountInfo[j].base")
        lnOrderTotal = loJResp.IntOf("items[i].discountInfo[j].orderTotal")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].items")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnId_int = loJResp.IntOf("items[i].items[j].id")
        lnProductId = loJResp.IntOf("items[i].items[j].productId")
        lnCategoryId = loJResp.IntOf("items[i].items[j].categoryId")
        lnPrice = loJResp.IntOf("items[i].items[j].price")
        lnProductPrice = loJResp.IntOf("items[i].items[j].productPrice")
        lcSku = loJResp.StringOf("items[i].items[j].sku")
        lnQuantity = loJResp.IntOf("items[i].items[j].quantity")
        lcShortDescription = loJResp.StringOf("items[i].items[j].shortDescription")
        lcTax = loJResp.StringOf("items[i].items[j].tax")
        lnShipping = loJResp.IntOf("items[i].items[j].shipping")
        lnQuantityInStock = loJResp.IntOf("items[i].items[j].quantityInStock")
        lcName = loJResp.StringOf("items[i].items[j].name")
        lnIsShippingRequired = loJResp.BoolOf("items[i].items[j].isShippingRequired")
        lnWeight = loJResp.IntOf("items[i].items[j].weight")
        lnTrackQuantity = loJResp.BoolOf("items[i].items[j].trackQuantity")
        lnFixedShippingRateOnly = loJResp.BoolOf("items[i].items[j].fixedShippingRateOnly")
        lcImageUrl = loJResp.StringOf("items[i].items[j].imageUrl")
        lcSmallThumbnailUrl = loJResp.StringOf("items[i].items[j].smallThumbnailUrl")
        lcHdThumbnailUrl = loJResp.StringOf("items[i].items[j].hdThumbnailUrl")
        lnFixedShippingRate = loJResp.IntOf("items[i].items[j].fixedShippingRate")
        lnDigital = loJResp.BoolOf("items[i].items[j].digital")
        lnCouponApplied = loJResp.BoolOf("items[i].items[j].couponApplied")
        lnDimensionsLength = loJResp.IntOf("items[i].items[j].dimensions.length")
        lnDimensionsWidth = loJResp.IntOf("items[i].items[j].dimensions.width")
        lnDimensionsHeight = loJResp.IntOf("items[i].items[j].dimensions.height")
        lcCouponAmount = loJResp.StringOf("items[i].items[j].couponAmount")
        lnSubscriptionId = loJResp.IntOf("items[i].items[j].subscriptionId")
        lcRecurringChargeSettingsRecurringInterval = loJResp.StringOf("items[i].items[j].recurringChargeSettings.recurringInterval")
        lnRecurringChargeSettingsRecurringIntervalCount = loJResp.IntOf("items[i].items[j].recurringChargeSettings.recurringIntervalCount")
        k = 0
        lnCount_k = loJResp.SizeOfArray("items[i].items[j].selectedOptions")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lcName = loJResp.StringOf("items[i].items[j].selectedOptions[k].name")
            lcValue_str = loJResp.StringOf("items[i].items[j].selectedOptions[k].value")
            lcV_type = loJResp.StringOf("items[i].items[j].selectedOptions[k].type")
            loJResp.ObjectOf2("items[i].items[j].selectedOptions[k]",loJson1)

            lnI1 = 0
            lnCount_i1 = loJson1.SizeOfArray("valuesArray")
            DO WHILE lnI1 < lnCount_i1
                loJson1.I = lnI1
                lcStrVal = loJson1.StringOf("valuesArray[i]")
                lnI1 = lnI1 + 1
            ENDDO

            loJResp.ObjectOf2("items[i].items[j].selectedOptions[k]",loJson1)
            lnI1 = 0
            lnCount_i1 = loJson1.SizeOfArray("selections")
            DO WHILE lnI1 < lnCount_i1
                loJson1.I = lnI1
                lcSelectionTitle = loJson1.StringOf("selections[i].selectionTitle")
                lnSelectionModifier = loJson1.IntOf("selections[i].selectionModifier")
                lcSelectionModifierType = loJson1.StringOf("selections[i].selectionModifierType")
                lnI1 = lnI1 + 1
            ENDDO
            k = k + 1
        ENDDO
        k = 0
        lnCount_k = loJResp.SizeOfArray("items[i].items[j].taxes")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lcName = loJResp.StringOf("items[i].items[j].taxes[k].name")
            lnValue = loJResp.IntOf("items[i].items[j].taxes[k].value")
            lcTotal_str = loJResp.StringOf("items[i].items[j].taxes[k].total")
            lcTaxOnDiscountedSubtotal = loJResp.StringOf("items[i].items[j].taxes[k].taxOnDiscountedSubtotal")
            lnTaxOnShipping = loJResp.IntOf("items[i].items[j].taxes[k].taxOnShipping")
            lnIncludeInPrice = loJResp.BoolOf("items[i].items[j].taxes[k].includeInPrice")
            k = k + 1
        ENDDO
        k = 0
        lnCount_k = loJResp.SizeOfArray("items[i].items[j].discounts")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lnDiscountInfoValue = loJResp.IntOf("items[i].items[j].discounts[k].discountInfo.value")
            lcDiscountInfoType = loJResp.StringOf("items[i].items[j].discounts[k].discountInfo.type")
            lcDiscountInfoBase = loJResp.StringOf("items[i].items[j].discounts[k].discountInfo.base")
            lnDiscountInfoOrderTotal = loJResp.IntOf("items[i].items[j].discounts[k].discountInfo.orderTotal")
            lcTotal_str = loJResp.StringOf("items[i].items[j].discounts[k].total")
            k = k + 1
        ENDDO
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].refunds")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcDate = loJResp.StringOf("items[i].refunds[j].date")
        lcSource = loJResp.StringOf("items[i].refunds[j].source")
        lcReason = loJResp.StringOf("items[i].refunds[j].reason")
        lcAmount = loJResp.StringOf("items[i].refunds[j].amount")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].predictedPackage")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnLength = loJResp.IntOf("items[i].predictedPackage[j].length")
        lnWidth = loJResp.IntOf("items[i].predictedPackage[j].width")
        lnHeight = loJResp.IntOf("items[i].predictedPackage[j].height")
        lcWeight_str = loJResp.StringOf("items[i].predictedPackage[j].weight")
        lcDeclaredValue = loJResp.StringOf("items[i].predictedPackage[j].declaredValue")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].shipments")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcId = loJResp.StringOf("items[i].shipments[j].id")
        lcCreated = loJResp.StringOf("items[i].shipments[j].created")
        lcShipToName = loJResp.StringOf("items[i].shipments[j].shipTo.name")
        lcShipToCompanyName = loJResp.StringOf("items[i].shipments[j].shipTo.companyName")
        lcShipToStreet = loJResp.StringOf("items[i].shipments[j].shipTo.street")
        lcShipToCity = loJResp.StringOf("items[i].shipments[j].shipTo.city")
        lcShipToCountryCode = loJResp.StringOf("items[i].shipments[j].shipTo.countryCode")
        lcShipToCountryName = loJResp.StringOf("items[i].shipments[j].shipTo.countryName")
        lcShipToPostalCode = loJResp.StringOf("items[i].shipments[j].shipTo.postalCode")
        lcShipToStateOrProvinceCode = loJResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceCode")
        lcShipToStateOrProvinceName = loJResp.StringOf("items[i].shipments[j].shipTo.stateOrProvinceName")
        lcShipToPhone = loJResp.StringOf("items[i].shipments[j].shipTo.phone")
        lcShipFromCompanyName = loJResp.StringOf("items[i].shipments[j].shipFrom.companyName")
        lcShipFromStreet = loJResp.StringOf("items[i].shipments[j].shipFrom.street")
        lcShipFromCity = loJResp.StringOf("items[i].shipments[j].shipFrom.city")
        lcShipFromCountryCode = loJResp.StringOf("items[i].shipments[j].shipFrom.countryCode")
        lcShipFromCountryName = loJResp.StringOf("items[i].shipments[j].shipFrom.countryName")
        lcShipFromPostalCode = loJResp.StringOf("items[i].shipments[j].shipFrom.postalCode")
        lcShipFromStateOrProvinceCode = loJResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceCode")
        lcShipFromStateOrProvinceName = loJResp.StringOf("items[i].shipments[j].shipFrom.stateOrProvinceName")
        lcShipFromPhone = loJResp.StringOf("items[i].shipments[j].shipFrom.phone")
        lcParcelWeight = loJResp.StringOf("items[i].shipments[j].parcel.weight")
        lnParcelWeightUnit = loJResp.IntOf("items[i].shipments[j].parcel.weightUnit")
        lnParcelWidth = loJResp.IntOf("items[i].shipments[j].parcel.width")
        lnParcelHeight = loJResp.IntOf("items[i].shipments[j].parcel.height")
        lnParcelLength = loJResp.IntOf("items[i].shipments[j].parcel.length")
        lnParcelDimensionUnit = loJResp.IntOf("items[i].shipments[j].parcel.dimensionUnit")
        lnShippingServiceCarrier = loJResp.IntOf("items[i].shipments[j].shippingService.carrier")
        lnShippingServiceCarrierName = loJResp.IntOf("items[i].shipments[j].shippingService.carrierName")
        lcShippingServiceCarrierServiceName = loJResp.StringOf("items[i].shipments[j].shippingService.carrierServiceName")
        lcShippingServiceCarrierServiceCode = loJResp.StringOf("items[i].shipments[j].shippingService.carrierServiceCode")
        lcTrackingTracking_number = loJResp.StringOf("items[i].shipments[j].tracking.tracking_number")
        lcTrackingTracking_url = loJResp.StringOf("items[i].shipments[j].tracking.tracking_url")
        lnTrackingEstimatedDays = loJResp.IntOf("items[i].shipments[j].tracking.estimatedDays")
        lcShippingLabelLabel_url = loJResp.StringOf("items[i].shipments[j].shippingLabel.label_url")
        lcShippingLabelCommercial_invoice_url = loJResp.StringOf("items[i].shipments[j].shippingLabel.commercial_invoice_url")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].taxesOnShipping")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcName = loJResp.StringOf("items[i].taxesOnShipping[j].name")
        lnValue = loJResp.IntOf("items[i].taxesOnShipping[j].value")
        lcTotal_str = loJResp.StringOf("items[i].taxesOnShipping[j].total")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("items[i].orderExtraFields")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcId = loJResp.StringOf("items[i].orderExtraFields[j].id")
        lcValue_str = loJResp.StringOf("items[i].orderExtraFields[j].value")
        lcCustomerInputType = loJResp.StringOf("items[i].orderExtraFields[j].customerInputType")
        lcTitle = loJResp.StringOf("items[i].orderExtraFields[j].title")
        lcOrderDetailsDisplaySection = loJResp.StringOf("items[i].orderExtraFields[j].orderDetailsDisplaySection")
        lcOrderBy = loJResp.StringOf("items[i].orderExtraFields[j].orderBy")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO

RELEASE loHttp
RELEASE loJsonToken
RELEASE loParams
RELEASE loResp
RELEASE loSbResponseBody
RELEASE loJResp
RELEASE loJson1