Global API
...
Requests
Customer Subsidiary Rel.
Read
5min
read customer subsidiary relationship requestjson has the following parameters field name data type description customparameters map\<string, paramvalue> it is used to add filters to your search results pageindex integer request any page from the search results reponse searchid string request any page with the search id from the search results reponse custompagesize string no of records to return per search request custom parameters in the requestjson are in the form of param name and value map which are used for filtering different search results there is currently only one supported custom parameter supported custom parameters param name param value description where keyvaluemap pass the supported where filters in key value pair param value can be passed in the following two ways paramvalue field name data type description value string single param value keyvaluemap map\<string, string> adding multiple key value params (where filters) supported “where” filters field name data type description entity string internal id of the customer multiple values can be passed in a comma separated string subsidiary string internal id of subsidiary multiple ids can be passed in a comma separated string ex 1,2 sample requests and responses the following is an example request which can be used while using ‘readcustomersubsidiaryrelationship’ action request map\<string, object> filtermap = new map\<string, object>(); map\<string, object> filters = new map\<string, object>(); filters put('entity', '6'); filtermap put('where', new map\<string, object>{'keyvaluemap'=>filters}); // field 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', 'readcustomersubsidiaryrelationship'); reqobj put('requestjson', reqjson); // placing a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action=readcustomersubsidiaryrelationship, timestamp=1631545006430, validrequest=true, version=1 0, responsejson={ "status" "200", "currentpagerecords" 3, "totalrecords" 3, "totalpages" 1, "searchid" "webservices 5333445 sb1 091320215425706211450337308 eeb1aa13", "pageindex" 1, "errors" \[], "customparamters" { "where" { "value" null, "keyvaluemap" { "entity" "6" } } }, "customersubsidiaryrelationships" \[ { "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "primarycurrency" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "isprimarysub" true, "internalid" "9", "entity" { "type" null, "name" "1 gallery collection", "internalid" "6", "externalid" null } }, { "subsidiary" { "type" null, "name" "atlanta", "internalid" "20", "externalid" null }, "primarycurrency" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "isprimarysub" false, "internalid" "1866", "entity" { "type" null, "name" "1 gallery collection", "internalid" "6", "externalid" null } }, { "subsidiary" { "type" null, "name" "sydney", "internalid" "13", "externalid" null }, "primarycurrency" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "isprimarysub" false, "internalid" "1867", "entity" { "type" null, "name" "1 gallery collection", "internalid" "6", "externalid" null } } ] } }