Sample code for 30+ languages & platforms
Dart Requires Chilkat v11.0.0+

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 Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

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

  final http = 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
  final jsonToken = CkJsonObject();
  jsonToken.loadFile('qa_data/tokens/ecwid.json');

  http.setRequestHeader('Accept', 'application/json');

  final params = CkJsonObject();
  params.updateInt('limit', 100);
  params.updateString('email', 'joe@example.com');
  params.updateString('token', jsonToken.stringOf('access_token'));

  final resp = CkHttpResponse();
  try {
    http.httpParams('GET', 'https://app.ecwid.com/api/v3/storeId/orders', params, resp);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  final sbResponseBody = CkStringBuilder();
  resp.getBodySb(sbResponseBody);
  final jResp = CkJsonObject();
  jResp.loadSb(sbResponseBody);
  jResp.emitCompact = false;

  print('Response Body:');
  print(jResp.emit());

  final respStatusCode = resp.statusCode;

  print('Response Status Code = $respStatusCode');
  if (respStatusCode != 200) {
    print('Failed.');
    return;
  }

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

  var id = '';
  var subtotal = '';
  var totalStr = '';
  var giftCardRedemption = '';
  var totalBeforeGiftCardRedemption = '';
  var usdTotal = '';
  var tax = '';
  var paymentMethod = '';
  var paymentStatus = '';
  var fulfillmentStatus = '';
  var vendorOrderNumber = '';
  var orderNumber = 0;
  var refererUrl = '';
  var globalReferer = '';
  var createDate = '';
  var updateDate = '';
  var createTimestamp = 0;
  var updateTimestamp = 0;
  var orderComments = '';
  var privateAdminNotes = '';
  var email = '';
  var ipAddress = '';
  var customerId = 0;
  var customerGroupId = 0;
  var customerGroup = '';
  var customerTaxId = '';
  var discount = 0;
  var couponDiscount = 0;
  var volumeDiscount = 0;
  var membershipBasedDiscount = 0;
  var totalAndMembershipBasedDiscount = 0;
  var discountCouponId = 0;
  var discountCouponName = '';
  var discountCouponCode = '';
  var discountCouponDiscountType = '';
  var discountCouponStatus = '';
  var discountCouponDiscount = 0;
  var discountCouponLaunchDate = '';
  var discountCouponUsesLimit = '';
  var discountCouponApplicationLimit = '';
  var discountCouponCreationDate = '';
  var discountCouponUpdateDate = '';
  var discountCouponOrderCount = 0;
  var refundedAmount = '';
  var billingPersonName = '';
  var billingPersonCompanyName = '';
  var billingPersonStreet = '';
  var billingPersonCity = '';
  var billingPersonCountryCode = '';
  var billingPersonCountryName = '';
  var billingPersonPostalCode = '';
  var billingPersonStateOrProvinceCode = '';
  var billingPersonStateOrProvinceName = '';
  var billingPersonPhone = '';
  var shippingPersonName = '';
  var shippingPersonCompanyName = '';
  var shippingPersonStreet = '';
  var shippingPersonCity = '';
  var shippingPersonCountryCode = '';
  var shippingPersonCountryName = '';
  var shippingPersonPostalCode = '';
  var shippingPersonStateOrProvinceCode = '';
  var shippingPersonStateOrProvinceName = '';
  var shippingPersonPhone = '';
  var shippingOptionShippingCarrierName = '';
  var shippingOptionShippingMethodName = '';
  var shippingOptionShippingRate = '';
  var shippingOptionEstimatedTransitTime = '';
  var handlingFeeName = '';
  var handlingFeeValue = 0;
  var handlingFeeDescription = '';
  var paymentModule = '';
  var additionalInfoGoogleCustomerId = '';
  var refererId = '';
  var j = 0;
  var countJ = 0;
  var value = 0;
  var vType = '';
  var baseVar = '';
  var orderTotal = 0;
  var idInt = 0;
  var productId = 0;
  var categoryId = 0;
  var price = 0;
  var productPrice = 0;
  var sku = '';
  var quantity = 0;
  var shortDescription = '';
  var shipping = 0;
  var quantityInStock = 0;
  var name = '';
  var weight = 0;
  var imageUrl = '';
  var smallThumbnailUrl = '';
  var hdThumbnailUrl = '';
  var fixedShippingRate = 0;
  var dimensionsLength = 0;
  var dimensionsWidth = 0;
  var dimensionsHeight = 0;
  var couponAmount = '';
  var subscriptionId = 0;
  var recurringChargeSettingsRecurringInterval = '';
  var recurringChargeSettingsRecurringIntervalCount = 0;
  var k = 0;
  var countK = 0;
  var valueStr = '';
  final json1 = CkJsonObject();
  var i1 = 0;
  var countI1 = 0;
  var strVal = '';
  var selectionTitle = '';
  var selectionModifier = 0;
  var selectionModifierType = '';
  var taxOnDiscountedSubtotal = '';
  var taxOnShipping = 0;
  var discountInfoValue = 0;
  var discountInfoType = '';
  var discountInfoBase = '';
  var discountInfoOrderTotal = 0;
  var date = '';
  var source = '';
  var reason = '';
  var amount = '';
  var length = 0;
  var width = 0;
  var height = 0;
  var weightStr = '';
  var declaredValue = '';
  var created = '';
  var shipToName = '';
  var shipToCompanyName = '';
  var shipToStreet = '';
  var shipToCity = '';
  var shipToCountryCode = '';
  var shipToCountryName = '';
  var shipToPostalCode = '';
  var shipToStateOrProvinceCode = '';
  var shipToStateOrProvinceName = '';
  var shipToPhone = '';
  var shipFromCompanyName = '';
  var shipFromStreet = '';
  var shipFromCity = '';
  var shipFromCountryCode = '';
  var shipFromCountryName = '';
  var shipFromPostalCode = '';
  var shipFromStateOrProvinceCode = '';
  var shipFromStateOrProvinceName = '';
  var shipFromPhone = '';
  var parcelWeight = '';
  var parcelWeightUnit = 0;
  var parcelWidth = 0;
  var parcelHeight = 0;
  var parcelLength = 0;
  var parcelDimensionUnit = 0;
  var shippingServiceCarrier = 0;
  var shippingServiceCarrierName = 0;
  var shippingServiceCarrierServiceName = '';
  var shippingServiceCarrierServiceCode = '';
  var trackingTrackingNumber = '';
  var trackingTrackingUrl = '';
  var trackingEstimatedDays = 0;
  var shippingLabelLabelUrl = '';
  var shippingLabelCommercialInvoiceUrl = '';
  var customerInputType = '';
  var title = '';
  var orderDetailsDisplaySection = '';
  var orderBy = '';

  final total = jResp.intOf('total');
  final count = jResp.intOf('count');
  final offset = jResp.intOf('offset');
  final limit = jResp.intOf('limit');
  var i = 0;
  final countI = jResp.sizeOfArray('items');
  while (i < countI) {
    jResp.i = i;
    id = jResp.stringOf('items[i].id');
    subtotal = jResp.stringOf('items[i].subtotal');
    totalStr = jResp.stringOf('items[i].total');
    giftCardRedemption = jResp.stringOf('items[i].giftCardRedemption');
    totalBeforeGiftCardRedemption = jResp.stringOf('items[i].totalBeforeGiftCardRedemption');
    jResp.boolOf('items[i].giftCardDoubleSpending');
    usdTotal = jResp.stringOf('items[i].usdTotal');
    tax = jResp.stringOf('items[i].tax');
    paymentMethod = jResp.stringOf('items[i].paymentMethod');
    paymentStatus = jResp.stringOf('items[i].paymentStatus');
    fulfillmentStatus = jResp.stringOf('items[i].fulfillmentStatus');
    vendorOrderNumber = jResp.stringOf('items[i].vendorOrderNumber');
    orderNumber = jResp.intOf('items[i].orderNumber');
    refererUrl = jResp.stringOf('items[i].refererUrl');
    globalReferer = jResp.stringOf('items[i].globalReferer');
    createDate = jResp.stringOf('items[i].createDate');
    updateDate = jResp.stringOf('items[i].updateDate');
    createTimestamp = jResp.intOf('items[i].createTimestamp');
    updateTimestamp = jResp.intOf('items[i].updateTimestamp');
    jResp.boolOf('items[i].hidden');
    orderComments = jResp.stringOf('items[i].orderComments');
    privateAdminNotes = jResp.stringOf('items[i].privateAdminNotes');
    email = jResp.stringOf('items[i].email');
    ipAddress = jResp.stringOf('items[i].ipAddress');
    customerId = jResp.intOf('items[i].customerId');
    customerGroupId = jResp.intOf('items[i].customerGroupId');
    customerGroup = jResp.stringOf('items[i].customerGroup');
    jResp.boolOf('items[i].customerTaxExempt');
    customerTaxId = jResp.stringOf('items[i].customerTaxId');
    jResp.boolOf('items[i].customerTaxIdValid');
    jResp.boolOf('items[i].reversedTaxApplied');
    discount = jResp.intOf('items[i].discount');
    couponDiscount = jResp.intOf('items[i].couponDiscount');
    volumeDiscount = jResp.intOf('items[i].volumeDiscount');
    membershipBasedDiscount = jResp.intOf('items[i].membershipBasedDiscount');
    totalAndMembershipBasedDiscount = jResp.intOf('items[i].totalAndMembershipBasedDiscount');
    discountCouponId = jResp.intOf('items[i].discountCoupon.id');
    discountCouponName = jResp.stringOf('items[i].discountCoupon.name');
    discountCouponCode = jResp.stringOf('items[i].discountCoupon.code');
    discountCouponDiscountType = jResp.stringOf('items[i].discountCoupon.discountType');
    discountCouponStatus = jResp.stringOf('items[i].discountCoupon.status');
    discountCouponDiscount = jResp.intOf('items[i].discountCoupon.discount');
    discountCouponLaunchDate = jResp.stringOf('items[i].discountCoupon.launchDate');
    discountCouponUsesLimit = jResp.stringOf('items[i].discountCoupon.usesLimit');
    discountCouponApplicationLimit = jResp.stringOf('items[i].discountCoupon.applicationLimit');
    discountCouponCreationDate = jResp.stringOf('items[i].discountCoupon.creationDate');
    discountCouponUpdateDate = jResp.stringOf('items[i].discountCoupon.updateDate');
    discountCouponOrderCount = jResp.intOf('items[i].discountCoupon.orderCount');
    refundedAmount = jResp.stringOf('items[i].refundedAmount');
    billingPersonName = jResp.stringOf('items[i].billingPerson.name');
    billingPersonCompanyName = jResp.stringOf('items[i].billingPerson.companyName');
    billingPersonStreet = jResp.stringOf('items[i].billingPerson.street');
    billingPersonCity = jResp.stringOf('items[i].billingPerson.city');
    billingPersonCountryCode = jResp.stringOf('items[i].billingPerson.countryCode');
    billingPersonCountryName = jResp.stringOf('items[i].billingPerson.countryName');
    billingPersonPostalCode = jResp.stringOf('items[i].billingPerson.postalCode');
    billingPersonStateOrProvinceCode = jResp.stringOf('items[i].billingPerson.stateOrProvinceCode');
    billingPersonStateOrProvinceName = jResp.stringOf('items[i].billingPerson.stateOrProvinceName');
    billingPersonPhone = jResp.stringOf('items[i].billingPerson.phone');
    shippingPersonName = jResp.stringOf('items[i].shippingPerson.name');
    shippingPersonCompanyName = jResp.stringOf('items[i].shippingPerson.companyName');
    shippingPersonStreet = jResp.stringOf('items[i].shippingPerson.street');
    shippingPersonCity = jResp.stringOf('items[i].shippingPerson.city');
    shippingPersonCountryCode = jResp.stringOf('items[i].shippingPerson.countryCode');
    shippingPersonCountryName = jResp.stringOf('items[i].shippingPerson.countryName');
    shippingPersonPostalCode = jResp.stringOf('items[i].shippingPerson.postalCode');
    shippingPersonStateOrProvinceCode = jResp.stringOf('items[i].shippingPerson.stateOrProvinceCode');
    shippingPersonStateOrProvinceName = jResp.stringOf('items[i].shippingPerson.stateOrProvinceName');
    shippingPersonPhone = jResp.stringOf('items[i].shippingPerson.phone');
    shippingOptionShippingCarrierName = jResp.stringOf('items[i].shippingOption.shippingCarrierName');
    shippingOptionShippingMethodName = jResp.stringOf('items[i].shippingOption.shippingMethodName');
    shippingOptionShippingRate = jResp.stringOf('items[i].shippingOption.shippingRate');
    shippingOptionEstimatedTransitTime = jResp.stringOf('items[i].shippingOption.estimatedTransitTime');
    jResp.boolOf('items[i].shippingOption.isPickup');
    handlingFeeName = jResp.stringOf('items[i].handlingFee.name');
    handlingFeeValue = jResp.intOf('items[i].handlingFee.value');
    handlingFeeDescription = jResp.stringOf('items[i].handlingFee.description');
    paymentModule = jResp.stringOf('items[i].paymentModule');
    additionalInfoGoogleCustomerId = jResp.stringOf('items[i].additionalInfo.google_customer_id');
    jResp.boolOf('items[i].acceptMarketing');
    refererId = jResp.stringOf('items[i].refererId');
    jResp.boolOf('items[i].disableAllCustomerNotifications');
    jResp.boolOf('items[i].externalFulfillment');
    jResp.boolOf('items[i].pricesIncludeTax');
    j = 0;
    countJ = jResp.sizeOfArray('items[i].customDiscount');
    while (j < countJ) {
      jResp.j = j;
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].discountInfo');
    while (j < countJ) {
      jResp.j = j;
      value = jResp.intOf('items[i].discountInfo[j].value');
      vType = jResp.stringOf('items[i].discountInfo[j].type');
      baseVar = jResp.stringOf('items[i].discountInfo[j].base');
      orderTotal = jResp.intOf('items[i].discountInfo[j].orderTotal');
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].items');
    while (j < countJ) {
      jResp.j = j;
      idInt = jResp.intOf('items[i].items[j].id');
      productId = jResp.intOf('items[i].items[j].productId');
      categoryId = jResp.intOf('items[i].items[j].categoryId');
      price = jResp.intOf('items[i].items[j].price');
      productPrice = jResp.intOf('items[i].items[j].productPrice');
      sku = jResp.stringOf('items[i].items[j].sku');
      quantity = jResp.intOf('items[i].items[j].quantity');
      shortDescription = jResp.stringOf('items[i].items[j].shortDescription');
      tax = jResp.stringOf('items[i].items[j].tax');
      shipping = jResp.intOf('items[i].items[j].shipping');
      quantityInStock = jResp.intOf('items[i].items[j].quantityInStock');
      name = jResp.stringOf('items[i].items[j].name');
      jResp.boolOf('items[i].items[j].isShippingRequired');
      weight = jResp.intOf('items[i].items[j].weight');
      jResp.boolOf('items[i].items[j].trackQuantity');
      jResp.boolOf('items[i].items[j].fixedShippingRateOnly');
      imageUrl = jResp.stringOf('items[i].items[j].imageUrl');
      smallThumbnailUrl = jResp.stringOf('items[i].items[j].smallThumbnailUrl');
      hdThumbnailUrl = jResp.stringOf('items[i].items[j].hdThumbnailUrl');
      fixedShippingRate = jResp.intOf('items[i].items[j].fixedShippingRate');
      jResp.boolOf('items[i].items[j].digital');
      jResp.boolOf('items[i].items[j].couponApplied');
      dimensionsLength = jResp.intOf('items[i].items[j].dimensions.length');
      dimensionsWidth = jResp.intOf('items[i].items[j].dimensions.width');
      dimensionsHeight = jResp.intOf('items[i].items[j].dimensions.height');
      couponAmount = jResp.stringOf('items[i].items[j].couponAmount');
      subscriptionId = jResp.intOf('items[i].items[j].subscriptionId');
      recurringChargeSettingsRecurringInterval = jResp.stringOf('items[i].items[j].recurringChargeSettings.recurringInterval');
      recurringChargeSettingsRecurringIntervalCount = jResp.intOf('items[i].items[j].recurringChargeSettings.recurringIntervalCount');
      k = 0;
      countK = jResp.sizeOfArray('items[i].items[j].selectedOptions');
      while (k < countK) {
        jResp.k = k;
        name = jResp.stringOf('items[i].items[j].selectedOptions[k].name');
        valueStr = jResp.stringOf('items[i].items[j].selectedOptions[k].value');
        vType = jResp.stringOf('items[i].items[j].selectedOptions[k].type');
        jResp.objectOf2('items[i].items[j].selectedOptions[k]', json1);

        i1 = 0;
        countI1 = json1.sizeOfArray('valuesArray');
        while (i1 < countI1) {
          json1.i = i1;
          strVal = json1.stringOf('valuesArray[i]');
          i1++;
        }

        jResp.objectOf2('items[i].items[j].selectedOptions[k]', json1);
        i1 = 0;
        countI1 = json1.sizeOfArray('selections');
        while (i1 < countI1) {
          json1.i = i1;
          selectionTitle = json1.stringOf('selections[i].selectionTitle');
          selectionModifier = json1.intOf('selections[i].selectionModifier');
          selectionModifierType = json1.stringOf('selections[i].selectionModifierType');
          i1++;
        }

        k++;
      }

      k = 0;
      countK = jResp.sizeOfArray('items[i].items[j].taxes');
      while (k < countK) {
        jResp.k = k;
        name = jResp.stringOf('items[i].items[j].taxes[k].name');
        value = jResp.intOf('items[i].items[j].taxes[k].value');
        totalStr = jResp.stringOf('items[i].items[j].taxes[k].total');
        taxOnDiscountedSubtotal = jResp.stringOf('items[i].items[j].taxes[k].taxOnDiscountedSubtotal');
        taxOnShipping = jResp.intOf('items[i].items[j].taxes[k].taxOnShipping');
        jResp.boolOf('items[i].items[j].taxes[k].includeInPrice');
        k++;
      }

      k = 0;
      countK = jResp.sizeOfArray('items[i].items[j].discounts');
      while (k < countK) {
        jResp.k = k;
        discountInfoValue = jResp.intOf('items[i].items[j].discounts[k].discountInfo.value');
        discountInfoType = jResp.stringOf('items[i].items[j].discounts[k].discountInfo.type');
        discountInfoBase = jResp.stringOf('items[i].items[j].discounts[k].discountInfo.base');
        discountInfoOrderTotal = jResp.intOf('items[i].items[j].discounts[k].discountInfo.orderTotal');
        totalStr = jResp.stringOf('items[i].items[j].discounts[k].total');
        k++;
      }

      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].refunds');
    while (j < countJ) {
      jResp.j = j;
      date = jResp.stringOf('items[i].refunds[j].date');
      source = jResp.stringOf('items[i].refunds[j].source');
      reason = jResp.stringOf('items[i].refunds[j].reason');
      amount = jResp.stringOf('items[i].refunds[j].amount');
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].predictedPackage');
    while (j < countJ) {
      jResp.j = j;
      length = jResp.intOf('items[i].predictedPackage[j].length');
      width = jResp.intOf('items[i].predictedPackage[j].width');
      height = jResp.intOf('items[i].predictedPackage[j].height');
      weightStr = jResp.stringOf('items[i].predictedPackage[j].weight');
      declaredValue = jResp.stringOf('items[i].predictedPackage[j].declaredValue');
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].shipments');
    while (j < countJ) {
      jResp.j = j;
      id = jResp.stringOf('items[i].shipments[j].id');
      created = jResp.stringOf('items[i].shipments[j].created');
      shipToName = jResp.stringOf('items[i].shipments[j].shipTo.name');
      shipToCompanyName = jResp.stringOf('items[i].shipments[j].shipTo.companyName');
      shipToStreet = jResp.stringOf('items[i].shipments[j].shipTo.street');
      shipToCity = jResp.stringOf('items[i].shipments[j].shipTo.city');
      shipToCountryCode = jResp.stringOf('items[i].shipments[j].shipTo.countryCode');
      shipToCountryName = jResp.stringOf('items[i].shipments[j].shipTo.countryName');
      shipToPostalCode = jResp.stringOf('items[i].shipments[j].shipTo.postalCode');
      shipToStateOrProvinceCode = jResp.stringOf('items[i].shipments[j].shipTo.stateOrProvinceCode');
      shipToStateOrProvinceName = jResp.stringOf('items[i].shipments[j].shipTo.stateOrProvinceName');
      shipToPhone = jResp.stringOf('items[i].shipments[j].shipTo.phone');
      shipFromCompanyName = jResp.stringOf('items[i].shipments[j].shipFrom.companyName');
      shipFromStreet = jResp.stringOf('items[i].shipments[j].shipFrom.street');
      shipFromCity = jResp.stringOf('items[i].shipments[j].shipFrom.city');
      shipFromCountryCode = jResp.stringOf('items[i].shipments[j].shipFrom.countryCode');
      shipFromCountryName = jResp.stringOf('items[i].shipments[j].shipFrom.countryName');
      shipFromPostalCode = jResp.stringOf('items[i].shipments[j].shipFrom.postalCode');
      shipFromStateOrProvinceCode = jResp.stringOf('items[i].shipments[j].shipFrom.stateOrProvinceCode');
      shipFromStateOrProvinceName = jResp.stringOf('items[i].shipments[j].shipFrom.stateOrProvinceName');
      shipFromPhone = jResp.stringOf('items[i].shipments[j].shipFrom.phone');
      parcelWeight = jResp.stringOf('items[i].shipments[j].parcel.weight');
      parcelWeightUnit = jResp.intOf('items[i].shipments[j].parcel.weightUnit');
      parcelWidth = jResp.intOf('items[i].shipments[j].parcel.width');
      parcelHeight = jResp.intOf('items[i].shipments[j].parcel.height');
      parcelLength = jResp.intOf('items[i].shipments[j].parcel.length');
      parcelDimensionUnit = jResp.intOf('items[i].shipments[j].parcel.dimensionUnit');
      shippingServiceCarrier = jResp.intOf('items[i].shipments[j].shippingService.carrier');
      shippingServiceCarrierName = jResp.intOf('items[i].shipments[j].shippingService.carrierName');
      shippingServiceCarrierServiceName = jResp.stringOf('items[i].shipments[j].shippingService.carrierServiceName');
      shippingServiceCarrierServiceCode = jResp.stringOf('items[i].shipments[j].shippingService.carrierServiceCode');
      trackingTrackingNumber = jResp.stringOf('items[i].shipments[j].tracking.tracking_number');
      trackingTrackingUrl = jResp.stringOf('items[i].shipments[j].tracking.tracking_url');
      trackingEstimatedDays = jResp.intOf('items[i].shipments[j].tracking.estimatedDays');
      shippingLabelLabelUrl = jResp.stringOf('items[i].shipments[j].shippingLabel.label_url');
      shippingLabelCommercialInvoiceUrl = jResp.stringOf('items[i].shipments[j].shippingLabel.commercial_invoice_url');
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].taxesOnShipping');
    while (j < countJ) {
      jResp.j = j;
      name = jResp.stringOf('items[i].taxesOnShipping[j].name');
      value = jResp.intOf('items[i].taxesOnShipping[j].value');
      totalStr = jResp.stringOf('items[i].taxesOnShipping[j].total');
      j++;
    }

    j = 0;
    countJ = jResp.sizeOfArray('items[i].orderExtraFields');
    while (j < countJ) {
      jResp.j = j;
      id = jResp.stringOf('items[i].orderExtraFields[j].id');
      valueStr = jResp.stringOf('items[i].orderExtraFields[j].value');
      customerInputType = jResp.stringOf('items[i].orderExtraFields[j].customerInputType');
      title = jResp.stringOf('items[i].orderExtraFields[j].title');
      orderDetailsDisplaySection = jResp.stringOf('items[i].orderExtraFields[j].orderDetailsDisplaySection');
      orderBy = jResp.stringOf('items[i].orderExtraFields[j].orderBy');
      j++;
    }

    i++;
  }
}