Global API
...
Requests
Cash Refund
Read
2min
to read cash refunds, 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 cash refund 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 status string to filter the records based on the status value ex status=active 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>1682493097+and+lastmodifieddate<1682493214', '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', 'readcashrefund'); 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=readcashrefund, timestamp=1682493238557, validrequest=true, version=1 0, responsejson={ { 	"currentpagerecords" 2, 	"totalrecords" 2, 	"totalpages" 1, 	"searchid" "webservices 5333445 042620231133942682604740071 2f24a36e31c8", 	"pageindex" 1, 	"errors" \[], 	"customparamters" { 	 "where" { 	 "value" null, 	 "keyvaluemap" { 	 "subsidiary" "1,2", 	 "additionalfilter" "lastmodifieddate%3e1682493097%2band%2blastmodifieddate%3c1682493214" 	 } 	 } 	}, 	"status" "200", 	"cashrefunds" \[{ 	 "tranid" "14", 	 "trandate" 1682478000, 	 "total" 18 88, 	 "taxtotal" 2 88, 	 "subtotal" 16 0, 	 "subsidiary" { 	 "type" null, 	 "name" "parent company", 	 "internalid" "1", 	 "externalid" null 	 }, 	 "status" null, 	 "shippingcost" null, 	 "salesrep" null, 	 "salesforceid" null, 	 "refundcheck" false, 	 "otherrefnum" null, 	 "memo" null, 	 "location" { 	 "type" null, 	 "name" "hyderabad hi tech city", 	 "internalid" "10", 	 "externalid" null 	 }, 	 "lastmodifieddate" 1682493164, 	 "job" null, 	 "itemlist" { 	 "replaceall" null, 	 "item" \[{ 	 "unitsdisplay" null, 	 "taxrate1" "18 0%", 	 "taxcode" { 	 "type" null, 	 "name" "vat in\ gst 18", 	 "internalid" "36", 	 "externalid" null 	 }, 	 "tax1amt" 2 88, 	 "shipmethod" null, 	 "shipgroup" null, 	 "serialnumbers" "1", 	 "revrecstartdate" null, 	 "revrecschedule" null, 	 "revrecenddate" null, 	 "rate" "16 00", 	 "quantityremaining" null, 	 "quantityreceived" null, 	 "quantitypicked" null, 	 "quantitypacked" null, 	 "quantityonhand" null, 	 "quantityfulfilled" null, 	 "quantitycommitted" null, 	 "quantitybilled" null, 	 "quantitybackordered" null, 	 "quantityavailable" null, 	 "quantity" 1 0, 	 "price" { 	 "type" null, 	 "name" "base price", 	 "internalid" "1", 	 "externalid" null 	 }, 	 "ponum" null, 	 "percentcomplete" 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 	 }, 	 "isclosed" null, 	 "grossamt" 18 88, 	 "expectedreceiptdate" null, 	 "description" "sales", 	 "department" null, 	 "customfieldlist" { 	 "customfield" \[{ 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custcol checkbox", 	 "internalid" "443", 	 "fieldtype" null 	 }] 	 }, 	 "createpo" null, 	 "costestimatetype" " averagecost", 	 "costestimate" 0 0, 	 "classification" null, 	 "billingschedule" null, 	 "amount" 16 0 	 }] 	 }, 	 "internalid" "121457", 	 "handlingcost" null, 	 "externalid" null, 	 "exchangerate" 23 0, 	 "entity" { 	 "type" null, 	 "name" "12 472 gs solutions united oil & gas corp ", 	 "internalid" "65690", 	 "externalid" null 	 }, 	 "discounttotal" null, 	 "discountrate" null, 	 "discountitem" null, 	 "department" null, 	 "customform" null, 	 "customfieldlist" { 	 "customfield" \[{ 	 "valuelookup" null, 	 "value" "16", 	 "scriptid" "custbody42", 	 "internalid" "869", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" " ", 	 "scriptid" "custbody breadwinner pc internal id", 	 "internalid" "588", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custbody checkbox", 	 "internalid" "272", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custbody enableimport", 	 "internalid" "691", 	 "fieldtype" null 	 } 	 ] 	 }, 	 "currencyrecord" { 	 "type" null, 	 "name" "us dollars", 	 "internalid" "2", 	 "externalid" null 	 }, 	 "currencyname" "us dollars", 	 "createdfrom" null, 	 "createddate" 1682493164, 	 "classification" null, 	 "applylist" null, 	 "applied" null, 	 "account" { 	 "type" null, 	 "name" "cheque account", 	 "internalid" "1", 	 "externalid" null 	 } 	 }, 	 { 	 "unapplied" null, 	 "tranid" "15", 	 "trandate" 1682478000, 	 "total" 2 36, 	 "taxtotal" 0 36, 	 "subtotal" 2 0, 	 "subsidiary" { 	 "type" null, 	 "name" "parent company", 	 "internalid" "1", 	 "externalid" null 	 }, 	 "status" null, 	 "shippingcost" null, 	 "salesrep" null, 	 "salesforceid" null, 	 "refundcheck" false, 	 "otherrefnum" null, 	 "memo" null, 	 "location" { 	 "type" null, 	 "name" "hyderabad hi tech city", 	 "internalid" "10", 	 "externalid" null 	 }, 	 "lastmodifieddate" 1682493198, 	 "job" null, 	 "itemlist" { 	 "replaceall" null, 	 "item" \[{ 	 "unitsdisplay" null, 	 "taxrate1" "18 0%", 	 "taxcode" { 	 "type" null, 	 "name" "vat in\ gst 18", 	 "internalid" "36", 	 "externalid" null 	 }, 	 "tax1amt" 0 36, 	 "shipmethod" null, 	 "shipgroup" null, 	 "serialnumbers" null, 	 "revrecstartdate" null, 	 "revrecschedule" null, 	 "revrecenddate" null, 	 "rate" "2 00", 	 "quantityremaining" null, 	 "quantityreceived" null, 	 "quantitypicked" null, 	 "quantitypacked" null, 	 "quantityonhand" null, 	 "quantityfulfilled" null, 	 "quantitycommitted" null, 	 "quantitybilled" null, 	 "quantitybackordered" null, 	 "quantityavailable" null, 	 "quantity" 1 0, 	 "price" { 	 "type" null, 	 "name" "base price", 	 "internalid" "1", 	 "externalid" null 	 }, 	 "ponum" null, 	 "percentcomplete" null, 	 "orderline" null, 	 "onhand" null, 	 "location" null, 	 "line" 1, 	 "jobname" null, 	 "itemreceive" null, 	 "itemname" null, 	 "itemisfulfilled" null, 	 "item" { 	 "type" null, 	 "name" "chair", 	 "internalid" "10030", 	 "externalid" null 	 }, 	 "isclosed" null, 	 "grossamt" 2 36, 	 "expectedreceiptdate" null, 	 "description" null, 	 "department" null, 	 "customfieldlist" { 	 "customfield" \[{ 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custcol checkbox", 	 "internalid" "443", 	 "fieldtype" null 	 }] 	 }, 	 "createpo" null, 	 "costestimatetype" " averagecost", 	 "costestimate" 0 0, 	 "classification" null, 	 "billingschedule" null, 	 "amount" 2 0 	 }] 	 }, 	 "internalid" "121458", 	 "handlingcost" null, 	 "externalid" null, 	 "exchangerate" 1 0, 	 "entity" { 	 "type" null, 	 "name" "139 abc", 	 "internalid" "2770", 	 "externalid" null 	 }, 	 "discounttotal" null, 	 "discountrate" null, 	 "discountitem" null, 	 "department" null, 	 "customform" null, 	 "customfieldlist" { 	 "customfield" \[{ 	 "valuelookup" null, 	 "value" "2", 	 "scriptid" "custbody42", 	 "internalid" "869", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" " ", 	 "scriptid" "custbody breadwinner pc internal id", 	 "internalid" "588", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custbody checkbox", 	 "internalid" "272", 	 "fieldtype" null 	 }, 	 { 	 "valuelookup" null, 	 "value" "false", 	 "scriptid" "custbody enableimport", 	 "internalid" "691", 	 "fieldtype" null 	 } 	 ] 	 }, 	 "currencyrecord" { 	 "type" null, 	 "name" "inr", 	 "internalid" "1", 	 "externalid" null 	 }, 	 "currencyname" "inr", 	 "createdfrom" null, 	 "createddate" 1682493198, 	 "classification" null, 	 "applylist" null, 	 "applied" null, 	 "account" { 	 "type" null, 	 "name" "cheque account", 	 "internalid" "1", 	 "externalid" null 	 } 	 } 	] } }