Global API
...
Requests
Estimate
Read
2min
to read estimates, please use the below parameters supported “where” filters field name data type description datecreated long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates internalid string internal id of the estimate multiple values can be passed in a comma separated string 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 trandate long transaction date of the record use the “additionalfilter” option for a range of dates customer string to filter the records based on the customer multiple ids can be passed in a comma separated string ex 6,7 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', 'readestimate'); 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=readestimate, timestamp=1657005088522, validrequest=true, version=1 0, responsejson={ "currentpagerecords" null, "totalrecords" 2, "totalpages" 1, "searchid" "webservices 5333445 sb1 070520228522928141909953262 2b36551b", "pageindex" 1, "errors" \[ ], "customparamters" { "where" { "value" null, "keyvaluemap" { "internalid" "38409,18948" } } }, "status" "200""estimates" \[ { "tranid" "10", "trandate" 1577779200, "total" 325 17, "title" "parent company techinacal lead", "terms" null, "taxtotal" 49 6, "subtotal" 275 57, "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "status" "processed", "shippingcost" null, "salesrep" null, "salesforceid" null, "probability" 100 0, "otherrefnum" null, "nullfieldlist" null, "memo" "test", "location" null, "lastmodifieddate" 1638271541, "itemlist" { "replaceall" null, "item" \[ { "unitsdisplay" null, "taxrate1" "18 0", "taxcode" { "type" null, "name" "vat in\ gst 18", "internalid" "36", "externalid" null }, "tax1amt" 7 2, "shipmethod" null, "shipgroup" null, "serialnumbers" null, "revrecstartdate" null, "revrecschedule" null, "revrecenddate" null, "rate" "40 00", "quantityremaining" null, "quantityreceived" null, "quantitybilled" null, "quantity" 1 0, "price" { "type" null, "name" "base price", "internalid" "1", "externalid" null }, "ponum" null, "orderline" null, "onhand" null, "location" null, "line" 1, "jobname" null, "itemreceive" null, "itemname" null, "itemisfulfilled" null, "item" { "type" null, "name" "apple", "internalid" "444", "externalid" null }, "grossamt" 47 2, "expectedreceiptdate" null, "description" "apple", "department" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "01t0l000004cx8iaag", "scriptid" "custcol bwcl opportunityproduct", "internalid" "554", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custcol checkbox", "internalid" "443", "fieldtype" null } ] }, "createpo" null, "costestimatetype" null, "costestimate" null, "classification" null, "amount" 40 0 } ] }, "internalid" "18948", "handlingcost" null, "externalid" null, "expectedclosedate" 1578038400, "exchangerate" 1 0, "entitystatus" { "type" null, "name" "closed won", "internalid" "13", "externalid" null }, "entity" { "type" null, "name" "101 abc private corporation west abc", "internalid" "2732", "externalid" null }, "duedate" 1580371200, "discounttotal" null, "discountrate" null, "discountitem" null, "department" null, "customform" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" " ", "scriptid" "custbody breadwinner pc internal id", "internalid" "588", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody checkbox", "internalid" "272", "fieldtype" null } ] }, "currencyvalue" null, "currencyrecord" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "currencyname" "inr", "createddate" 1577791628, "classification" null } ] }, }