Unicode C Dynamics CRM: Retrieve a Single Account

Back to Index

This example returns data for an account entity instance with the primary key value equal to aca19cdd-88df-e311-b8e5-6c3be5a8b200. (This is for the Blue Yonder Airlines sample data.)

Documentation: https://msdn.microsoft.com/en-us/library/gg334767.aspx#Basic query example

CURL Command

curl -X GET https://my-dynamics-domain.api.crm.dynamics.com/api/data/v9.0/accounts(aca19cdd-88df-e311-b8e5-6c3be5a8b200) \
  -H "Accept: application/json" \
  -H "OData-MaxVersion: 4.0"  \
  -H "OData-Version: 4.0" \
  -H "Authorization: Bearer DYNAMICS_CRM_ACCESS_TOKEN"

Unicode C Example

#include <C_CkRestW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>

void ChilkatSample(void)
    {
    HCkRestW rest;
    BOOL success;
    BOOL bTls;
    int port;
    BOOL bAutoReconnect;
    HCkStringBuilderW sbResponseBody;
    int respStatusCode;
    HCkJsonObjectW jsonResponse;
    const wchar_t *odataContext;
    const wchar_t *odataEtag;
    int paymenttermscode;
    int industrycode;
    int address1_latitude;
    BOOL merged;
    const wchar_t *accountnumber;
    int statecode;
    const wchar_t *emailaddress1;
    int exchangerate;
    int openrevenue_state;
    const wchar_t *tickersymbol;
    const wchar_t *name;
    const wchar_t *websiteurl;
    int opendeals;
    const wchar_t *modifiedon;
    const wchar_t *v_owninguser_value;
    const wchar_t *v_primarycontactid_value;
    int importsequencenumber;
    const wchar_t *address1_composite;
    int address1_longitude;
    BOOL donotpostalmail;
    int accountratingcode;
    int numberofemployees;
    BOOL marketingonly;
    int revenue_base;
    int preferredcontactmethodcode;
    const wchar_t *v_territoryid_value;
    const wchar_t *v_ownerid_value;
    const wchar_t *entityimage;
    const wchar_t *description;
    int customersizecode;
    const wchar_t *entityimage_url;
    const wchar_t *openrevenue_date;
    int openrevenue_base;
    BOOL donotemail;
    int address2_shippingmethodcode;
    int entityimage_timestamp;
    int timezoneruleversionnumber;
    int revenue;
    int address2_freighttermscode;
    int statuscode;
    const wchar_t *createdon;
    int msdyn_travelchargetype;
    int opendeals_state;
    int openrevenue;
    BOOL donotsendmm;
    BOOL donotfax;
    BOOL donotbulkpostalmail;
    const wchar_t *address1_country;
    int versionnumber;
    const wchar_t *address1_line1;
    const wchar_t *address1_line2;
    BOOL creditonhold;
    const wchar_t *telephone1;
    const wchar_t *v_owningbusinessunit_value;
    BOOL donotphone;
    const wchar_t *v_transactioncurrencyid_value;
    const wchar_t *accountid;
    BOOL donotbulkemail;
    const wchar_t *v_modifiedby_value;
    BOOL followemail;
    int businesstypecode;
    const wchar_t *v_createdby_value;
    const wchar_t *address1_city;
    int territorycode;
    int address2_addresstypecode;
    int ownershipcode;
    const wchar_t *fax;
    BOOL msdyn_taxexempt;
    const wchar_t *address1_addressid;
    BOOL participatesinworkflow;
    int accountclassificationcode;
    const wchar_t *overriddencreatedon;
    const wchar_t *address2_addressid;
    const wchar_t *address1_postalcode;
    const wchar_t *entityimageid;
    int shippingmethodcode;
    const wchar_t *opendeals_date;
    const wchar_t *lastusedincampaign;
    const wchar_t *address1_name;
    const wchar_t *v_msdyn_billingaccount_value;
    const wchar_t *creditlimit;
    const wchar_t *v_msdyn_salestaxcode_value;
    const wchar_t *telephone3;
    const wchar_t *msdyn_externalaccountid;
    const wchar_t *address1_freighttermscode;
    const wchar_t *lastonholdtime;
    const wchar_t *address2_line1;
    const wchar_t *onholdtime;
    const wchar_t *msdyn_workorderinstructions;
    const wchar_t *address2_telephone1;
    const wchar_t *address1_fax;
    const wchar_t *v_createdonbehalfby_value;
    const wchar_t *address2_city;
    const wchar_t *address2_latitude;
    const wchar_t *creditlimit_base;
    const wchar_t *address1_telephone2;
    const wchar_t *aging90_base;
    const wchar_t *address2_postalcode;
    const wchar_t *address2_name;
    const wchar_t *primarysatoriid;
    const wchar_t *v_masterid_value;
    const wchar_t *aging30;
    const wchar_t *address2_county;
    const wchar_t *v_originatingleadid_value;
    const wchar_t *emailaddress3;
    const wchar_t *address1_shippingmethodcode;
    const wchar_t *int_facebook;
    const wchar_t *address1_stateorprovince;
    const wchar_t *utcconversiontimezonecode;
    const wchar_t *sharesoutstanding;
    const wchar_t *sic;
    const wchar_t *v_preferredsystemuserid_value;
    const wchar_t *address2_longitude;
    const wchar_t *v_defaultpricelevelid_value;
    const wchar_t *address1_primarycontactname;
    const wchar_t *address1_county;
    const wchar_t *address2_postofficebox;
    const wchar_t *v_preferredserviceid_value;
    const wchar_t *address1_upszone;
    const wchar_t *stageid;
    const wchar_t *address2_composite;
    const wchar_t *marketcap;
    const wchar_t *aging60;
    const wchar_t *customertypecode;
    const wchar_t *msdyn_travelcharge;
    const wchar_t *address1_postofficebox;
    const wchar_t *v_msdyn_preferredresource_value;
    const wchar_t *yominame;
    const wchar_t *address2_primarycontactname;
    const wchar_t *address2_country;
    const wchar_t *v_msdyn_serviceterritory_value;
    const wchar_t *traversedpath;
    const wchar_t *int_twitter;
    const wchar_t *aging90;
    const wchar_t *address1_telephone1;
    const wchar_t *msdyn_taxexemptnumber;
    const wchar_t *address2_telephone3;
    const wchar_t *telephone2;
    const wchar_t *v_owningteam_value;
    const wchar_t *address2_line2;
    const wchar_t *msdyn_travelcharge_base;
    const wchar_t *primarytwitterid;
    const wchar_t *timespentbymeonemailandmeetings;
    const wchar_t *v_modifiedbyexternalparty_value;
    const wchar_t *v_slaid_value;
    const wchar_t *ftpsiteurl;
    const wchar_t *v_preferredequipmentid_value;
    const wchar_t *processid;
    const wchar_t *address2_telephone2;
    const wchar_t *address1_addresstypecode;
    const wchar_t *address1_utcoffset;
    const wchar_t *v_parentaccountid_value;
    const wchar_t *v_createdbyexternalparty_value;
    const wchar_t *address2_fax;
    const wchar_t *aging60_base;
    const wchar_t *v_modifiedonbehalfby_value;
    const wchar_t *stockexchange;
    const wchar_t *preferredappointmentdaycode;
    const wchar_t *address1_line3;
    const wchar_t *aging30_base;
    const wchar_t *address2_upszone;
    const wchar_t *v_slainvokedid_value;
    const wchar_t *address2_line3;
    const wchar_t *address2_utcoffset;
    const wchar_t *address2_stateorprovince;
    const wchar_t *preferredappointmenttimecode;
    const wchar_t *emailaddress2;
    const wchar_t *marketcap_base;
    const wchar_t *address1_telephone3;
    const wchar_t *accountcategorycode;

    rest = CkRestW_Create();

    //  URL: https://my-dynamics-domain.api.crm.dynamics.com/api/data/v9.0/accounts(aca19cdd-88df-e311-b8e5-6c3be5a8b200)
    bTls = TRUE;
    port = 443;
    bAutoReconnect = TRUE;
    success = CkRestW_Connect(rest,L"my-dynamics-domain.api.crm.dynamics.com",port,bTls,bAutoReconnect);
    if (success != TRUE) {
        wprintf(L"ConnectFailReason: %d\n",CkRestW_getConnectFailReason(rest));
        wprintf(L"%s\n",CkRestW_lastErrorText(rest));
        CkRestW_Dispose(rest);
        return;
    }

    CkRestW_AddHeader(rest,L"OData-MaxVersion",L"4.0");
    CkRestW_AddHeader(rest,L"Accept",L"application/json");
    CkRestW_AddHeader(rest,L"OData-Version",L"4.0");
    CkRestW_AddHeader(rest,L"Authorization",L"Bearer DYNAMICS_CRM_ACCESS_TOKEN");

    sbResponseBody = CkStringBuilderW_Create();
    success = CkRestW_FullRequestNoBodySb(rest,L"GET",L"/api/data/v9.0/accounts(aca19cdd-88df-e311-b8e5-6c3be5a8b200)",sbResponseBody);
    if (success != TRUE) {
        wprintf(L"%s\n",CkRestW_lastErrorText(rest));
        CkRestW_Dispose(rest);
        CkStringBuilderW_Dispose(sbResponseBody);
        return;
    }

    respStatusCode = CkRestW_getResponseStatusCode(rest);
    if (respStatusCode >= 400) {
        wprintf(L"Response Status Code = %d\n",respStatusCode);
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkRestW_responseHeader(rest));
        wprintf(L"Response Body:\n");
        wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
        CkRestW_Dispose(rest);
        CkStringBuilderW_Dispose(sbResponseBody);
        return;
    }

    jsonResponse = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jsonResponse,sbResponseBody);

    odataContext = CkJsonObjectW_stringOf(jsonResponse,L"\"@odata.context\"");
    odataEtag = CkJsonObjectW_stringOf(jsonResponse,L"\"@odata.etag\"");
    paymenttermscode = CkJsonObjectW_IntOf(jsonResponse,L"paymenttermscode");
    industrycode = CkJsonObjectW_IntOf(jsonResponse,L"industrycode");
    address1_latitude = CkJsonObjectW_IntOf(jsonResponse,L"address1_latitude");
    merged = CkJsonObjectW_BoolOf(jsonResponse,L"merged");
    accountnumber = CkJsonObjectW_stringOf(jsonResponse,L"accountnumber");
    statecode = CkJsonObjectW_IntOf(jsonResponse,L"statecode");
    emailaddress1 = CkJsonObjectW_stringOf(jsonResponse,L"emailaddress1");
    exchangerate = CkJsonObjectW_IntOf(jsonResponse,L"exchangerate");
    openrevenue_state = CkJsonObjectW_IntOf(jsonResponse,L"openrevenue_state");
    tickersymbol = CkJsonObjectW_stringOf(jsonResponse,L"tickersymbol");
    name = CkJsonObjectW_stringOf(jsonResponse,L"name");
    websiteurl = CkJsonObjectW_stringOf(jsonResponse,L"websiteurl");
    opendeals = CkJsonObjectW_IntOf(jsonResponse,L"opendeals");
    modifiedon = CkJsonObjectW_stringOf(jsonResponse,L"modifiedon");
    v_owninguser_value = CkJsonObjectW_stringOf(jsonResponse,L"_owninguser_value");
    v_primarycontactid_value = CkJsonObjectW_stringOf(jsonResponse,L"_primarycontactid_value");
    importsequencenumber = CkJsonObjectW_IntOf(jsonResponse,L"importsequencenumber");
    address1_composite = CkJsonObjectW_stringOf(jsonResponse,L"address1_composite");
    address1_longitude = CkJsonObjectW_IntOf(jsonResponse,L"address1_longitude");
    donotpostalmail = CkJsonObjectW_BoolOf(jsonResponse,L"donotpostalmail");
    accountratingcode = CkJsonObjectW_IntOf(jsonResponse,L"accountratingcode");
    numberofemployees = CkJsonObjectW_IntOf(jsonResponse,L"numberofemployees");
    marketingonly = CkJsonObjectW_BoolOf(jsonResponse,L"marketingonly");
    revenue_base = CkJsonObjectW_IntOf(jsonResponse,L"revenue_base");
    preferredcontactmethodcode = CkJsonObjectW_IntOf(jsonResponse,L"preferredcontactmethodcode");
    v_territoryid_value = CkJsonObjectW_stringOf(jsonResponse,L"_territoryid_value");
    v_ownerid_value = CkJsonObjectW_stringOf(jsonResponse,L"_ownerid_value");
    entityimage = CkJsonObjectW_stringOf(jsonResponse,L"entityimage");
    description = CkJsonObjectW_stringOf(jsonResponse,L"description");
    customersizecode = CkJsonObjectW_IntOf(jsonResponse,L"customersizecode");
    entityimage_url = CkJsonObjectW_stringOf(jsonResponse,L"entityimage_url");
    openrevenue_date = CkJsonObjectW_stringOf(jsonResponse,L"openrevenue_date");
    openrevenue_base = CkJsonObjectW_IntOf(jsonResponse,L"openrevenue_base");
    donotemail = CkJsonObjectW_BoolOf(jsonResponse,L"donotemail");
    address2_shippingmethodcode = CkJsonObjectW_IntOf(jsonResponse,L"address2_shippingmethodcode");
    entityimage_timestamp = CkJsonObjectW_IntOf(jsonResponse,L"entityimage_timestamp");
    timezoneruleversionnumber = CkJsonObjectW_IntOf(jsonResponse,L"timezoneruleversionnumber");
    revenue = CkJsonObjectW_IntOf(jsonResponse,L"revenue");
    address2_freighttermscode = CkJsonObjectW_IntOf(jsonResponse,L"address2_freighttermscode");
    statuscode = CkJsonObjectW_IntOf(jsonResponse,L"statuscode");
    createdon = CkJsonObjectW_stringOf(jsonResponse,L"createdon");
    msdyn_travelchargetype = CkJsonObjectW_IntOf(jsonResponse,L"msdyn_travelchargetype");
    opendeals_state = CkJsonObjectW_IntOf(jsonResponse,L"opendeals_state");
    openrevenue = CkJsonObjectW_IntOf(jsonResponse,L"openrevenue");
    donotsendmm = CkJsonObjectW_BoolOf(jsonResponse,L"donotsendmm");
    donotfax = CkJsonObjectW_BoolOf(jsonResponse,L"donotfax");
    donotbulkpostalmail = CkJsonObjectW_BoolOf(jsonResponse,L"donotbulkpostalmail");
    address1_country = CkJsonObjectW_stringOf(jsonResponse,L"address1_country");
    versionnumber = CkJsonObjectW_IntOf(jsonResponse,L"versionnumber");
    address1_line1 = CkJsonObjectW_stringOf(jsonResponse,L"address1_line1");
    address1_line2 = CkJsonObjectW_stringOf(jsonResponse,L"address1_line2");
    creditonhold = CkJsonObjectW_BoolOf(jsonResponse,L"creditonhold");
    telephone1 = CkJsonObjectW_stringOf(jsonResponse,L"telephone1");
    v_owningbusinessunit_value = CkJsonObjectW_stringOf(jsonResponse,L"_owningbusinessunit_value");
    donotphone = CkJsonObjectW_BoolOf(jsonResponse,L"donotphone");
    v_transactioncurrencyid_value = CkJsonObjectW_stringOf(jsonResponse,L"_transactioncurrencyid_value");
    accountid = CkJsonObjectW_stringOf(jsonResponse,L"accountid");
    donotbulkemail = CkJsonObjectW_BoolOf(jsonResponse,L"donotbulkemail");
    v_modifiedby_value = CkJsonObjectW_stringOf(jsonResponse,L"_modifiedby_value");
    followemail = CkJsonObjectW_BoolOf(jsonResponse,L"followemail");
    businesstypecode = CkJsonObjectW_IntOf(jsonResponse,L"businesstypecode");
    v_createdby_value = CkJsonObjectW_stringOf(jsonResponse,L"_createdby_value");
    address1_city = CkJsonObjectW_stringOf(jsonResponse,L"address1_city");
    territorycode = CkJsonObjectW_IntOf(jsonResponse,L"territorycode");
    address2_addresstypecode = CkJsonObjectW_IntOf(jsonResponse,L"address2_addresstypecode");
    ownershipcode = CkJsonObjectW_IntOf(jsonResponse,L"ownershipcode");
    fax = CkJsonObjectW_stringOf(jsonResponse,L"fax");
    msdyn_taxexempt = CkJsonObjectW_BoolOf(jsonResponse,L"msdyn_taxexempt");
    address1_addressid = CkJsonObjectW_stringOf(jsonResponse,L"address1_addressid");
    participatesinworkflow = CkJsonObjectW_BoolOf(jsonResponse,L"participatesinworkflow");
    accountclassificationcode = CkJsonObjectW_IntOf(jsonResponse,L"accountclassificationcode");
    overriddencreatedon = CkJsonObjectW_stringOf(jsonResponse,L"overriddencreatedon");
    address2_addressid = CkJsonObjectW_stringOf(jsonResponse,L"address2_addressid");
    address1_postalcode = CkJsonObjectW_stringOf(jsonResponse,L"address1_postalcode");
    entityimageid = CkJsonObjectW_stringOf(jsonResponse,L"entityimageid");
    shippingmethodcode = CkJsonObjectW_IntOf(jsonResponse,L"shippingmethodcode");
    opendeals_date = CkJsonObjectW_stringOf(jsonResponse,L"opendeals_date");
    lastusedincampaign = CkJsonObjectW_stringOf(jsonResponse,L"lastusedincampaign");
    address1_name = CkJsonObjectW_stringOf(jsonResponse,L"address1_name");
    v_msdyn_billingaccount_value = CkJsonObjectW_stringOf(jsonResponse,L"_msdyn_billingaccount_value");
    creditlimit = CkJsonObjectW_stringOf(jsonResponse,L"creditlimit");
    v_msdyn_salestaxcode_value = CkJsonObjectW_stringOf(jsonResponse,L"_msdyn_salestaxcode_value");
    telephone3 = CkJsonObjectW_stringOf(jsonResponse,L"telephone3");
    msdyn_externalaccountid = CkJsonObjectW_stringOf(jsonResponse,L"msdyn_externalaccountid");
    address1_freighttermscode = CkJsonObjectW_stringOf(jsonResponse,L"address1_freighttermscode");
    lastonholdtime = CkJsonObjectW_stringOf(jsonResponse,L"lastonholdtime");
    address2_line1 = CkJsonObjectW_stringOf(jsonResponse,L"address2_line1");
    onholdtime = CkJsonObjectW_stringOf(jsonResponse,L"onholdtime");
    msdyn_workorderinstructions = CkJsonObjectW_stringOf(jsonResponse,L"msdyn_workorderinstructions");
    address2_telephone1 = CkJsonObjectW_stringOf(jsonResponse,L"address2_telephone1");
    address1_fax = CkJsonObjectW_stringOf(jsonResponse,L"address1_fax");
    v_createdonbehalfby_value = CkJsonObjectW_stringOf(jsonResponse,L"_createdonbehalfby_value");
    address2_city = CkJsonObjectW_stringOf(jsonResponse,L"address2_city");
    address2_latitude = CkJsonObjectW_stringOf(jsonResponse,L"address2_latitude");
    creditlimit_base = CkJsonObjectW_stringOf(jsonResponse,L"creditlimit_base");
    address1_telephone2 = CkJsonObjectW_stringOf(jsonResponse,L"address1_telephone2");
    aging90_base = CkJsonObjectW_stringOf(jsonResponse,L"aging90_base");
    address2_postalcode = CkJsonObjectW_stringOf(jsonResponse,L"address2_postalcode");
    address2_name = CkJsonObjectW_stringOf(jsonResponse,L"address2_name");
    primarysatoriid = CkJsonObjectW_stringOf(jsonResponse,L"primarysatoriid");
    v_masterid_value = CkJsonObjectW_stringOf(jsonResponse,L"_masterid_value");
    aging30 = CkJsonObjectW_stringOf(jsonResponse,L"aging30");
    address2_county = CkJsonObjectW_stringOf(jsonResponse,L"address2_county");
    v_originatingleadid_value = CkJsonObjectW_stringOf(jsonResponse,L"_originatingleadid_value");
    emailaddress3 = CkJsonObjectW_stringOf(jsonResponse,L"emailaddress3");
    address1_shippingmethodcode = CkJsonObjectW_stringOf(jsonResponse,L"address1_shippingmethodcode");
    int_facebook = CkJsonObjectW_stringOf(jsonResponse,L"int_facebook");
    address1_stateorprovince = CkJsonObjectW_stringOf(jsonResponse,L"address1_stateorprovince");
    utcconversiontimezonecode = CkJsonObjectW_stringOf(jsonResponse,L"utcconversiontimezonecode");
    sharesoutstanding = CkJsonObjectW_stringOf(jsonResponse,L"sharesoutstanding");
    sic = CkJsonObjectW_stringOf(jsonResponse,L"sic");
    v_preferredsystemuserid_value = CkJsonObjectW_stringOf(jsonResponse,L"_preferredsystemuserid_value");
    address2_longitude = CkJsonObjectW_stringOf(jsonResponse,L"address2_longitude");
    v_defaultpricelevelid_value = CkJsonObjectW_stringOf(jsonResponse,L"_defaultpricelevelid_value");
    address1_primarycontactname = CkJsonObjectW_stringOf(jsonResponse,L"address1_primarycontactname");
    address1_county = CkJsonObjectW_stringOf(jsonResponse,L"address1_county");
    address2_postofficebox = CkJsonObjectW_stringOf(jsonResponse,L"address2_postofficebox");
    v_preferredserviceid_value = CkJsonObjectW_stringOf(jsonResponse,L"_preferredserviceid_value");
    address1_upszone = CkJsonObjectW_stringOf(jsonResponse,L"address1_upszone");
    stageid = CkJsonObjectW_stringOf(jsonResponse,L"stageid");
    address2_composite = CkJsonObjectW_stringOf(jsonResponse,L"address2_composite");
    marketcap = CkJsonObjectW_stringOf(jsonResponse,L"marketcap");
    aging60 = CkJsonObjectW_stringOf(jsonResponse,L"aging60");
    customertypecode = CkJsonObjectW_stringOf(jsonResponse,L"customertypecode");
    msdyn_travelcharge = CkJsonObjectW_stringOf(jsonResponse,L"msdyn_travelcharge");
    address1_postofficebox = CkJsonObjectW_stringOf(jsonResponse,L"address1_postofficebox");
    v_msdyn_preferredresource_value = CkJsonObjectW_stringOf(jsonResponse,L"_msdyn_preferredresource_value");
    yominame = CkJsonObjectW_stringOf(jsonResponse,L"yominame");
    address2_primarycontactname = CkJsonObjectW_stringOf(jsonResponse,L"address2_primarycontactname");
    address2_country = CkJsonObjectW_stringOf(jsonResponse,L"address2_country");
    v_msdyn_serviceterritory_value = CkJsonObjectW_stringOf(jsonResponse,L"_msdyn_serviceterritory_value");
    traversedpath = CkJsonObjectW_stringOf(jsonResponse,L"traversedpath");
    int_twitter = CkJsonObjectW_stringOf(jsonResponse,L"int_twitter");
    aging90 = CkJsonObjectW_stringOf(jsonResponse,L"aging90");
    address1_telephone1 = CkJsonObjectW_stringOf(jsonResponse,L"address1_telephone1");
    msdyn_taxexemptnumber = CkJsonObjectW_stringOf(jsonResponse,L"msdyn_taxexemptnumber");
    address2_telephone3 = CkJsonObjectW_stringOf(jsonResponse,L"address2_telephone3");
    telephone2 = CkJsonObjectW_stringOf(jsonResponse,L"telephone2");
    v_owningteam_value = CkJsonObjectW_stringOf(jsonResponse,L"_owningteam_value");
    address2_line2 = CkJsonObjectW_stringOf(jsonResponse,L"address2_line2");
    msdyn_travelcharge_base = CkJsonObjectW_stringOf(jsonResponse,L"msdyn_travelcharge_base");
    primarytwitterid = CkJsonObjectW_stringOf(jsonResponse,L"primarytwitterid");
    timespentbymeonemailandmeetings = CkJsonObjectW_stringOf(jsonResponse,L"timespentbymeonemailandmeetings");
    v_modifiedbyexternalparty_value = CkJsonObjectW_stringOf(jsonResponse,L"_modifiedbyexternalparty_value");
    v_slaid_value = CkJsonObjectW_stringOf(jsonResponse,L"_slaid_value");
    ftpsiteurl = CkJsonObjectW_stringOf(jsonResponse,L"ftpsiteurl");
    v_preferredequipmentid_value = CkJsonObjectW_stringOf(jsonResponse,L"_preferredequipmentid_value");
    processid = CkJsonObjectW_stringOf(jsonResponse,L"processid");
    address2_telephone2 = CkJsonObjectW_stringOf(jsonResponse,L"address2_telephone2");
    address1_addresstypecode = CkJsonObjectW_stringOf(jsonResponse,L"address1_addresstypecode");
    address1_utcoffset = CkJsonObjectW_stringOf(jsonResponse,L"address1_utcoffset");
    v_parentaccountid_value = CkJsonObjectW_stringOf(jsonResponse,L"_parentaccountid_value");
    v_createdbyexternalparty_value = CkJsonObjectW_stringOf(jsonResponse,L"_createdbyexternalparty_value");
    address2_fax = CkJsonObjectW_stringOf(jsonResponse,L"address2_fax");
    aging60_base = CkJsonObjectW_stringOf(jsonResponse,L"aging60_base");
    v_modifiedonbehalfby_value = CkJsonObjectW_stringOf(jsonResponse,L"_modifiedonbehalfby_value");
    stockexchange = CkJsonObjectW_stringOf(jsonResponse,L"stockexchange");
    preferredappointmentdaycode = CkJsonObjectW_stringOf(jsonResponse,L"preferredappointmentdaycode");
    address1_line3 = CkJsonObjectW_stringOf(jsonResponse,L"address1_line3");
    aging30_base = CkJsonObjectW_stringOf(jsonResponse,L"aging30_base");
    address2_upszone = CkJsonObjectW_stringOf(jsonResponse,L"address2_upszone");
    v_slainvokedid_value = CkJsonObjectW_stringOf(jsonResponse,L"_slainvokedid_value");
    address2_line3 = CkJsonObjectW_stringOf(jsonResponse,L"address2_line3");
    address2_utcoffset = CkJsonObjectW_stringOf(jsonResponse,L"address2_utcoffset");
    address2_stateorprovince = CkJsonObjectW_stringOf(jsonResponse,L"address2_stateorprovince");
    preferredappointmenttimecode = CkJsonObjectW_stringOf(jsonResponse,L"preferredappointmenttimecode");
    emailaddress2 = CkJsonObjectW_stringOf(jsonResponse,L"emailaddress2");
    marketcap_base = CkJsonObjectW_stringOf(jsonResponse,L"marketcap_base");
    address1_telephone3 = CkJsonObjectW_stringOf(jsonResponse,L"address1_telephone3");
    accountcategorycode = CkJsonObjectW_stringOf(jsonResponse,L"accountcategorycode");


    CkRestW_Dispose(rest);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jsonResponse);

    }

