---
title: Read
slug: netsuite/Fw8q-read
description: Learn how to effectively filter Cash Refund data and make requests to the Breadwinner Global API with this comprehensive document. Discover examples of constructing filters and gain insights into two cash refund transactions, including amounts, associated
docTags: 
createdAt: 2023-04-25T05:39:41.000Z
---

To read Cash Refunds, 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 Cash Refund. 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.                                                                                                        |
| status           | String        | To filter the records based on the Status value. Ex: Status=active                                                                                                                             |
| customer         | String        | To filter the records based on the Customer. Multiple IDs can be passed in a comma-separated string Ex: 6,7                                                                                    |

### Example

:::CodeblockTabs
Request

```apex
Map<String, Object> filters = new Map<String, Object>();
filters.put('subsidiary', '1,2');
filters.put('additionalFilter', EncodingUtil.urlEncode('lastModifiedDate>1682493097+and+lastModifiedDate<1682493214', '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', 'readCashRefund');
reqObj.put('requestJSON', reqJSON);

//  Place a request to Breadwinner Global API
Map<String, Object> resp = breadwinner_ns.BreadwinnerNetSuiteAPI.call(reqObj);
System.debug(resp);
```

Response

```json
{
  action=readCashRefund,
  timestamp=1682493238557,
  validRequest=true,
  version=1.0,
    responseJSON={
    {
	"currentPageRecords": 2,
	"totalRecords": 2,
	"totalPages": 1,
	"searchId": "WEBSERVICES_5333445_042620231133942682604740071_2f24a36e31c8",
	"pageIndex": 1,
	"errors": [],
	"customParamters": {
		"where": {
			"value": null,
			"keyValueMap": {
				"subsidiary": "1,2",
				"additionalFilter": "lastModifiedDate%3E1682493097%2Band%2BlastModifiedDate%3C1682493214"
			}
		}
	},
	"status": "200",

	"cashRefunds": [{
			"tranId": "14",
			"tranDate": 1682478000,
			"total": 18.88,
			"taxTotal": 2.88,
			"subTotal": 16.0,
			"subsidiary": {
				"type": null,
				"name": "Parent Company",
				"internalId": "1",
				"externalId": null
			},
			"status": null,
			"shippingCost": null,
			"salesRep": null,
			"salesforceID": null,
			"refundCheck": false,
			"otherRefNum": null,
			"memo": null,
			"location": {
				"type": null,
				"name": "Hyderabad : Hi-Tech City",
				"internalId": "10",
				"externalId": null
			},
			"lastModifiedDate": 1682493164,
			"job": null,
			"itemList": {
				"replaceAll": null,
				"item": [{
					"unitsDisplay": null,
					"taxRate1": "18.0%",
					"taxCode": {
						"type": null,
						"name": "VAT_IN:GST 18",
						"internalId": "36",
						"externalId": null
					},
					"tax1Amt": 2.88,
					"shipMethod": null,
					"shipGroup": null,
					"serialNumbers": "1",
					"revRecStartDate": null,
					"revRecSchedule": null,
					"revRecEndDate": null,
					"rate": "16.00",
					"quantityRemaining": null,
					"quantityReceived": null,
					"quantityPicked": null,
					"quantityPacked": null,
					"quantityOnHand": null,
					"quantityFulfilled": null,
					"quantityCommitted": null,
					"quantityBilled": null,
					"quantityBackOrdered": null,
					"quantityAvailable": null,
					"quantity": 1.0,
					"price": {
						"type": null,
						"name": "Base Price",
						"internalId": "1",
						"externalId": null
					},
					"poNum": null,
					"percentComplete": null,
					"orderLine": null,
					"onHand": null,
					"location": null,
					"line": 1,
					"jobName": null,
					"itemReceive": null,
					"itemName": null,
					"itemIsFulfilled": null,
					"item": {
						"type": null,
						"name": "Apple",
						"internalId": "444",
						"externalId": null
					},
					"isClosed": null,
					"grossAmt": 18.88,
					"expectedReceiptDate": null,
					"description": "sales",
					"department": null,
					"customFieldList": {
						"customField": [{
							"valueLookup": null,
							"value": "false",
							"scriptId": "custcol_checkbox",
							"internalId": "443",
							"fieldType": null
						}]
					},
					"createPo": null,
					"costEstimateType": "_averageCost",
					"costEstimate": 0.0,
					"classification": null,
					"billingSchedule": null,
					"amount": 16.0
				}]
			},
			"internalId": "121457",
			"handlingCost": null,
			"externalId": null,
			"exchangeRate": 23.0,
			"entity": {
				"type": null,
				"name": "12:472 GS Solutions : United Oil & Gas Corp.",
				"internalId": "65690",
				"externalId": null
			},
			"discountTotal": null,
			"discountRate": null,
			"discountItem": null,
			"department": null,
			"customForm": null,
			"customFieldList": {
				"customField": [{
						"valueLookup": null,
						"value": "16",
						"scriptId": "custbody42",
						"internalId": "869",
						"fieldType": null
					},
					{
						"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_enableimport",
						"internalId": "691",
						"fieldType": null
					}
				]
			},
			"currencyRecord": {
				"type": null,
				"name": "US Dollars",
				"internalId": "2",
				"externalId": null
			},
			"currencyName": "US Dollars",
			"createdFrom": null,
			"createdDate": 1682493164,
			"classification": null,
			"applyList": null,
			"applied": null,
			"account": {
				"type": null,
				"name": "Cheque Account",
				"internalId": "1",
				"externalId": null
			}
		},
		{
			"unapplied": null,
			"tranId": "15",
			"tranDate": 1682478000,
			"total": 2.36,
			"taxTotal": 0.36,
			"subTotal": 2.0,
			"subsidiary": {
				"type": null,
				"name": "Parent Company",
				"internalId": "1",
				"externalId": null
			},
			"status": null,
			"shippingCost": null,
			"salesRep": null,
			"salesforceID": null,
			"refundCheck": false,
			"otherRefNum": null,
			"memo": null,
			"location": {
				"type": null,
				"name": "Hyderabad : Hi-Tech City",
				"internalId": "10",
				"externalId": null
			},
			"lastModifiedDate": 1682493198,
			"job": null,
			"itemList": {
				"replaceAll": null,
				"item": [{
					"unitsDisplay": null,
					"taxRate1": "18.0%",
					"taxCode": {
						"type": null,
						"name": "VAT_IN:GST 18",
						"internalId": "36",
						"externalId": null
					},
					"tax1Amt": 0.36,
					"shipMethod": null,
					"shipGroup": null,
					"serialNumbers": null,
					"revRecStartDate": null,
					"revRecSchedule": null,
					"revRecEndDate": null,
					"rate": "2.00",
					"quantityRemaining": null,
					"quantityReceived": null,
					"quantityPicked": null,
					"quantityPacked": null,
					"quantityOnHand": null,
					"quantityFulfilled": null,
					"quantityCommitted": null,
					"quantityBilled": null,
					"quantityBackOrdered": null,
					"quantityAvailable": null,
					"quantity": 1.0,
					"price": {
						"type": null,
						"name": "Base Price",
						"internalId": "1",
						"externalId": null
					},
					"poNum": null,
					"percentComplete": null,
					"orderLine": null,
					"onHand": null,
					"location": null,
					"line": 1,
					"jobName": null,
					"itemReceive": null,
					"itemName": null,
					"itemIsFulfilled": null,
					"item": {
						"type": null,
						"name": "Chair",
						"internalId": "10030",
						"externalId": null
					},
					"isClosed": null,
					"grossAmt": 2.36,
					"expectedReceiptDate": null,
					"description": null,
					"department": null,
					"customFieldList": {
						"customField": [{
							"valueLookup": null,
							"value": "false",
							"scriptId": "custcol_checkbox",
							"internalId": "443",
							"fieldType": null
						}]
					},
					"createPo": null,
					"costEstimateType": "_averageCost",
					"costEstimate": 0.0,
					"classification": null,
					"billingSchedule": null,
					"amount": 2.0
				}]
			},
			"internalId": "121458",
			"handlingCost": null,
			"externalId": null,
			"exchangeRate": 1.0,
			"entity": {
				"type": null,
				"name": "139 ABC",
				"internalId": "2770",
				"externalId": null
			},
			"discountTotal": null,
			"discountRate": null,
			"discountItem": null,
			"department": null,
			"customForm": null,
			"customFieldList": {
				"customField": [{
						"valueLookup": null,
						"value": "2",
						"scriptId": "custbody42",
						"internalId": "869",
						"fieldType": null
					},
					{
						"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_enableimport",
						"internalId": "691",
						"fieldType": null
					}
				]
			},
			"currencyRecord": {
				"type": null,
				"name": "INR",
				"internalId": "1",
				"externalId": null
			},
			"currencyName": "INR",
			"createdFrom": null,
			"createdDate": 1682493198,
			"classification": null,
			"applyList": null,
			"applied": null,
			"account": {
				"type": null,
				"name": "Cheque Account",
				"internalId": "1",
				"externalId": null
			}
		}
	]
}
}

```
:::

