Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Delphi DLL Web API Examples

Primary Categories

ABN AMRO
AWS Translate
Activix CRM
Adyen
Amazon MWS
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Bitfinex v2 REST
Bluzone
CallRail
CardConnect
ClickBank
Clickatell
Cloudfare
DocuSign
ETrade
Etsy
Facebook
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Hungary NAV Invoicing
IBM Text to Speech
Jira
MYOB

Magento
MercadoLibre
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Okta OAuth/OIDC
OneLogin OIDC
PayPal
Peoplevox
Populi
QuickBooks
Rabobank
SOAP finkok.com
Shippo
Shopify
SimpleTexting
Square
Stripe
SugarCRM
Trello
Twilio
Twitter
VoiceBase
Vonage
Walmart
Walmart v3
WhatsApp
WooCommerce
Xero
Yousign
_Miscellaneous_
eBay
effectconnect

 

 

 

(Delphi DLL) MercadoLibre - Search Orders from a Buyer

Search for orders from a buyer.

For more information, see https://developers.mercadolibre.com.ar/es_ar/gestiona-ventas#Como-filtrar

Chilkat for Delphi Downloads

Chilkat non-ActiveX DLL for Delphi

Chilkat ActiveX DLL for Delphi

* The examples here use the non-ActiveX DLL.

uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Http, StringBuilder, DtObj, JsonObject;

...

procedure TForm1.Button1Click(Sender: TObject);
var
http: HCkHttp;
jsonToken: HCkJsonObject;
success: Boolean;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
date_closed: HCkDtObj;
date_last_updated: HCkDtObj;
date_created: HCkDtObj;
date_approved: HCkDtObj;
date_last_modified: HCkDtObj;
sellerPhoneNumber: PWideChar;
sellerPhoneExtension: PWideChar;
sellerPhoneArea_code: PWideChar;
sellerPhoneVerified: Boolean;
sellerAlternative_phoneNumber: PWideChar;
sellerAlternative_phoneExtension: PWideChar;
sellerAlternative_phoneArea_code: PWideChar;
sellerNickname: PWideChar;
sellerLast_name: PWideChar;
sellerId: Integer;
sellerFirst_name: PWideChar;
sellerEmail: PWideChar;
fulfilled: Boolean;
buying_mode: PWideChar;
taxesAmount: PWideChar;
taxesCurrency_id: PWideChar;
order_requestChange: PWideChar;
order_requestReturn: PWideChar;
expiration_date: PWideChar;
feedbackSale: PWideChar;
feedbackPurchase: PWideChar;
shippingId: Integer;
id: Integer;
manufacturing_ending_date: PWideChar;
hidden_for_seller: Boolean;
last_updated: PWideChar;
comments: PWideChar;
pack_id: PWideChar;
couponAmount: Integer;
couponId: PWideChar;
shipping_cost: Integer;
application_id: PWideChar;
pickup_id: PWideChar;
status_detail: PWideChar;
buyerBilling_infoDoc_number: PWideChar;
buyerBilling_infoDoc_type: PWideChar;
buyerPhoneNumber: PWideChar;
buyerPhoneExtension: PWideChar;
buyerPhoneArea_code: PWideChar;
buyerPhoneVerified: Boolean;
buyerAlternative_phoneNumber: PWideChar;
buyerAlternative_phoneExtension: PWideChar;
buyerAlternative_phoneArea_code: PWideChar;
buyerNickname: PWideChar;
buyerLast_name: PWideChar;
buyerId: Integer;
buyerFirst_name: PWideChar;
buyerEmail: PWideChar;
total_amount: PWideChar;
paid_amount: PWideChar;
currency_id: PWideChar;
status: PWideChar;
j: Integer;
count_j: Integer;
reason: PWideChar;
status_code: PWideChar;
total_paid_amount: PWideChar;
operation_type: PWideChar;
transaction_amount: PWideChar;
collectorId: Integer;
coupon_id: PWideChar;
installments: Integer;
authorization_code: PWideChar;
taxes_amount: Integer;
coupon_amount: Integer;
installment_amount: PWideChar;
activation_uri: PWideChar;
overpaid_amount: Integer;
card_id: Integer;
issuer_id: PWideChar;
payment_method_id: PWideChar;
payment_type: PWideChar;
deferred_period: PWideChar;
atm_transfer_referenceTransaction_id: PWideChar;
atm_transfer_referenceCompany_id: PWideChar;
site_id: PWideChar;
payer_id: Integer;
marketplace_fee: PWideChar;
order_id: Integer;
transaction_order_id: PWideChar;
k: Integer;
count_k: Integer;
strVal: PWideChar;
itemSeller_custom_field: PWideChar;
itemCondition: PWideChar;
itemCategory_id: PWideChar;
itemVariation_id: PWideChar;
itemSeller_sku: PWideChar;
itemWarranty: PWideChar;
itemId: PWideChar;
itemTitle: PWideChar;
quantity: Integer;
differential_pricing_id: PWideChar;
sale_fee: PWideChar;
listing_type_id: PWideChar;
base_currency_id: PWideChar;
unit_price: PWideChar;
full_unit_price: PWideChar;
base_exchange_rate: PWideChar;
manufacturing_days: PWideChar;
id_str: PWideChar;
name: PWideChar;
query: PWideChar;
sortId: PWideChar;
sortName: PWideChar;
pagingTotal: Integer;
pagingOffset: Integer;
pagingLimit: Integer;
display: PWideChar;
i: Integer;
count_i: Integer;

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

