---
title: Create
slug: netsuite/LlVu-create
description: Learn how to use the 'createCustomerSubsidiaryRelationship' action with this detailed document. Featuring Apex code examples and the corresponding JSON response from the Breadwinner Global API, this resource guides you through the process of creating cust
docTags: 
createdAt: 2021-11-01T06:08:43.000Z
---

The following is an example request which can be used while using ‘createCustomerSubsidiaryRelationship’ action.

:::CodeblockTabs
Request

```apex
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

```json
{
  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
      }
    }
  ]
 } 
}

```
:::

