---
title: Read
slug: xero/CvL7-read
description: Learn how to use API filters to effectively retrieve filtered contact data from Xero in this document. Discover the various filters available, including order, page, includeArchived, IDs, and where, and explore an example code snippet showcasing their imp
docTags: 
createdAt: 2021-11-02T07:37:27.000Z
---

You can read all the contacts from Xero without passing any filters. However, to get only the filtered response results, 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                                                                                                                                                                              |
| page            | String   | Up to 100 contacts will be returned per call when the page parameter is used.<br />e.g. page=1                                                                                                             |
| includeArchived | Boolean  | e.g. includeArchived=true<br />Contacts with a status of ARCHIVED will be included in the response                                                                                                         |
| IDs             | String   | Filter by a comma-separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.                                                                                        |
| where           | String   | Filter using the *where* parameter. We recommend you limit filtering to the [optimised elements](https://developer.xero.com/documentation/api/accounting/contacts#optimised-use-of-the-where-filter) only. |

## Example:

:::CodeblockTabs
Request

```apex
//  Create a Map to store all the data of a Contact
Map<String, Object> contactFiltersMap = new Map<String, Object>();
contactFiltersMap.put('IDs', 'd7b9fa11-1b1b-4751-a0bb-1cbae4f43240');

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

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

Response

```json
{
    action=readContact,
    responseJSON={
        "statusCode":"200",
        "contacts":[
            {
                "Website":null,
                "TaxNumber":null,
                "SkypeUserName":null,
                "SalesTrackingCategories":null,
                "SalesDefaultAccountCode":null,
                "SalesforceRecordId":null,
                "PurchasesTrackingCategories":null,
                "PurchasesDefaultAccountCode":null,
                "Phones":[
                    {
                    "PhoneType":"DDI",
                    "PhoneNumber":"",
                    "PhoneCountryCode":"",
                    "PhoneAreaCode":""
                    },
                    {
                    "PhoneType":"DEFAULT",
                    "PhoneNumber":"",
                    "PhoneCountryCode":"",
                    "PhoneAreaCode":""
                    },
                    {
                    "PhoneType":"FAX",
                    "PhoneNumber":"",
                    "PhoneCountryCode":"",
                    "PhoneAreaCode":""
                    },
                    {
                    "PhoneType":"MOBILE",
                    "PhoneNumber":"",
                    "PhoneCountryCode":"",
                    "PhoneAreaCode":""
                    }
                ],
                "Phone":"",
                "PaymentTerms":null,
                "Name":"contact 1",
                "LastName":"",
                "LastModifiedInXero":"2021-10-20T23:10:17.000Z",
                "IsSupplier":true,
                "IsCustomer":true,
                "FirstName":"",
                "Fax":"",
                "errorMessage":null,
                "EmailAddress":"",
                "Discount":null,
                "DefaultCurrency":null,
                "CreatedDateInXero":null,
                "ContactStatus":"ACTIVE",
                "ContactPersons":[],
                "ContactID":"d7b9fa11-1b1b-4751-a0bb-1cbae4f43240",
                "BrandingTheme":null,
                "Balances":{
                    "AccountsReceivable":{
                    "Overdue":400.00,
                    "Outstanding":400.00
                    },
                    "AccountsPayable":{
                    "Overdue":50.00,
                    "Outstanding":50.00
                    }
                },
                "Addresses":[
                    {
                    "Region":"",
                    "PostalCode":"",
                    "Country":"",
                    "City":"",
                    "AttentionTo":"",
                    "AddressType":"STREET",
                    "AddressLine4":null,
                    "AddressLine3":null,
                    "AddressLine2":null,
                    "AddressLine1":null
                    },
                    {
                    "Region":"",
                    "PostalCode":"",
                    "Country":"",
                    "City":"",
                    "AttentionTo":"",
                    "AddressType":"POBOX",
                    "AddressLine4":null,
                    "AddressLine3":null,
                    "AddressLine2":null,
                    "AddressLine1":null
                    }
                ],
                "AccountsReceivableTaxType":null,
                "AccountsPayableTaxType":null,
                "AccountNumber":null

            }
        ],
    },
     timestamp=1635839827844, 
     validRequest=true, 
     version=1.0
 }
```
:::

