Global API
...
Requests
Customer Subsidiary Rel.

Create

1min
the following is an example request which can be used while using ‘createcustomersubsidiaryrelationship’ action request map\<string, object> nscustomersub1 = new map\<string, object>(); nscustomersub1 put('entity', new map\<string, object>{'internalid'=>'362'}); nscustomersub1 put('subsidiary', new map\<string, object>{'internalid'=>'9'}); map\<string, object> nscustomersub2 = new map\<string, object>(); nscustomersub2 put('entity', new map\<string, object>{'internalid'=>'392'}); nscustomersub2 put('subsidiary', new map\<string, object>{'internalid'=>'9'}); // initializing the requestjson data to be passed map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('customersubsidiaryrelationships', new list\<object>{nscustomersub1, nscustomersub2}); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'createcustomersubsidiaryrelationship'); 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=createcustomersubsidiaryrelationship, timestamp=1626095474361, validrequest=true, version=1 0, responsejson={ "errors" \[], "status" "200", "customersubsidiaryrelationships" \[ { "subsidiary" { "type" null, "name" "parent company australia", "internalid" "9", "externalid" null }, "primarycurrency" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "isprimarysub" false, "internalid" "2006", "entity" { "type" null, "name" "21 atherton grocery", "internalid" "362", "externalid" null } }, { "subsidiary" { "type" null, "name" "parent company australia", "internalid" "9", "externalid" null }, "primarycurrency" { "type" null, "name" "inr", "internalid" "1", "externalid" null }, "isprimarysub" false, "internalid" "2007", "entity" { "type" null, "name" "14 1 info systems", "internalid" "392", "externalid" null } } ] } }