http := CkHttp_Create();

// First get our previously obtained OAuth2 access token.
jsonToken := CkJsonObject_Create();
success := CkJsonObject_LoadFile(jsonToken,'qa_data/tokens/mercadolibre.json');

// Implements the following CURL command:

// curl -X GET https://api.mercadolibre.com/orders/search?buyer=$BUYER_ID&access_token=$ACCESS_TOKEN

// Use the following online tool to generate HTTP code from a CURL command
// Convert a cURL Command to HTTP Source Code

CkHttp_SetUrlVar(http,'access_token',CkJsonObject__stringOf(jsonToken,'access_token'));
// Use an actual buyer ID here..
CkHttp_SetUrlVar(http,'buyer_id','577815702');

sbResponseBody := CkStringBuilder_Create();
success := CkHttp_QuickGetSb(http,'https://api.mercadolibre.com/orders/search?buyer={$buyer_id}&access_token={$access_token}',sbResponseBody);
if (success = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttp__lastHeader(http));
    Memo1.Lines.Add('----');
    Memo1.Lines.Add('Response Body:');
    Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
    Memo1.Lines.Add('Failed.');
    Exit;
  end;

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));

respStatusCode := CkHttp_getLastStatus(http);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttp__lastHeader(http));
    Memo1.Lines.Add('----');
    Memo1.Lines.Add('Response Body:');
    Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
    Memo1.Lines.Add('Failed.');
    Exit;
  end;

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "query": "2032217210",
//   "results": [
//     {
//       "seller": {
//         "phone": {
//           "number": "11971427863",
//           "extension": "",
//           "area_code": null,
//           "verified": false
//         },
//         "alternative_phone": {
//           "number": "",
//           "extension": "",
//           "area_code": ""
//         },
//         "nickname": "VENDASDKMB",
//         "last_name": "Cheracomo",
//         "id": 239432672,
//         "first_name": "Demétrio",
//         "email": "dcherac.8m6k0q+2-ogiydgmrsge3tenby@mail.mercadolivre.com"
//       },
//       "payments": [
//         {
//           "reason": "Kit Com 03 Adesivo Spray 3m 75 Cola Silk Sublimação 300g",
//           "status_code": null,
//           "total_paid_amount": 129.95,
//           "operation_type": "regular_payment",
//           "transaction_amount": 129.95,
//           "date_approved": "2019-05-22T03:51:07.000-04:00",
//           "collector": {
//             "id": 239432672
//           },
//           "coupon_id": null,
//           "installments": 1,
//           "authorization_code": "008877",
//           "taxes_amount": 0,
//           "id": 4792155710,
//           "date_last_modified": "2019-05-22T03:51:07.000-04:00",
//           "coupon_amount": 0,
//           "available_actions": [
//             "refund"
//           ],
//           "shipping_cost": 0,
//           "installment_amount": 129.95,
//           "date_created": "2019-05-22T03:51:05.000-04:00",
//           "activation_uri": null,
//           "overpaid_amount": 0,
//           "card_id": 203453778,
//           "status_detail": "accredited",
//           "issuer_id": "24",
//           "payment_method_id": "master",
//           "payment_type": "credit_card",
//           "deferred_period": null,
//           "atm_transfer_reference": {
//             "transaction_id": "135292",
//             "company_id": null
//           },
//           "site_id": "MLB",
//           "payer_id": 89660613,
//           "marketplace_fee": 14.290000000000001,
//           "order_id": 2032217210,
//           "currency_id": "BRL",
//           "status": "approved",
//           "transaction_order_id": null
//         }
//       ],
//       "fulfilled": true,
//       "buying_mode": "buy_equals_pay",
//       "taxes": {
//         "amount": null,
//         "currency_id": null
//       },
//       "order_request": {
//         "change": null,
//         "return": null
//       },
//       "expiration_date": "2019-06-19T03:51:07.000-04:00",
//       "feedback": {
//         "sale": null,
//         "purchase": null
//       },
//       "shipping": {
//         "id": 27968238880
//       },
//       "date_closed": "2019-05-22T03:51:07.000-04:00",
//       "id": 2032217210,
//       "manufacturing_ending_date": null,
//       "hidden_for_seller": false,
//       "order_items": [
//         {
//           "item": {
//             "seller_custom_field": null,
//             "condition": "new",
//             "category_id": "MLB33383",
//             "variation_id": null,
//             "variation_attributes": [
//             ],
//             "seller_sku": null,
//             "warranty": "Garantia de 1 ano fabricante",
//             "id": "MLB1054990648",
//             "title": "Kit Com 03 Adesivo Spray 3m 75 Cola Silk Sublimação 300g"
//           },
//           "quantity": 1,
//           "differential_pricing_id": null,
//           "sale_fee": 14.29,
//           "listing_type_id": "gold_special",
//           "base_currency_id": null,
//           "unit_price": 129.95,
//           "full_unit_price": 129.95,
//           "base_exchange_rate": null,
//           "currency_id": "BRL",
//           "manufacturing_days": null
//         }
//       ],
//       "date_last_updated": "2020-02-14T02:55:49.811Z",
//       "last_updated": "2019-05-28T15:16:04.000-04:00",
//       "comments": null,
//       "pack_id": null,
//       "coupon": {
//         "amount": 0,
//         "id": null
//       },
//       "shipping_cost": 0,
//       "date_created": "2019-05-22T03:51:05.000-04:00",
//       "application_id": "7092",
//       "pickup_id": null,
//       "status_detail": null,
//       "tags": [
//         "delivered",
//         "paid"
//       ],
//       "buyer": {
//         "billing_info": {
//           "doc_number": "02183212950",
//           "doc_type": "CPF"
//         },
//         "phone": {
//           "number": "99962663",
//           "extension": "",
//           "area_code": "41",
//           "verified": false
//         },
//         "alternative_phone": {
//           "number": "30576339",
//           "extension": "",
//           "area_code": "41"
//         },
//         "nickname": "S.VICTORHUGO",
//         "last_name": "Schemberger",
//         "id": 89660613,
//         "first_name": "Victor Hugo",
//         "email": "vschemb.y14cdz+2-ogiydgmrsge3tenbz@mail.mercadolivre.com"
//       },
//       "total_amount": 129.95,
//       "paid_amount": 129.95,
//       "mediations": [
//       ],
//       "currency_id": "BRL",
//       "status": "paid"
//     }
//   ],
//   "sort": {
//     "id": "date_asc",
//     "name": "Date ascending"
//   },
//   "available_sorts": [
//     {
//       "id": "date_desc",
//       "name": "Date descending"
//     }
//   ],
//   "filters": [
//   ],
//   "paging": {
//     "total": 1,
//     "offset": 0,
//     "limit": 50
//   },
//   "display": "complete"
// }

