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