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
(PureBasic) 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
IncludeFile "CkHttpResponse.pb" IncludeFile "CkHttp.pb" IncludeFile "CkStringBuilder.pb" IncludeFile "CkJsonObject.pb" Procedure ChilkatExample() ; This example assumes the Chilkat API to have been previously unlocked. ; See Global Unlock Sample for sample code. http.i = CkHttp::ckCreate() If http.i = 0 Debug "Failed to create object." ProcedureReturn EndIf success.i ; 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 jsonToken.i = CkJsonObject::ckCreate() If jsonToken.i = 0 Debug "Failed to create object." ProcedureReturn EndIf CkJsonObject::ckLoadFile(jsonToken,"qa_data/tokens/ecwid.json") CkHttp::ckSetRequestHeader(http,"Accept","application/json") params.i = CkJsonObject::ckCreate() If params.i = 0 Debug "Failed to create object." ProcedureReturn EndIf CkJsonObject::ckUpdateInt(params,"limit",100) CkJsonObject::ckUpdateString(params,"email","joe@example.com") CkJsonObject::ckUpdateString(params,"token",CkJsonObject::ckStringOf(jsonToken,"access_token")) resp.i = CkHttp::ckQuickRequestParams(http,"GET","https://app.ecwid.com/api/v3/storeId/orders",params) If CkHttp::ckLastMethodSuccess(http) = 0 Debug CkHttp::ckLastErrorText(http) CkHttp::ckDispose(http) CkJsonObject::ckDispose(jsonToken) CkJsonObject::ckDispose(params) ProcedureReturn EndIf sbResponseBody.i = CkStringBuilder::ckCreate() If sbResponseBody.i = 0 Debug "Failed to create object." ProcedureReturn EndIf CkHttpResponse::ckGetBodySb(resp,sbResponseBody) jResp.i = CkJsonObject::ckCreate() If jResp.i = 0 Debug "Failed to create object." ProcedureReturn EndIf CkJsonObject::ckLoadSb(jResp,sbResponseBody) CkJsonObject::setCkEmitCompact(jResp, 0) Debug "Response Body:" Debug CkJsonObject::ckEmit(jResp) respStatusCode.i = CkHttpResponse::ckStatusCode(resp) CkHttpResponse::ckDispose(resp) Debug "Response Status Code = " + Str(respStatusCode) If respStatusCode <> 200 Debug "Failed." CkHttp::ckDispose(http) CkJsonObject::ckDispose(jsonToken) CkJsonObject::ckDispose(params) CkStringBuilder::ckDispose(sbResponseBody) CkJsonObject::ckDispose(jResp) ProcedureReturn 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 id.s subtotal.s total_str.s giftCardRedemption.s totalBeforeGiftCardRedemption.s giftCardDoubleSpending.i usdTotal.s tax.s paymentMethod.s paymentStatus.s fulfillmentStatus.s vendorOrderNumber.s orderNumber.i refererUrl.s globalReferer.s createDate.s updateDate.s createTimestamp.i updateTimestamp.i hidden.i orderComments.s privateAdminNotes.s email.s ipAddress.s customerId.i customerGroupId.i customerGroup.s customerTaxExempt.i customerTaxId.s customerTaxIdValid.i reversedTaxApplied.i discount.i couponDiscount.i volumeDiscount.i membershipBasedDiscount.i totalAndMembershipBasedDiscount.i discountCouponId.i discountCouponName.s discountCouponCode.s discountCouponDiscountType.s discountCouponStatus.s discountCouponDiscount.i discountCouponLaunchDate.s discountCouponUsesLimit.s discountCouponApplicationLimit.s discountCouponCreationDate.s discountCouponUpdateDate.s discountCouponOrderCount.i refundedAmount.s billingPersonName.s billingPersonCompanyName.s billingPersonStreet.s billingPersonCity.s billingPersonCountryCode.s billingPersonCountryName.s billingPersonPostalCode.s billingPersonStateOrProvinceCode.s billingPersonStateOrProvinceName.s billingPersonPhone.s shippingPersonName.s shippingPersonCompanyName.s shippingPersonStreet.s shippingPersonCity.s shippingPersonCountryCode.s shippingPersonCountryName.s shippingPersonPostalCode.s shippingPersonStateOrProvinceCode.s shippingPersonStateOrProvinceName.s shippingPersonPhone.s shippingOptionShippingCarrierName.s shippingOptionShippingMethodName.s shippingOptionShippingRate.s shippingOptionEstimatedTransitTime.s shippingOptionIsPickup.i handlingFeeName.s handlingFeeValue.i handlingFeeDescription.s paymentModule.s additionalInfoGoogle_customer_id.s acceptMarketing.i refererId.s disableAllCustomerNotifications.i externalFulfillment.i pricesIncludeTax.i j.i count_j.i value.i v_type.s base.s orderTotal.i id_int.i productId.i categoryId.i price.i productPrice.i sku.s quantity.i shortDescription.s shipping.i quantityInStock.i name.s isShippingRequired.i weight.i trackQuantity.i fixedShippingRateOnly.i imageUrl.s smallThumbnailUrl.s hdThumbnailUrl.s fixedShippingRate.i digital.i couponApplied.i dimensionsLength.i dimensionsWidth.i dimensionsHeight.i couponAmount.s subscriptionId.i recurringChargeSettingsRecurringInterval.s recurringChargeSettingsRecurringIntervalCount.i k.i count_k.i value_str.s json1.i i1.i count_i1.i strVal.s selectionTitle.s selectionModifier.i selectionModifierType.s taxOnDiscountedSubtotal.s taxOnShipping.i includeInPrice.i discountInfoValue.i discountInfoType.s discountInfoBase.s discountInfoOrderTotal.i date.s source.s reason.s amount.s length.i width.i height.i weight_str.s declaredValue.s created.s shipToName.s shipToCompanyName.s shipToStreet.s shipToCity.s shipToCountryCode.s shipToCountryName.s shipToPostalCode.s shipToStateOrProvinceCode.s shipToStateOrProvinceName.s shipToPhone.s shipFromCompanyName.s shipFromStreet.s shipFromCity.s shipFromCountryCode.s shipFromCountryName.s shipFromPostalCode.s shipFromStateOrProvinceCode.s shipFromStateOrProvinceName.s shipFromPhone.s parcelWeight.s parcelWeightUnit.i parcelWidth.i parcelHeight.i parcelLength.i parcelDimensionUnit.i shippingServiceCarrier.i shippingServiceCarrierName.i shippingServiceCarrierServiceName.s shippingServiceCarrierServiceCode.s trackingTracking_number.s trackingTracking_url.s trackingEstimatedDays.i shippingLabelLabel_url.s shippingLabelCommercial_invoice_url.s customerInputType.s title.s orderDetailsDisplaySection.s orderBy.s total.i = CkJsonObject::ckIntOf(jResp,"total") count.i = CkJsonObject::ckIntOf(jResp,"count") offset.i = CkJsonObject::ckIntOf(jResp,"offset") limit.i = CkJsonObject::ckIntOf(jResp,"limit") i.i = 0 count_i.i = CkJsonObject::ckSizeOfArray(jResp,"items") While i < count_i CkJsonObject::setCkI(jResp, i) id = CkJsonObject::ckStringOf(jResp,"items[i].id") subtotal = CkJsonObject::ckStringOf(jResp,"items[i].subtotal") total_str = CkJsonObject::ckStringOf(jResp,"items[i].total") giftCardRedemption = CkJsonObject::ckStringOf(jResp,"items[i].giftCardRedemption") totalBeforeGiftCardRedemption = CkJsonObject::ckStringOf(jResp,"items[i].totalBeforeGiftCardRedemption") giftCardDoubleSpending = CkJsonObject::ckBoolOf(jResp,"items[i].giftCardDoubleSpending") usdTotal = CkJsonObject::ckStringOf(jResp,"items[i].usdTotal") tax = CkJsonObject::ckStringOf(jResp,"items[i].tax") paymentMethod = CkJsonObject::ckStringOf(jResp,"items[i].paymentMethod") paymentStatus = CkJsonObject::ckStringOf(jResp,"items[i].paymentStatus") fulfillmentStatus = CkJsonObject::ckStringOf(jResp,"items[i].fulfillmentStatus") vendorOrderNumber = CkJsonObject::ckStringOf(jResp,"items[i].vendorOrderNumber") orderNumber = CkJsonObject::ckIntOf(jResp,"items[i].orderNumber") refererUrl = CkJsonObject::ckStringOf(jResp,"items[i].refererUrl") globalReferer = CkJsonObject::ckStringOf(jResp,"items[i].globalReferer") createDate = CkJsonObject::ckStringOf(jResp,"items[i].createDate") updateDate = CkJsonObject::ckStringOf(jResp,"items[i].updateDate") createTimestamp = CkJsonObject::ckIntOf(jResp,"items[i].createTimestamp") updateTimestamp = CkJsonObject::ckIntOf(jResp,"items[i].updateTimestamp") hidden = CkJsonObject::ckBoolOf(jResp,"items[i].hidden") orderComments = CkJsonObject::ckStringOf(jResp,"items[i].orderComments") privateAdminNotes = CkJsonObject::ckStringOf(jResp,"items[i].privateAdminNotes") email = CkJsonObject::ckStringOf(jResp,"items[i].email") ipAddress = CkJsonObject::ckStringOf(jResp,"items[i].ipAddress") customerId = CkJsonObject::ckIntOf(jResp,"items[i].customerId") customerGroupId = CkJsonObject::ckIntOf(jResp,"items[i].customerGroupId") customerGroup = CkJsonObject::ckStringOf(jResp,"items[i].customerGroup") customerTaxExempt = CkJsonObject::ckBoolOf(jResp,"items[i].customerTaxExempt") customerTaxId = CkJsonObject::ckStringOf(jResp,"items[i].customerTaxId") customerTaxIdValid = CkJsonObject::ckBoolOf(jResp,"items[i].customerTaxIdValid") reversedTaxApplied = CkJsonObject::ckBoolOf(jResp,"items[i].reversedTaxApplied") discount = CkJsonObject::ckIntOf(jResp,"items[i].discount") couponDiscount = CkJsonObject::ckIntOf(jResp,"items[i].couponDiscount") volumeDiscount = CkJsonObject::ckIntOf(jResp,"items[i].volumeDiscount") membershipBasedDiscount = CkJsonObject::ckIntOf(jResp,"items[i].membershipBasedDiscount") totalAndMembershipBasedDiscount = CkJsonObject::ckIntOf(jResp,"items[i].totalAndMembershipBasedDiscount") discountCouponId = CkJsonObject::ckIntOf(jResp,"items[i].discountCoupon.id") discountCouponName = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.name") discountCouponCode = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.code") discountCouponDiscountType = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.discountType") discountCouponStatus = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.status") discountCouponDiscount = CkJsonObject::ckIntOf(jResp,"items[i].discountCoupon.discount") discountCouponLaunchDate = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.launchDate") discountCouponUsesLimit = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.usesLimit") discountCouponApplicationLimit = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.applicationLimit") discountCouponCreationDate = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.creationDate") discountCouponUpdateDate = CkJsonObject::ckStringOf(jResp,"items[i].discountCoupon.updateDate") discountCouponOrderCount = CkJsonObject::ckIntOf(jResp,"items[i].discountCoupon.orderCount") refundedAmount = CkJsonObject::ckStringOf(jResp,"items[i].refundedAmount") billingPersonName = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.name") billingPersonCompanyName = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.companyName") billingPersonStreet = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.street") billingPersonCity = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.city") billingPersonCountryCode = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.countryCode") billingPersonCountryName = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.countryName") billingPersonPostalCode = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.postalCode") billingPersonStateOrProvinceCode = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.stateOrProvinceCode") billingPersonStateOrProvinceName = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.stateOrProvinceName") billingPersonPhone = CkJsonObject::ckStringOf(jResp,"items[i].billingPerson.phone") shippingPersonName = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.name") shippingPersonCompanyName = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.companyName") shippingPersonStreet = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.street") shippingPersonCity = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.city") shippingPersonCountryCode = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.countryCode") shippingPersonCountryName = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.countryName") shippingPersonPostalCode = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.postalCode") shippingPersonStateOrProvinceCode = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.stateOrProvinceCode") shippingPersonStateOrProvinceName = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.stateOrProvinceName") shippingPersonPhone = CkJsonObject::ckStringOf(jResp,"items[i].shippingPerson.phone") shippingOptionShippingCarrierName = CkJsonObject::ckStringOf(jResp,"items[i].shippingOption.shippingCarrierName") shippingOptionShippingMethodName = CkJsonObject::ckStringOf(jResp,"items[i].shippingOption.shippingMethodName") shippingOptionShippingRate = CkJsonObject::ckStringOf(jResp,"items[i].shippingOption.shippingRate") shippingOptionEstimatedTransitTime = CkJsonObject::ckStringOf(jResp,"items[i].shippingOption.estimatedTransitTime") shippingOptionIsPickup = CkJsonObject::ckBoolOf(jResp,"items[i].shippingOption.isPickup") handlingFeeName = CkJsonObject::ckStringOf(jResp,"items[i].handlingFee.name") handlingFeeValue = CkJsonObject::ckIntOf(jResp,"items[i].handlingFee.value") handlingFeeDescription = CkJsonObject::ckStringOf(jResp,"items[i].handlingFee.description") paymentModule = CkJsonObject::ckStringOf(jResp,"items[i].paymentModule") additionalInfoGoogle_customer_id = CkJsonObject::ckStringOf(jResp,"items[i].additionalInfo.google_customer_id") acceptMarketing = CkJsonObject::ckBoolOf(jResp,"items[i].acceptMarketing") refererId = CkJsonObject::ckStringOf(jResp,"items[i].refererId") disableAllCustomerNotifications = CkJsonObject::ckBoolOf(jResp,"items[i].disableAllCustomerNotifications") externalFulfillment = CkJsonObject::ckBoolOf(jResp,"items[i].externalFulfillment") pricesIncludeTax = CkJsonObject::ckBoolOf(jResp,"items[i].pricesIncludeTax") j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].customDiscount") While j < count_j CkJsonObject::setCkJ(jResp, j) j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].discountInfo") While j < count_j CkJsonObject::setCkJ(jResp, j) value = CkJsonObject::ckIntOf(jResp,"items[i].discountInfo[j].value") v_type = CkJsonObject::ckStringOf(jResp,"items[i].discountInfo[j].type") base = CkJsonObject::ckStringOf(jResp,"items[i].discountInfo[j].base") orderTotal = CkJsonObject::ckIntOf(jResp,"items[i].discountInfo[j].orderTotal") j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].items") While j < count_j CkJsonObject::setCkJ(jResp, j) id_int = CkJsonObject::ckIntOf(jResp,"items[i].items[j].id") productId = CkJsonObject::ckIntOf(jResp,"items[i].items[j].productId") categoryId = CkJsonObject::ckIntOf(jResp,"items[i].items[j].categoryId") price = CkJsonObject::ckIntOf(jResp,"items[i].items[j].price") productPrice = CkJsonObject::ckIntOf(jResp,"items[i].items[j].productPrice") sku = CkJsonObject::ckStringOf(jResp,"items[i].items[j].sku") quantity = CkJsonObject::ckIntOf(jResp,"items[i].items[j].quantity") shortDescription = CkJsonObject::ckStringOf(jResp,"items[i].items[j].shortDescription") tax = CkJsonObject::ckStringOf(jResp,"items[i].items[j].tax") shipping = CkJsonObject::ckIntOf(jResp,"items[i].items[j].shipping") quantityInStock = CkJsonObject::ckIntOf(jResp,"items[i].items[j].quantityInStock") name = CkJsonObject::ckStringOf(jResp,"items[i].items[j].name") isShippingRequired = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].isShippingRequired") weight = CkJsonObject::ckIntOf(jResp,"items[i].items[j].weight") trackQuantity = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].trackQuantity") fixedShippingRateOnly = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].fixedShippingRateOnly") imageUrl = CkJsonObject::ckStringOf(jResp,"items[i].items[j].imageUrl") smallThumbnailUrl = CkJsonObject::ckStringOf(jResp,"items[i].items[j].smallThumbnailUrl") hdThumbnailUrl = CkJsonObject::ckStringOf(jResp,"items[i].items[j].hdThumbnailUrl") fixedShippingRate = CkJsonObject::ckIntOf(jResp,"items[i].items[j].fixedShippingRate") digital = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].digital") couponApplied = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].couponApplied") dimensionsLength = CkJsonObject::ckIntOf(jResp,"items[i].items[j].dimensions.length") dimensionsWidth = CkJsonObject::ckIntOf(jResp,"items[i].items[j].dimensions.width") dimensionsHeight = CkJsonObject::ckIntOf(jResp,"items[i].items[j].dimensions.height") couponAmount = CkJsonObject::ckStringOf(jResp,"items[i].items[j].couponAmount") subscriptionId = CkJsonObject::ckIntOf(jResp,"items[i].items[j].subscriptionId") recurringChargeSettingsRecurringInterval = CkJsonObject::ckStringOf(jResp,"items[i].items[j].recurringChargeSettings.recurringInterval") recurringChargeSettingsRecurringIntervalCount = CkJsonObject::ckIntOf(jResp,"items[i].items[j].recurringChargeSettings.recurringIntervalCount") k = 0 count_k = CkJsonObject::ckSizeOfArray(jResp,"items[i].items[j].selectedOptions") While k < count_k CkJsonObject::setCkK(jResp, k) name = CkJsonObject::ckStringOf(jResp,"items[i].items[j].selectedOptions[k].name") value_str = CkJsonObject::ckStringOf(jResp,"items[i].items[j].selectedOptions[k].value") v_type = CkJsonObject::ckStringOf(jResp,"items[i].items[j].selectedOptions[k].type") json1 = CkJsonObject::ckObjectOf(jResp,"items[i].items[j].selectedOptions[k]") i1 = 0 count_i1 = CkJsonObject::ckSizeOfArray(json1,"valuesArray") While i1 < count_i1 CkJsonObject::setCkI(json1, i1) strVal = CkJsonObject::ckStringOf(json1,"valuesArray[i]") i1 = i1 + 1 Wend CkJsonObject::ckDispose(json1) json1 = CkJsonObject::ckObjectOf(jResp,"items[i].items[j].selectedOptions[k]") i1 = 0 count_i1 = CkJsonObject::ckSizeOfArray(json1,"selections") While i1 < count_i1 CkJsonObject::setCkI(json1, i1) selectionTitle = CkJsonObject::ckStringOf(json1,"selections[i].selectionTitle") selectionModifier = CkJsonObject::ckIntOf(json1,"selections[i].selectionModifier") selectionModifierType = CkJsonObject::ckStringOf(json1,"selections[i].selectionModifierType") i1 = i1 + 1 Wend CkJsonObject::ckDispose(json1) k = k + 1 Wend k = 0 count_k = CkJsonObject::ckSizeOfArray(jResp,"items[i].items[j].taxes") While k < count_k CkJsonObject::setCkK(jResp, k) name = CkJsonObject::ckStringOf(jResp,"items[i].items[j].taxes[k].name") value = CkJsonObject::ckIntOf(jResp,"items[i].items[j].taxes[k].value") total_str = CkJsonObject::ckStringOf(jResp,"items[i].items[j].taxes[k].total") taxOnDiscountedSubtotal = CkJsonObject::ckStringOf(jResp,"items[i].items[j].taxes[k].taxOnDiscountedSubtotal") taxOnShipping = CkJsonObject::ckIntOf(jResp,"items[i].items[j].taxes[k].taxOnShipping") includeInPrice = CkJsonObject::ckBoolOf(jResp,"items[i].items[j].taxes[k].includeInPrice") k = k + 1 Wend k = 0 count_k = CkJsonObject::ckSizeOfArray(jResp,"items[i].items[j].discounts") While k < count_k CkJsonObject::setCkK(jResp, k) discountInfoValue = CkJsonObject::ckIntOf(jResp,"items[i].items[j].discounts[k].discountInfo.value") discountInfoType = CkJsonObject::ckStringOf(jResp,"items[i].items[j].discounts[k].discountInfo.type") discountInfoBase = CkJsonObject::ckStringOf(jResp,"items[i].items[j].discounts[k].discountInfo.base") discountInfoOrderTotal = CkJsonObject::ckIntOf(jResp,"items[i].items[j].discounts[k].discountInfo.orderTotal") total_str = CkJsonObject::ckStringOf(jResp,"items[i].items[j].discounts[k].total") k = k + 1 Wend j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].refunds") While j < count_j CkJsonObject::setCkJ(jResp, j) date = CkJsonObject::ckStringOf(jResp,"items[i].refunds[j].date") source = CkJsonObject::ckStringOf(jResp,"items[i].refunds[j].source") reason = CkJsonObject::ckStringOf(jResp,"items[i].refunds[j].reason") amount = CkJsonObject::ckStringOf(jResp,"items[i].refunds[j].amount") j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].predictedPackage") While j < count_j CkJsonObject::setCkJ(jResp, j) length = CkJsonObject::ckIntOf(jResp,"items[i].predictedPackage[j].length") width = CkJsonObject::ckIntOf(jResp,"items[i].predictedPackage[j].width") height = CkJsonObject::ckIntOf(jResp,"items[i].predictedPackage[j].height") weight_str = CkJsonObject::ckStringOf(jResp,"items[i].predictedPackage[j].weight") declaredValue = CkJsonObject::ckStringOf(jResp,"items[i].predictedPackage[j].declaredValue") j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].shipments") While j < count_j CkJsonObject::setCkJ(jResp, j) id = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].id") created = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].created") shipToName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.name") shipToCompanyName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.companyName") shipToStreet = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.street") shipToCity = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.city") shipToCountryCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.countryCode") shipToCountryName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.countryName") shipToPostalCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.postalCode") shipToStateOrProvinceCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.stateOrProvinceCode") shipToStateOrProvinceName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.stateOrProvinceName") shipToPhone = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipTo.phone") shipFromCompanyName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.companyName") shipFromStreet = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.street") shipFromCity = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.city") shipFromCountryCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.countryCode") shipFromCountryName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.countryName") shipFromPostalCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.postalCode") shipFromStateOrProvinceCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.stateOrProvinceCode") shipFromStateOrProvinceName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.stateOrProvinceName") shipFromPhone = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shipFrom.phone") parcelWeight = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].parcel.weight") parcelWeightUnit = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].parcel.weightUnit") parcelWidth = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].parcel.width") parcelHeight = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].parcel.height") parcelLength = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].parcel.length") parcelDimensionUnit = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].parcel.dimensionUnit") shippingServiceCarrier = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].shippingService.carrier") shippingServiceCarrierName = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].shippingService.carrierName") shippingServiceCarrierServiceName = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shippingService.carrierServiceName") shippingServiceCarrierServiceCode = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shippingService.carrierServiceCode") trackingTracking_number = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].tracking.tracking_number") trackingTracking_url = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].tracking.tracking_url") trackingEstimatedDays = CkJsonObject::ckIntOf(jResp,"items[i].shipments[j].tracking.estimatedDays") shippingLabelLabel_url = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shippingLabel.label_url") shippingLabelCommercial_invoice_url = CkJsonObject::ckStringOf(jResp,"items[i].shipments[j].shippingLabel.commercial_invoice_url") j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].taxesOnShipping") While j < count_j CkJsonObject::setCkJ(jResp, j) name = CkJsonObject::ckStringOf(jResp,"items[i].taxesOnShipping[j].name") value = CkJsonObject::ckIntOf(jResp,"items[i].taxesOnShipping[j].value") total_str = CkJsonObject::ckStringOf(jResp,"items[i].taxesOnShipping[j].total") j = j + 1 Wend j = 0 count_j = CkJsonObject::ckSizeOfArray(jResp,"items[i].orderExtraFields") While j < count_j CkJsonObject::setCkJ(jResp, j) id = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].id") value_str = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].value") customerInputType = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].customerInputType") title = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].title") orderDetailsDisplaySection = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].orderDetailsDisplaySection") orderBy = CkJsonObject::ckStringOf(jResp,"items[i].orderExtraFields[j].orderBy") j = j + 1 Wend i = i + 1 Wend CkHttp::ckDispose(http) CkJsonObject::ckDispose(jsonToken) CkJsonObject::ckDispose(params) CkStringBuilder::ckDispose(sbResponseBody) CkJsonObject::ckDispose(jResp) ProcedureReturn EndProcedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.