---
title: Read
slug: quickbooks/TDyJ-read
description: Learn how to read customer data from QuickBooks using Apex code. This example document covers how to create a map to store the data, initialize the request, and make a request to the Breadwinner Global API. Find out how to retrieve relevant customer detai
docTags: 
createdAt: 2021-10-29T05:37:09.000Z
---

The following is an example of read Customer. The QuickBooks customer Id (Id) is required to read the customer.

:::CodeblockTabs
Request

```apex
//  Create a Map to store all the data of a Customer
Map<String, Object> customerMap = new Map<String, Object>();
customerMap.put('Id','9');

//  Initializing the Request Data to be passed.
    Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'readCustomer');
    reqObj.put('options',customerMap);
    //Required, if QuickBooks Multi-Org is enabled in Breadwinner. 
    reqObj.put('qbOrgId', '4620816365285051610'); 

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

Response

```json
{
    action=readCustomer,
    responseJSON={
      "statusCode": 200,
      "status": "OK",
      "customers": [
        {
          "WebAddr": {
            "URI": "http://sportinggoods.intuit.com"
          },
          "Taxable": false,
          "SyncToken": "0",
          "sparse": false,
          "ShipAddr": {
            "PostalCode": "94482",
            "Longitude": "-122.0642815",
            "Line1": "370 Easy St.",
            "Lat": "37.4031672",
            "Id": "9",
            "CountrySubDivisionCode": "CA",
            "City": "Middlefield"
          },
          "PrintOnCheckName": "Freeman Sporting Goods",
          "PrimaryPhone": {
            "FreeFormNumber": "(650) 555-0987"
          },
          "PrimaryEmailAddr": {
            "Address": "Sporting_goods@intuit.com"
          },
          "PreferredDeliveryMethod": "Print",
          "ParentRef": {
            "value": "7"
          },
          "Mobile": {
            "FreeFormNumber": "(973) 555-8849"
          },
          "Metadata": {
            "LastUpdatedTime": "2021-11-01T06:14:57-07:00",
            "CreateTime": "2021-07-17T17:01:00-07:00"
          },
          "Job": true,
          "Id": "9",
          "GivenName": "Amelia",
          "FullyQualifiedName": "Freeman Sporting Goods:55 Twin Lane",
          "Fax": {
            "FreeFormNumber": "(520) 555-7894"
          },
          "DisplayName": "55 Twin Lane",
          "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
          },
          "CompanyName": "Freeman Sporting Goods",
          "BillWithParent": false,
          "BillAddr": {
            "PostalCode": "94482",
            "Longitude": "-122.0642815",
            "Line1": "370 Easy St.",
            "Lat": "37.4031672",
            "Id": "9",
            "CountrySubDivisionCode": "CA",
            "City": "Middlefield"
          },
          "BalanceWithJobs": "131.00",
          "Balance": "131.00",
          "Active": "true"
        }
      ]
    },
    timestamp=1635779152131,
    validRequest=true,
    version=1.0
}
```
:::

