---
title: Read
slug: netsuite/eRbF-read
description: Learn about the parameters and filters for reading Purchase Orders in the Breadwinner Global API. This document provides a JSON response object with details about the purchase order, including transaction ID, date, total amount, subsidiary, shipping addre
docTags: 
createdAt: 2021-11-01T07:09:36.000Z
---

To read Purchase Orders, 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 PO. 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                                                                                    |
| employee         | String        | To filter the records based on the Employee. 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>1628091060+and+lastModifiedDate<1629127860', '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', 'readPurchaseOrder');
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=readPurchaseOrder,
  timestamp=1657008201370,
  validRequest=true,
  version=1.0,
  responseJSON={
    "currentPageRecords": null,
    "totalRecords": 2,
    "totalPages": 1,
    "searchId": "WEBSERVICES_5333445_SB1_07052022849177422515921851_933af4dfa",
    "pageIndex": 1,
    "errors": [
      
    ],
    "customParamters": {
      "where": {
        "value": null,
        "keyValueMap": {
          "internalId": "642,929"
        }
      }
    },
    "status": "200""purchaseOrders": [
      {
        "tranId": "33",
        "tranDate": 1553497200,
        "trackingNumbers": null,
        "total": 250000.0,
        "terms": null,
        "taxTotal": 0.0,
        "subTotal": 250000.0,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Pending Receipt",
        "source": null,
        "shipTo": {
          "type": null,
          "name": "22 Chandana Brothers",
          "internalId": "364",
          "externalId": null
        },
        "shippingAddress": {
          "zip": "123456",
          "state": "ANDHRA PRADESH",
          "internalId": "220",
          "country": "_india",
          "city": "ELURU",
          "attention": null,
          "addrPhone": null,
          "addressee": "Test CHANDANA BROTHERS",
          "addr3": null,
          "addr2": "MAIN BAZAR",
          "addr1": "CHANDANA BROS"
        },
        "shipMethod": null,
        "shipDate": 1553497200,
        "salesforceID": null,
        "otherRefNum": null,
        "nullFieldList": null,
        "memo": null,
        "location": null,
        "lastModifiedDate": 1642685917,
        "itemList": {
          "replaceAll": null,
          "item": [
            {
              "unitsDisplay": null,
              "taxRate1": "0.0",
              "taxCode": {
                "type": null,
                "name": "VAT_IN:UNDEF-IN",
                "internalId": "5",
                "externalId": null
              },
              "tax1Amt": 0.0,
              "shipMethod": null,
              "shipGroup": null,
              "serialNumbers": null,
              "revRecStartDate": null,
              "revRecSchedule": null,
              "revRecEndDate": null,
              "rate": "500.00",
              "quantityRemaining": null,
              "quantityReceived": 0.0,
              "quantityBilled": 50.0,
              "quantity": 500.0,
              "price": null,
              "poNum": null,
              "orderLine": null,
              "onHand": null,
              "location": null,
              "line": 1,
              "jobName": null,
              "itemReceive": null,
              "itemName": null,
              "itemIsFulfilled": null,
              "item": {
                "type": null,
                "name": "Test MEN'S VINTAGE- JEANS PANT",
                "internalId": "23",
                "externalId": null
              },
              "grossAmt": 250000.0,
              "expectedReceiptDate": null,
              "description": null,
              "department": null,
              "customFieldList": null,
              "createPo": null,
              "costEstimateType": null,
              "costEstimate": null,
              "classification": null,
              "amount": 250000.0
            }
          ]
        },
        "internalId": "642",
        "fax": null,
        "externalId": null,
        "expenseList": null,
        "exchangeRate": 1.0,
        "entity": {
          "type": null,
          "name": "Test Anuvarthh Apparels Pvt Ltd",
          "internalId": "371",
          "externalId": null
        },
        "employee": null,
        "email": null,
        "dueDate": null,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody34",
              "internalId": "558",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "372 - Nikhil jain",
              "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_edoc_gen_trans_pdf",
              "internalId": "925",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_ei_ds_txn_identifier",
              "internalId": "932",
              "fieldType": null
            }
          ]
        },
        "currencyRecord": {
          "type": null,
          "name": "INR",
          "internalId": "1",
          "externalId": null
        },
        "currencyName": "INR",
        "createdFrom": {
          "type": null,
          "name": "Sales Order #57",
          "internalId": "641",
          "externalId": null
        },
        "createdDate": 1553507677,
        "classification": null,
        "billingAddress": {
          "zip": "560011",
          "state": "KARNATAKA",
          "internalId": "223",
          "country": "_india",
          "city": "BANGALORE",
          "attention": null,
          "addrPhone": null,
          "addressee": "Test Anuvarthh Apparels Pvt Ltd",
          "addr3": null,
          "addr2": "Jaya Nagar East\tJayanagar",
          "addr1": "#, 108, 7th Main Rd, 2nd Block,"
        }
      },
      {
        "tranId": "46",
        "tranDate": 1553670000,
        "trackingNumbers": null,
        "total": 250.0,
        "terms": null,
        "taxTotal": 0.0,
        "subTotal": 250.0,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Fully Billed",
        "source": null,
        "shipTo": {
          "type": null,
          "name": "30 Shobha Paradise",
          "internalId": "386",
          "externalId": null
        },
        "shippingAddress": null,
        "shipMethod": null,
        "shipDate": 1553670000,
        "salesforceID": null,
        "otherRefNum": null,
        "nullFieldList": null,
        "memo": null,
        "location": null,
        "lastModifiedDate": 1649745916,
        "itemList": {
          "replaceAll": null,
          "item": [
            {
              "unitsDisplay": null,
              "taxRate1": "0.0",
              "taxCode": {
                "type": null,
                "name": "VAT_IN:UNDEF-IN",
                "internalId": "5",
                "externalId": null
              },
              "tax1Amt": 0.0,
              "shipMethod": null,
              "shipGroup": null,
              "serialNumbers": null,
              "revRecStartDate": null,
              "revRecSchedule": null,
              "revRecEndDate": null,
              "rate": "250.00",
              "quantityRemaining": null,
              "quantityReceived": 1.0,
              "quantityBilled": 3.0,
              "quantity": 1.0,
              "price": null,
              "poNum": null,
              "orderLine": null,
              "onHand": null,
              "location": null,
              "line": 1,
              "jobName": null,
              "itemReceive": null,
              "itemName": null,
              "itemIsFulfilled": null,
              "item": {
                "type": null,
                "name": "Men's Cotton Pant",
                "internalId": "32",
                "externalId": null
              },
              "grossAmt": 250.0,
              "expectedReceiptDate": null,
              "description": null,
              "department": null,
              "customFieldList": null,
              "createPo": null,
              "costEstimateType": null,
              "costEstimate": null,
              "classification": null,
              "amount": 250.0
            }
          ]
        },
        "internalId": "929",
        "fax": null,
        "externalId": null,
        "expenseList": null,
        "exchangeRate": 1.0,
        "entity": {
          "type": null,
          "name": "Test H.M Clothing Pvt Ltd",
          "internalId": "388",
          "externalId": null
        },
        "employee": null,
        "email": "lavanya@dhruvsoft.com",
        "dueDate": null,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody34",
              "internalId": "558",
              "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_edoc_gen_trans_pdf",
              "internalId": "925",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_ei_ds_txn_identifier",
              "internalId": "932",
              "fieldType": null
            }
          ]
        },
        "currencyRecord": {
          "type": null,
          "name": "INR",
          "internalId": "1",
          "externalId": null
        },
        "currencyName": "INR",
        "createdFrom": {
          "type": null,
          "name": "Sales Order #77",
          "internalId": "928",
          "externalId": null
        },
        "createdDate": 1553666652,
        "classification": null,
        "billingAddress": null
      }
    ],
  },  
}
```
:::

