Global API
...
Requests
Return Authorization
Read
2min
to read return authorizations, 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 rma 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', 'readreturnauthorization'); 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=readreturnauthorization, timestamp=1657007708584, validrequest=true, version=1 0, responsejson={ "currentpagerecords" null, "totalrecords" 2, "totalpages" 1, "searchid" "webservices 5333445 sb1 070520228496699151186859035 be248925", "pageindex" 1, "errors" \[ ], "customparamters" { "where" { "value" null, "keyvaluemap" { "internalid" "94809,95012" } } }, "status" "200""returnauthorizations" \[ { "tranid" "147", "trandate" 1623567600, "totalcostestimate" null, "total" 1 18, "taxtotal" 0 18, "subtotal" 1 0, "subsidiary" { "type" null, "name" "atlanta", "internalid" "20", "externalid" null }, "status" "pending receipt", "source" "web services", "salesrep" null, "salesforceid" null, "saleseffectivedate" 1623567600, "otherrefnum" null, "orderstatus" null, "nullfieldlist" null, "memo" "3", "location" null, "lastmodifieddate" 1643036958, "itemlist" { "replaceall" null, "item" \[ { "unitsdisplay" null, "taxrate1" "18 0", "taxcode" { "type" null, "name" "vat in\ gst 18", "internalid" "36", "externalid" null }, "tax1amt" 0 18, "shipmethod" null, "shipgroup" null, "serialnumbers" null, "revrecstartdate" null, "revrecschedule" null, "revrecenddate" null, "rate" "1 00", "quantityremaining" null, "quantityreceived" 0 0, "quantitybilled" 0 0, "quantity" 1 0, "price" null, "ponum" null, "orderline" null, "onhand" null, "location" null, "line" 1, "jobname" null, "itemreceive" null, "itemname" null, "itemisfulfilled" null, "item" { "type" null, "name" "touch pad pro", "internalid" "570", "externalid" null }, "grossamt" 1 18, "expectedreceiptdate" null, "description" "linedesc", "department" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "false", "scriptid" "custcol checkbox", "internalid" "443", "fieldtype" null } ] }, "createpo" null, "costestimatetype" null, "costestimate" null, "classification" null, "amount" 1 0 } ] }, "internalid" "94809", "externalid" null, "entity" { "type" null, "name" "cust1010at test account62117", "internalid" "73691", "externalid" null }, "discounttotal" null, "discountrate" null, "discountitem" null, "department" { "type" null, "name" "test", "internalid" "3", "externalid" 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 }, { "valuelookup" null, "value" "false", "scriptid" "custbody edoc gen trans pdf", "internalid" "925", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody ei ds txn identifier", "internalid" "932", "fieldtype" null } ] }, "currencyrecord" { "type" null, "name" "sgd", "internalid" "6", "externalid" null }, "currencyname" "sgd", "createdfrom" null, "createddate" 1643036958, "classification" { "type" null, "name" "testing", "internalid" "3", "externalid" null } }, { "tranid" "148", "trandate" 1623567600, "totalcostestimate" null, "total" 1 18, "taxtotal" 0 18, "subtotal" 1 0, "subsidiary" { "type" null, "name" "atlanta", "internalid" "20", "externalid" null }, "status" "pending receipt", "source" "web services", "salesrep" null, "salesforceid" null, "saleseffectivedate" 1623567600, "otherrefnum" null, "orderstatus" null, "nullfieldlist" null, "memo" "3", "location" null, "lastmodifieddate" 1643369750, "itemlist" { "replaceall" null, "item" \[ { "unitsdisplay" null, "taxrate1" "18 0", "taxcode" { "type" null, "name" "vat in\ gst 18", "internalid" "36", "externalid" null }, "tax1amt" 0 18, "shipmethod" null, "shipgroup" null, "serialnumbers" null, "revrecstartdate" null, "revrecschedule" null, "revrecenddate" null, "rate" "1 00", "quantityremaining" null, "quantityreceived" 0 0, "quantitybilled" 0 0, "quantity" 1 0, "price" null, "ponum" null, "orderline" null, "onhand" null, "location" null, "line" 1, "jobname" null, "itemreceive" null, "itemname" null, "itemisfulfilled" null, "item" { "type" null, "name" "touch pad pro", "internalid" "570", "externalid" null }, "grossamt" 1 18, "expectedreceiptdate" null, "description" "linedesc", "department" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "false", "scriptid" "custcol checkbox", "internalid" "443", "fieldtype" null } ] }, "createpo" null, "costestimatetype" null, "costestimate" null, "classification" null, "amount" 1 0 } ] }, "internalid" "95012", "externalid" null, "entity" { "type" null, "name" "cust1034at test account65117", "internalid" "74092", "externalid" null }, "discounttotal" null, "discountrate" null, "discountitem" null, "department" { "type" null, "name" "test", "internalid" "3", "externalid" 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 }, { "valuelookup" null, "value" "false", "scriptid" "custbody edoc gen trans pdf", "internalid" "925", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody ei ds txn identifier", "internalid" "932", "fieldtype" null } ] }, "currencyrecord" { "type" null, "name" "sgd", "internalid" "6", "externalid" null }, "currencyname" "sgd", "createdfrom" null, "createddate" 1643369750, "classification" { "type" null, "name" "testing", "internalid" "3", "externalid" null } } ], }, }