---
title: Read
slug: netsuite/uTVn-read
description: Learn about the parameters and custom filters in the "readCustomerSubsidiaryRelationship" API action with this informative document. Discover how the "requestJSON" parameter allows you to add custom filters, like "where" filters, such as "entity" and "sub
docTags: 
createdAt: 2021-11-01T06:08:46.000Z
---

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.

:::CodeblockTabs
Request

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

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

```
:::













