---
title: Read
slug: netsuite/read
description: Learn how to read Credit Memos using specific parameters like dateCreated, internalId, lastModifiedDate, subsidiary, additionalFilter, tranDate, and customer. This comprehensive document provides a code snippet for effectively applying these filters when 
docTags: 
createdAt: 2023-04-24T10:52:33.000Z
---

To read Credit Memos, 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 Customer. 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.                                                                                                        |
| 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>1682507614+and+lastModifiedDate<1682507708', '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', 'readCreditMemo');
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=readCreditMemo,
  timestamp= 1682507750255,
  validRequest=true,
  version=1.0,
  responseJSON={
    "currentPageRecords": 2,
    "totalRecords": 2,
    "totalPages": 1,
    "searchId": "WEBSERVICES_5333445_042620231119430988205277638_1320f0b19719",
    "pageIndex": 1,
    "errors": [],
    "customParamters": {
      "where": {
        "value": null,
        "keyValueMap": {
          "subsidiary": "1,2",
          "additionalFilter": "lastModifiedDate%3E1682507614%2Band%2BlastModifiedDate%3C1682507708"
        }
      }
    },
     "status": "200",
    "creditMemos": [
      {
        "tranId": "171",
        "tranDate": 1682478000,
        "total": 4183.64,
        "taxTotal": 638.19,
        "subTotal": 3545.45,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Open",
        "shippingCost": null,
        "salesRep": null,
        "salesforceID": null,
        "refundCheck": null,
        "otherRefNum": null,
        "memo": null,
        "location": {
          "type": null,
          "name": "test 1",
          "internalId": "13",
          "externalId": null
        },
        "lastModifiedDate": 1682507663,
        "job": null,
        "itemList": {
          "replaceAll": null,
          "item": [
            {
              "unitsDisplay": null,
              "taxRate1": "18.0",
              "taxCode": {
                "type": null,
                "name": "VAT_IN:GST 18",
                "internalId": "36",
                "externalId": null
              },
              "tax1Amt": 638.19,
              "shipMethod": null,
              "shipGroup": null,
              "serialNumbers": "1",
              "revRecStartDate": null,
              "revRecSchedule": null,
              "revRecEndDate": null,
              "rate": "3545.45454545",
              "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": "Alternate Price 2",
                "internalId": "3",
                "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": 4183.64,
              "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": 3545.45
            }
          ]
        },
        "internalId": "121663",
        "handlingCost": null,
        "externalId": null,
        "exchangeRate": 0.011,
        "entity": {
          "type": null,
          "name": "12 GS Solutions",
          "internalId": "46",
          "externalId": null
        },
        "discountTotal": null,
        "discountRate": null,
        "discountItem": null,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "1",
              "scriptId": "custbody15",
              "internalId": "182",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "3545.45",
              "scriptId": "custbody42",
              "internalId": "869",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "83890 - test 12223",
              "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": "GBP",
          "internalId": "5",
          "externalId": null
        },
        "currencyName": "GBP",
        "createdFrom": null,
        "createdDate": 1682507663,
        "classification": null,
        "applyList": null,
        "applied": 0.0,
        "account": {
          "type": null,
          "name": "Accounts Receivable",
          "internalId": "122",
          "externalId": null
        }
      },
      {
        "unapplied": 2360.0,
        "tranId": "172",
        "tranDate": 1682478000,
        "total": 2360.0,
        "taxTotal": 360.0,
        "subTotal": 2000.0,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Open",
        "shippingCost": null,
        "salesRep": null,
        "salesforceID": null,
        "refundCheck": null,
        "otherRefNum": null,
        "memo": null,
        "location": {
          "type": null,
          "name": "Hyderabad : Hi-Tech City",
          "internalId": "10",
          "externalId": null
        },
        "lastModifiedDate": 1682507702,
        "job": null,
        "itemList": {
          "replaceAll": null,
          "item": [
            {
              "unitsDisplay": null,
              "taxRate1": "18.0",
              "taxCode": {
                "type": null,
                "name": "VAT_IN:GST 18",
                "internalId": "36",
                "externalId": null
              },
              "tax1Amt": 360.0,
              "shipMethod": null,
              "shipGroup": null,
              "serialNumbers": null,
              "revRecStartDate": null,
              "revRecSchedule": null,
              "revRecEndDate": null,
              "rate": null,
              "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": "Custom",
                "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 : Apple 001",
                "internalId": "11538",
                "externalId": null
              },
              "isClosed": null,
              "grossAmt": 2360.0,
              "expectedReceiptDate": null,
              "description": "A refrigerator",
              "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": 2000.0
            }
          ]
        },
        "internalId": "121664",
        "handlingCost": null,
        "externalId": null,
        "exchangeRate": 23.0,
        "entity": {
          "type": null,
          "name": "12:1 GS Solutions : GS Solutions Sub Company",
          "internalId": "22501",
          "externalId": null
        },
        "discountTotal": null,
        "discountRate": null,
        "discountItem": null,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "1",
              "scriptId": "custbody15",
              "internalId": "182",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "2000",
              "scriptId": "custbody42",
              "internalId": "869",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "13730 - GH Contact",
              "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": 1682507702,
        "classification": null,
        "applyList": null,
        "applied": 0.0,
        "account": {
          "type": null,
          "name": "Accounts Receivable",
          "internalId": "122",
          "externalId": null
        }
      }
    ]
  }
}
```
:::

