---
title: Read
slug: xero/QF6H-read
description: Learn how to retrieve specific records from Xero using filters like "order" and "where". Discover how to use these filters with the Breadwinner Global API. The response JSON includes key details such as sales/purchase details, description, and code. Optim
docTags: 
createdAt: 2022-08-02T14:37:38.000Z
---

You can read all Items from Xero without passing any filters. However, to retrieve specific records based on any filter conditions, you can add the following filters as "queryParameters" as shown in the below example.

| **Param Name** | **Type** | **Description**                                                                                                                                                                                                              |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| order          | String   | Order by any element returned                                                                                                                                                                                                |
| where          | String   | Filter by using the *where* parameter. We recommend you limit filtering to the [optimised elements](https://developer.xero.com/documentation/api/accounting/payments#get-payments) only. order status -  AUTHORISED, DELETED |



:::CodeblockTabs
Request

```apex
//  Create a Map to store all the data of a Item
Map<String, Object> ItemMap = new Map<String, Object>();
ItemMap.put('where', 'Code="Item-0001"');    

//  Initializing the Request Data to be passed.
    Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'readItem');
    reqObj.put('queryParameters', ItemMap);
    //Required, if Xero Multi-Org is enabled in Breadwinner. 
    reqObj.put('xeroOrgId', '!14kpg'); 

//  Placing a request to Breadwinner Global API
Map<String, Object> respMap = bread_winner.BreadwinnerXeroAPI.call(reqObj);
System.debug(respMap);

```

Response

```json
{
  action=readItem,
  responseJSON={
    "Items": [
      {
        "SalesDetails": {
          "UnitPrice": 210.0000,
          "TaxType": "OUTPUT",
          "AccountCode": "260"
        },
        "PurchaseDetails": {
          "UnitPrice": 100.0000,
          "TaxType": "INPUT",
          "AccountCode": null
        },
        "PurchaseDescription": "Test Item Purchase enabled",
        "Name": "Test Inventory Item",
        "ItemID": "121b9c03-e7d8-4d94-8da6-41a9530876ed",
        "IsTrackedAsInventory": true,
        "IsSold": true,
        "IsPurchased": true,
        "Description": "Test Sell item",
        "Code": "Item-0001"
      }
    ],
    "errors": [
      
    ],
    "statusCode": 200
  },
  timestamp=1659445581014,
  validRequest=true,
  version=1.0
}
```
:::

