Global API
...
Customer
Read
5 min
to read customers, please use the below parameters false 159 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type custom parameters in the requestjson are in the form of param name and value map which are used for filtering different search results there is currently only one supported custom parameter supported custom parameters unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type param value can be passed in the following two ways paramvalue unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type supported “where” filters false 154 unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type example request map\<string, object> filters = new map\<string, object>(); filters put('subsidiary', '1,2'); filters put('additionalfilter', encodingutil urlencode('lastmodifieddate>1628091060+and+lastmodifieddate<1629127860', 'utf 8')); // encode additionalfilter after constructing it with +and+ for multi filters // field filters and additionalfilter for where param map\<string, object> filtermap = new map\<string, object>(); filtermap put('where', new map\<string, object>{'keyvaluemap'=>filters}); map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('customparameters', filtermap); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readcustomer'); reqobj put('requestjson', reqjson); // place a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action=readcustomer, timestamp=1631109943108, validrequest=true, version=1 0, responsejson={ "currentpagerecords" 2, "totalrecords" 2, "totalpages" 1, "searchid" "webservices 5333445 sb1 090820219776321931335921658 242f8c69", "pageindex" 1, "errors" \[], "customparamters" { "where" { "value" null, "keyvaluemap" { "subsidiary" "1", "additionalfilter" "lastmodifieddate%3e1628091060%2band%2blastmodifieddate%3c1629127860" } } }, "status" "200", "customers" \[ { "vatregnumber" null, "url" "https //www grandhotel com", "title" null, "territory" { "type" null, "name" "default round robin", "internalid" " 5", "externalid" null }, "terms" { "type" null, "name" "1% 10 net 30", "internalid" "5", "externalid" null }, "taxitem" null, "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "startdate" 1606847400, "stage" " customer", "salutation" null, "salesrep" { "type" null, "name" "james m", "internalid" "4", "externalid" null }, "salesforceid" null, "resalenumber" null, "reminderdays" null, "receivablesaccount" { "type" null, "name" "accounts receivable", "internalid" "122", "externalid" null }, "pricelevel" { "type" null, "name" "base price", "internalid" "1", "externalid" null }, "phone" 9888888888, "parent" null, "nullfieldlist" null, "middlename" null, "lastname" null, "lastmodifieddate" 1606907165, "itempricinglist" null, "isperson" false, "isinactive" false, "internalid" "32342", "firstname" null, "fax" null, "externalid" null, "entitystatus" { "type" null, "name" "customer closed won", "internalid" "13", "externalid" null }, "entityid" "cust533at grand hotels & resorts ltd", "enddate" null, "email" null, "datecreated" 1606907165, "customform" { "type" null, "name" "standard customer form", "internalid" " 2", "externalid" null }, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "76 89", "scriptid" "custentity decimal", "internalid" "435", "fieldtype" null }, { "valuelookup" { "type" null, "name" "acquired", "internalid" "2", "externalid" null }, "value" null, "scriptid" "custentityrating", "internalid" "42", "fieldtype" null } ] }, "currencyrecord" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "currencylist" { "currencyrecord" \[ { "currencyrecord" { "type" null, "name" "inr", "internalid" "1", "externalid" null } } ] }, "creditlimit" null, "creditholdoverride" " auto", "companyname" "grand hotels & resorts ltd", "category" null, "addressbooklist" { "replaceall" null, "addressbook" \[ { "label" "2334 n michigan avenue, suite 1500", "isresidential" true, "internalid" "29188", "defaultshipping" true, "defaultbilling" true, "addressbookaddress" { "zip" "60601", "state" "il", "internalid" null, "country" " unitedstates", "city" "chicago", "attention" null, "addrphone" null, "addressee" "grand hotels & resorts ltd", "addr3" null, "addr2" null, "addr1" "2334 n michigan avenue, suite 1500" } } ] }, "accountnumber" null }, ] } }