Sample JSON Response Body

{
  "@odata.context": "https://mydomain.api.crm.dynamics.com/api/data/v8.2/$metadata#accounts/$entity",
  "@odata.etag": "W/\"1817216\"",
  "paymenttermscode": 1,
  "industrycode": 30,
  "address1_latitude": -33.79655,
  "merged": false,
  "accountnumber": "ACTBBDC3",
  "statecode": 0,
  "emailaddress1": "brian@blueyonderairlines.com",
  "exchangerate": 1.0000000000,
  "openrevenue_state": 1,
  "tickersymbol": "BYAY",
  "name": "Blue Yonder Airlines",
  "websiteurl": "http://blueyonderairlines.com",
  "opendeals": 2,
  "modifiedon": "2018-03-12T16:09:34Z",
  "_owninguser_value": "55e68414-a277-42d6-ba36-d90484708a1d",
  "_primarycontactid_value": "4da0e5b9-88df-e311-b8e5-6c3be5a8b200",
  "importsequencenumber": 105,
  "address1_composite": "111100 Epping Road\r\nNorth Ryde NSW 0001\r\nSydney 0200\r\nAustralia",
  "address1_longitude": 151.13837,
  "donotpostalmail": false,
  "accountratingcode": 1,
  "numberofemployees": 1876,
  "marketingonly": false,
  "revenue_base": 120000000.0000,
  "preferredcontactmethodcode": 1,
  "_territoryid_value": "3337fc3f-62ef-e411-80eb-c4346bace124",
  "_ownerid_value": "55e68414-a277-42d6-ba36-d90484708a1d",
  "entityimage": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCACQAJADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQID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vn56UuVs9ejmcfZqnXhzJbdyxrFhHpupPbROzqqqct15FZ9STTzXEhknleRzwWc5NR1201JRSk7s8yrKMptwVl0QUUUVRmFFFFABRRRQB1Wm+GLS9soJ3nmVpIw5AIwM1oR+C9PRgXuJ2A7ZAz+lcfHqF/FGqR3k6KowqrIQAKc+pag4w97cMPQyGvOlQxDbtLQ9mGLw0Yq8Ls7q4vtJ8O2xijEaNjIij5Zvr/ia4jVdVn1W686X5VHCRg8KKokknJOSeppK2oYSNJ8zd5dznxeYzrrkS5YrogooorrPOCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/Z",
  "description": "Blue Yonder Airlines strives to be the most preferred domestic carrier in the United States. Our goal is to provide unmatched standards of travel for our customers, ensure consistent long-term returns for the investors, and provide our employees with an environment for excellence and growth. Blue Yonder Airlines will achieve our goals by offering consistent, high quality service, and reliable, safe, and efficient operations.",
  "customersizecode": 1,
  "entityimage_url": "/Image/download.aspx?Entity=account&Attribute=entityimage&Id=aca19cdd-88df-e311-b8e5-6c3be5a8b200&Timestamp=636564677747626460",
  "openrevenue_date": "2018-04-26T10:02:54Z",
  "openrevenue_base": 5004500.0000,
  "donotemail": false,
  "address2_shippingmethodcode": 1,
  "entityimage_timestamp": 636564677747626460,
  "timezoneruleversionnumber": 0,
  "revenue": 120000000.0000,
  "address2_freighttermscode": 1,
  "statuscode": 1,
  "createdon": "2017-01-20T22:39:16Z",
  "msdyn_travelchargetype": 690970003,
  "opendeals_state": 1,
  "openrevenue": 5004500.0000,
  "donotsendmm": false,
  "donotfax": false,
  "donotbulkpostalmail": false,
  "address1_country": "Australia",
  "versionnumber": 1817216,
  "address1_line1": "111100 Epping Road",
  "address1_line2": "North Ryde NSW 0001",
  "creditonhold": false,
  "telephone1": "555-0135",
  "_owningbusinessunit_value": "c4106190-c81e-e811-a980-000d3a192e9a",
  "donotphone": false,
  "_transactioncurrencyid_value": "f92b569a-d61e-e811-a980-000d3a192e9a",
  "accountid": "aca19cdd-88df-e311-b8e5-6c3be5a8b200",
  "donotbulkemail": false,
  "_modifiedby_value": "e00ba668-e2de-47bc-8f92-ab9573f92ff4",
  "followemail": true,
  "businesstypecode": 1,
  "_createdby_value": "55e68414-a277-42d6-ba36-d90484708a1d",
  "address1_city": "Sydney",
  "territorycode": 1,
  "address2_addresstypecode": 1,
  "ownershipcode": 3,
  "fax": "612-4444-5556",
  "msdyn_taxexempt": false,
  "address1_addressid": "14e08187-8029-4d87-b40c-51c4cfbbdf83",
  "participatesinworkflow": false,
  "accountclassificationcode": 1,
  "overriddencreatedon": "2018-03-03T12:21:52Z",
  "address2_addressid": "5d8eb6c2-7793-41d2-bba1-a8e5bde5a98c",
  "address1_postalcode": "0200",
  "entityimageid": "0bf270bb-0f26-e811-a953-000d3a1c53e4",
  "shippingmethodcode": 1,
  "opendeals_date": "2018-04-26T10:02:54Z",
  "lastusedincampaign": null,
  "address1_name": null,
  "_msdyn_billingaccount_value": null,
  "creditlimit": null,
  "_msdyn_salestaxcode_value": null,
  "telephone3": null,
  "msdyn_externalaccountid": null,
  "address1_freighttermscode": null,
  "lastonholdtime": null,
  "address2_line1": null,
  "onholdtime": null,
  "msdyn_workorderinstructions": null,
  "address2_telephone1": null,
  "address1_fax": null,
  "_createdonbehalfby_value": null,
  "address2_city": null,
  "address2_latitude": null,
  "creditlimit_base": null,
  "address1_telephone2": null,
  "aging90_base": null,
  "address2_postalcode": null,
  "address2_name": null,
  "primarysatoriid": null,
  "_masterid_value": null,
  "aging30": null,
  "address2_county": null,
  "_originatingleadid_value": null,
  "emailaddress3": null,
  "address1_shippingmethodcode": null,
  "int_facebook": null,
  "address1_stateorprovince": null,
  "utcconversiontimezonecode": null,
  "sharesoutstanding": null,
  "sic": null,
  "_preferredsystemuserid_value": null,
  "address2_longitude": null,
  "_defaultpricelevelid_value": null,
  "address1_primarycontactname": null,
  "address1_county": null,
  "address2_postofficebox": null,
  "_preferredserviceid_value": null,
  "address1_upszone": null,
  "stageid": null,
  "address2_composite": null,
  "marketcap": null,
  "aging60": null,
  "customertypecode": null,
  "msdyn_travelcharge": null,
  "address1_postofficebox": null,
  "_msdyn_preferredresource_value": null,
  "yominame": null,
  "address2_primarycontactname": null,
  "address2_country": null,
  "_msdyn_serviceterritory_value": null,
  "traversedpath": null,
  "int_twitter": null,
  "aging90": null,
  "address1_telephone1": null,
  "msdyn_taxexemptnumber": null,
  "address2_telephone3": null,
  "telephone2": null,
  "_owningteam_value": null,
  "address2_line2": null,
  "msdyn_travelcharge_base": null,
  "primarytwitterid": null,
  "timespentbymeonemailandmeetings": null,
  "_modifiedbyexternalparty_value": null,
  "_slaid_value": null,
  "ftpsiteurl": null,
  "_preferredequipmentid_value": null,
  "processid": null,
  "address2_telephone2": null,
  "address1_addresstypecode": null,
  "address1_utcoffset": null,
  "_parentaccountid_value": null,
  "_createdbyexternalparty_value": null,
  "address2_fax": null,
  "aging60_base": null,
  "_modifiedonbehalfby_value": null,
  "stockexchange": null,
  "preferredappointmentdaycode": null,
  "address1_line3": null,
  "aging30_base": null,
  "address2_upszone": null,
  "_slainvokedid_value": null,
  "address2_line3": null,
  "address2_utcoffset": null,
  "address2_stateorprovince": null,
  "preferredappointmenttimecode": null,
  "emailaddress2": null,
  "marketcap_base": null,
  "address1_telephone3": null,
  "accountcategorycode": null
}