Global API
...
Requests
Vendor

Read

2min
to read vendors, please use the below parameters supported “where” filters field name data type description created long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates lastmodifieddate long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates subsidiary string internal id of subsidiary (primary) do not use this in additonalfilter multiple ids can be passed in a comma separated string ex 1,2 additonalfilter string construct the additional filter with a combination of the above fields using ‘+and+’ separator and pass it as a single string make sure to wrap the whole string using encodingutil urlencode active string to filter the records based using active value example request map\<string, object> filters = new map\<string, object>(); filters put('subsidiary', '1,2'); filters put('additionalfilter', encodingutil urlencode('lastmodifieddate>1628930520+and+lastmodifieddate<1634200920', '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', 'readvendor'); 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=readvendor, responsejson={ "vendors" \[ { "vatregnumber" null, "url" "http //www abc com", "title" null, "terms" null, "taxitem" null, "taxidnum" null, "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "salutation" null, "salesforceid" null, "phone" null, "payablesaccount" null, "nullfieldlist" null, "mobilephone" null, "middlename" null, "legalname" null, "lastname" null, "lastmodifieddate" 1629796523, "isperson" false, "isjobresourcevend" false, "isinactive" false, "isaccountant" null, "is1099eligible" null, "internalid" "63490", "incoterm" null, "homephone" null, "firstname" null, "fax" null, "externalid" null, "expenseaccount" null, "entityid" "gs solutions420", "email" null, "datecreated" 1629796522, "customform" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" " ", "scriptid" "custentity breadwinner pc internal id", "internalid" "504", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity checkbox", "internalid" "432", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity edoc gen trans pdf", "internalid" "920", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity edoc use sender list", "internalid" "915", "fieldtype" null }, { "valuelookup" null, "value" "true", "scriptid" "custentity f3 mm send wf sms", "internalid" "428", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity mm iskeylinkentity", "internalid" "426", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity mm stopsendingsms", "internalid" "424", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custentity psg ei auto select temp sm", "internalid" "922", "fieldtype" null } ] }, "currencyrecord" { "type" null, "name" "us dollars", "internalid" "2", "externalid" null }, "currencylist" { "vendorcurrency" \[ { "currencyrecord" { "type" null, "name" "us dollars", "internalid" "2", "externalid" null } } ], "currencyrecord" null }, "creditlimit" null, "companyname" "gs solutions420", "category" null, "bcn" null, "addressbooklist" { "replaceall" null, "addressbook" \[ { "label" "add 13434 add 2", "isresidential" null, "internalid" "66910", "defaultshipping" false, "defaultbilling" true, "addressbookaddress" { "zip" "0123654", "state" "mi", "overridevalue" false, "internalid" null, "country" " india", "city" "city 1", "attention" null, "addrtext" "gs solutions420\<br>add 13434 add 2\<br>city 1 mi 0123654\<br>india", "addrphone" null, "addressee" "gs solutions420", "addr3" null, "addr2" null, "addr1" "add 13434 add 2" } } ] }, "accountnumber" null } ], "customparamters" { "where" { "value" null, "keyvaluemap" { "subsidiary" "1,2", "additionalfilter" "lastmodifieddate%3e1628930520%2band%2blastmodifieddate%3c1634200920" } } }, "currentpagerecords" 1, "totalrecords" 1, "totalpages" 1, "searchid" "webservices 5333445 sb1 0414202321297677971045791901 cbc7ebd", "pageindex" 1, "errors" \[ ], "status" "200" }, timestamp=1681461981947, validrequest=true, version=1 0 }