Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Lianja) Ecwid - Search OrdersSee more Ecwid ExamplesSearch 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
// This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loHttp = createobject("CkHttp") // 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("CkJsonObject") loJsonToken.LoadFile("qa_data/tokens/ecwid.json") loHttp.SetRequestHeader("Accept","application/json") loParams = createobject("CkJsonObject") loParams.UpdateInt("limit",100) loParams.UpdateString("email","joe@example.com") loParams.UpdateString("token",loJsonToken.StringOf("access_token")) loResp = loHttp.QuickRequestParams("GET","https://app.ecwid.com/api/v3/storeId/orders",loParams) if (loHttp.LastMethodSuccess = .F.) then ? loHttp.LastErrorText release loHttp release loJsonToken release loParams return endif loSbResponseBody = createobject("CkStringBuilder") loResp.GetBodySb(loSbResponseBody) loJResp = createobject("CkJsonObject") loJResp.LoadSb(loSbResponseBody) loJResp.EmitCompact = .F. ? "Response Body:" ? loJResp.Emit() lnRespStatusCode = loResp.StatusCode release loResp ? "Response Status Code = " + str(lnRespStatusCode) if (lnRespStatusCode <> 200) then ? "Failed." release loHttp release loJsonToken release loParams release loSbResponseBody release loJResp return 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 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") llGiftCardDoubleSpending = 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") llHidden = 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") llCustomerTaxExempt = loJResp.BoolOf("items[i].customerTaxExempt") lcCustomerTaxId = loJResp.StringOf("items[i].customerTaxId") llCustomerTaxIdValid = loJResp.BoolOf("items[i].customerTaxIdValid") llReversedTaxApplied = 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") llShippingOptionIsPickup = 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") llAcceptMarketing = loJResp.BoolOf("items[i].acceptMarketing") lcRefererId = loJResp.StringOf("items[i].refererId") llDisableAllCustomerNotifications = loJResp.BoolOf("items[i].disableAllCustomerNotifications") llExternalFulfillment = loJResp.BoolOf("items[i].externalFulfillment") llPricesIncludeTax = 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") llIsShippingRequired = loJResp.BoolOf("items[i].items[j].isShippingRequired") lnWeight = loJResp.IntOf("items[i].items[j].weight") llTrackQuantity = loJResp.BoolOf("items[i].items[j].trackQuantity") llFixedShippingRateOnly = 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") llDigital = loJResp.BoolOf("items[i].items[j].digital") llCouponApplied = 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") loJson1 = loJResp.ObjectOf("items[i].items[j].selectedOptions[k]") lnI1 = 0 lnCount_i1 = loJson1.SizeOfArray("valuesArray") do while lnI1 < lnCount_i1 loJson1.I = lnI1 lcStrVal = loJson1.StringOf("valuesArray[i]") lnI1 = lnI1 + 1 enddo release loJson1 loJson1 = loJResp.ObjectOf("items[i].items[j].selectedOptions[k]") 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 release loJson1 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") llIncludeInPrice = 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 loSbResponseBody release loJResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.