Global API
...
Requests
Item
Read
2min
to read items, 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 item records using active value ex active=true example request map\<string, object> filters = new map\<string, object>(); filters put('subsidiary', '1,2'); filters put('additionalfilter', encodingutil urlencode('lastmodifieddate>1628091060+and+lastmodifieddate<1656682361', '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', 'readitem'); 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=readitem, responsejson={ "items" \[ { "usemarginalrates" null, "unitstype" null, "taxschedule" null, "subsidiarylist" { "recordref" \[ { "type" null, "name" null, "internalid" "1", "externalid" null } ] }, "shippingcost" null, "salesforceid" null, "salesdescription" null, "rate" "5 00%", "quantitypricingschedule" null, "purchasedescription" null, "pricingmatrix" null, "pricinggroup" null, "preferredlocation" null, "parent" null, "overallquantitypricingtype" null, "minimumquantity" null, "memberlist" null, "maximumquantity" null, "matrixtype" null, "locationslist" null, "location" null, "lastmodifieddate" 1632479177, "itemtype" "discountitem", "itemid" "corn", "isinactive" true, "internalid" "10027", "incomeaccount" null, "includechildren" false, "handlingcost" null, "externalid" null, "expenseaccount" null, "displayname" "corn", "description" null, "department" null, "customform" null, "customfieldlist" null, "currencyvalue" null, "createddate" 1632406295, "cost" null, "cogsaccount" null, "classification" null, "assetaccount" null, "account" { "type" null, "name" "shipping and handling", "internalid" "108", "externalid" null } } ], "customparamters" { "where" { "value" null, "keyvaluemap" { "subsidiary" "1,2", "additionalfilter" "lastmodifieddate%3e1628091060%2band%2blastmodifieddate%3c1632663161" } } }, "currentpagerecords" 1, "totalrecords" 1, "totalpages" 1, "searchid" "webservices 5333445 sb1 0413202320651007601650254969 2505ec2", "pageindex" 1, "errors" \[ ], "status" "200" }, timestamp=1681397315055, validrequest=true, version=1 0 }