// Sample code for parsing the JSON response...
// Use the following online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON

date_closed := CkDtObj_Create();
date_last_updated := CkDtObj_Create();
date_created := CkDtObj_Create();
date_approved := CkDtObj_Create();
date_last_modified := CkDtObj_Create();

query := CkJsonObject__stringOf(jResp,'query');
sortId := CkJsonObject__stringOf(jResp,'sort.id');
sortName := CkJsonObject__stringOf(jResp,'sort.name');
pagingTotal := CkJsonObject_IntOf(jResp,'paging.total');
pagingOffset := CkJsonObject_IntOf(jResp,'paging.offset');
pagingLimit := CkJsonObject_IntOf(jResp,'paging.limit');
display := CkJsonObject__stringOf(jResp,'display');
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'results');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    sellerPhoneNumber := CkJsonObject__stringOf(jResp,'results[i].seller.phone.number');
    sellerPhoneExtension := CkJsonObject__stringOf(jResp,'results[i].seller.phone.extension');
    sellerPhoneArea_code := CkJsonObject__stringOf(jResp,'results[i].seller.phone.area_code');
    sellerPhoneVerified := CkJsonObject_BoolOf(jResp,'results[i].seller.phone.verified');
    sellerAlternative_phoneNumber := CkJsonObject__stringOf(jResp,'results[i].seller.alternative_phone.number');
    sellerAlternative_phoneExtension := CkJsonObject__stringOf(jResp,'results[i].seller.alternative_phone.extension');
    sellerAlternative_phoneArea_code := CkJsonObject__stringOf(jResp,'results[i].seller.alternative_phone.area_code');
    sellerNickname := CkJsonObject__stringOf(jResp,'results[i].seller.nickname');
    sellerLast_name := CkJsonObject__stringOf(jResp,'results[i].seller.last_name');
    sellerId := CkJsonObject_IntOf(jResp,'results[i].seller.id');
    sellerFirst_name := CkJsonObject__stringOf(jResp,'results[i].seller.first_name');
    sellerEmail := CkJsonObject__stringOf(jResp,'results[i].seller.email');
    fulfilled := CkJsonObject_BoolOf(jResp,'results[i].fulfilled');
    buying_mode := CkJsonObject__stringOf(jResp,'results[i].buying_mode');
    taxesAmount := CkJsonObject__stringOf(jResp,'results[i].taxes.amount');
    taxesCurrency_id := CkJsonObject__stringOf(jResp,'results[i].taxes.currency_id');
    order_requestChange := CkJsonObject__stringOf(jResp,'results[i].order_request.change');
    order_requestReturn := CkJsonObject__stringOf(jResp,'results[i].order_request.return');
    expiration_date := CkJsonObject__stringOf(jResp,'results[i].expiration_date');
    feedbackSale := CkJsonObject__stringOf(jResp,'results[i].feedback.sale');
    feedbackPurchase := CkJsonObject__stringOf(jResp,'results[i].feedback.purchase');
    shippingId := CkJsonObject_IntOf(jResp,'results[i].shipping.id');
    CkJsonObject_DtOf(jResp,'results[i].date_closed',False,date_closed);
    id := CkJsonObject_IntOf(jResp,'results[i].id');
    manufacturing_ending_date := CkJsonObject__stringOf(jResp,'results[i].manufacturing_ending_date');
    hidden_for_seller := CkJsonObject_BoolOf(jResp,'results[i].hidden_for_seller');
    CkJsonObject_DtOf(jResp,'results[i].date_last_updated',False,date_last_updated);
    last_updated := CkJsonObject__stringOf(jResp,'results[i].last_updated');
    comments := CkJsonObject__stringOf(jResp,'results[i].comments');
    pack_id := CkJsonObject__stringOf(jResp,'results[i].pack_id');
    couponAmount := CkJsonObject_IntOf(jResp,'results[i].coupon.amount');
    couponId := CkJsonObject__stringOf(jResp,'results[i].coupon.id');
    shipping_cost := CkJsonObject_IntOf(jResp,'results[i].shipping_cost');
    CkJsonObject_DtOf(jResp,'results[i].date_created',False,date_created);
    application_id := CkJsonObject__stringOf(jResp,'results[i].application_id');
    pickup_id := CkJsonObject__stringOf(jResp,'results[i].pickup_id');
    status_detail := CkJsonObject__stringOf(jResp,'results[i].status_detail');
    buyerBilling_infoDoc_number := CkJsonObject__stringOf(jResp,'results[i].buyer.billing_info.doc_number');
    buyerBilling_infoDoc_type := CkJsonObject__stringOf(jResp,'results[i].buyer.billing_info.doc_type');
    buyerPhoneNumber := CkJsonObject__stringOf(jResp,'results[i].buyer.phone.number');
    buyerPhoneExtension := CkJsonObject__stringOf(jResp,'results[i].buyer.phone.extension');
    buyerPhoneArea_code := CkJsonObject__stringOf(jResp,'results[i].buyer.phone.area_code');
    buyerPhoneVerified := CkJsonObject_BoolOf(jResp,'results[i].buyer.phone.verified');
    buyerAlternative_phoneNumber := CkJsonObject__stringOf(jResp,'results[i].buyer.alternative_phone.number');
    buyerAlternative_phoneExtension := CkJsonObject__stringOf(jResp,'results[i].buyer.alternative_phone.extension');
    buyerAlternative_phoneArea_code := CkJsonObject__stringOf(jResp,'results[i].buyer.alternative_phone.area_code');
    buyerNickname := CkJsonObject__stringOf(jResp,'results[i].buyer.nickname');
    buyerLast_name := CkJsonObject__stringOf(jResp,'results[i].buyer.last_name');
    buyerId := CkJsonObject_IntOf(jResp,'results[i].buyer.id');
    buyerFirst_name := CkJsonObject__stringOf(jResp,'results[i].buyer.first_name');
    buyerEmail := CkJsonObject__stringOf(jResp,'results[i].buyer.email');
    total_amount := CkJsonObject__stringOf(jResp,'results[i].total_amount');
    paid_amount := CkJsonObject__stringOf(jResp,'results[i].paid_amount');
    currency_id := CkJsonObject__stringOf(jResp,'results[i].currency_id');
    status := CkJsonObject__stringOf(jResp,'results[i].status');
    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'results[i].payments');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        reason := CkJsonObject__stringOf(jResp,'results[i].payments[j].reason');
        status_code := CkJsonObject__stringOf(jResp,'results[i].payments[j].status_code');
        total_paid_amount := CkJsonObject__stringOf(jResp,'results[i].payments[j].total_paid_amount');
        operation_type := CkJsonObject__stringOf(jResp,'results[i].payments[j].operation_type');
        transaction_amount := CkJsonObject__stringOf(jResp,'results[i].payments[j].transaction_amount');
        CkJsonObject_DtOf(jResp,'results[i].payments[j].date_approved',False,date_approved);
        collectorId := CkJsonObject_IntOf(jResp,'results[i].payments[j].collector.id');
        coupon_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].coupon_id');
        installments := CkJsonObject_IntOf(jResp,'results[i].payments[j].installments');
        authorization_code := CkJsonObject__stringOf(jResp,'results[i].payments[j].authorization_code');
        taxes_amount := CkJsonObject_IntOf(jResp,'results[i].payments[j].taxes_amount');
        id := CkJsonObject_IntOf(jResp,'results[i].payments[j].id');
        CkJsonObject_DtOf(jResp,'results[i].payments[j].date_last_modified',False,date_last_modified);
        coupon_amount := CkJsonObject_IntOf(jResp,'results[i].payments[j].coupon_amount');
        shipping_cost := CkJsonObject_IntOf(jResp,'results[i].payments[j].shipping_cost');
        installment_amount := CkJsonObject__stringOf(jResp,'results[i].payments[j].installment_amount');
        CkJsonObject_DtOf(jResp,'results[i].payments[j].date_created',False,date_created);
        activation_uri := CkJsonObject__stringOf(jResp,'results[i].payments[j].activation_uri');
        overpaid_amount := CkJsonObject_IntOf(jResp,'results[i].payments[j].overpaid_amount');
        card_id := CkJsonObject_IntOf(jResp,'results[i].payments[j].card_id');
        status_detail := CkJsonObject__stringOf(jResp,'results[i].payments[j].status_detail');
        issuer_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].issuer_id');
        payment_method_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].payment_method_id');
        payment_type := CkJsonObject__stringOf(jResp,'results[i].payments[j].payment_type');
        deferred_period := CkJsonObject__stringOf(jResp,'results[i].payments[j].deferred_period');
        atm_transfer_referenceTransaction_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].atm_transfer_reference.transaction_id');
        atm_transfer_referenceCompany_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].atm_transfer_reference.company_id');
        site_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].site_id');
        payer_id := CkJsonObject_IntOf(jResp,'results[i].payments[j].payer_id');
        marketplace_fee := CkJsonObject__stringOf(jResp,'results[i].payments[j].marketplace_fee');
        order_id := CkJsonObject_IntOf(jResp,'results[i].payments[j].order_id');
        currency_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].currency_id');
        status := CkJsonObject__stringOf(jResp,'results[i].payments[j].status');
        transaction_order_id := CkJsonObject__stringOf(jResp,'results[i].payments[j].transaction_order_id');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'results[i].payments[j].available_actions');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            strVal := CkJsonObject__stringOf(jResp,'results[i].payments[j].available_actions[k]');
            k := k + 1;
          end;

        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'results[i].order_items');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        itemSeller_custom_field := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.seller_custom_field');
        itemCondition := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.condition');
        itemCategory_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.category_id');
        itemVariation_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.variation_id');
        itemSeller_sku := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.seller_sku');
        itemWarranty := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.warranty');
        itemId := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.id');
        itemTitle := CkJsonObject__stringOf(jResp,'results[i].order_items[j].item.title');
        quantity := CkJsonObject_IntOf(jResp,'results[i].order_items[j].quantity');
        differential_pricing_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].differential_pricing_id');
        sale_fee := CkJsonObject__stringOf(jResp,'results[i].order_items[j].sale_fee');
        listing_type_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].listing_type_id');
        base_currency_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].base_currency_id');
        unit_price := CkJsonObject__stringOf(jResp,'results[i].order_items[j].unit_price');
        full_unit_price := CkJsonObject__stringOf(jResp,'results[i].order_items[j].full_unit_price');
        base_exchange_rate := CkJsonObject__stringOf(jResp,'results[i].order_items[j].base_exchange_rate');
        currency_id := CkJsonObject__stringOf(jResp,'results[i].order_items[j].currency_id');
        manufacturing_days := CkJsonObject__stringOf(jResp,'results[i].order_items[j].manufacturing_days');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'results[i].order_items[j].item.variation_attributes');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            k := k + 1;
          end;

        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'results[i].tags');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'results[i].tags[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'results[i].mediations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        j := j + 1;
      end;

    i := i + 1;
  end;

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'available_sorts');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    id_str := CkJsonObject__stringOf(jResp,'available_sorts[i].id');
    name := CkJsonObject__stringOf(jResp,'available_sorts[i].name');
    i := i + 1;
  end;

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'filters');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    i := i + 1;
  end;

CkHttp_Dispose(http);
CkJsonObject_Dispose(jsonToken);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
CkDtObj_Dispose(date_closed);
CkDtObj_Dispose(date_last_updated);
CkDtObj_Dispose(date_created);
CkDtObj_Dispose(date_approved);
CkDtObj_Dispose(date_last_modified);

end;

 

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