---
title: Read
slug: quickbooks/xt42-read
description: Learn how to use the QuickBooks Sales Receipt Id to efficiently read sales receipts. This document includes a step-by-step guide on how to create a map, store crucial data, and make a request to the Breadwinner Global API. Discover how the response can pr
docTags: 
createdAt: 2021-10-30T07:56:04.000Z
---

The following is an example of read Sales Receipt. The QuickBooks Sales Receipt Id (Id) is required to read the Sales Receipt.

:::CodeblockTabs
Request

```apex
//  Create a Map to store all the data of a Sales Receipt
Map<String, Object> salesReceiptMap = new Map<String, Object>();
salesReceiptMap.put('Id','11');

//  Initializing the Request Data to be passed.
    Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'readSalesReceipt');
    reqObj.put('options',salesReceiptMap);
    //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=readSalesReceipt,
    responseJSON={
      "statusCode": 200,
      "status": "OK",
      "salesReceipts": [
        {
          "TxnTaxDetail": {
            "TotalTax": 0
          },
          "TxnDate": "2021-07-20",
          "TotalAmt": 337.50,
          "SyncToken": "0",
          "sparse": false,
          "PaymentRefNum": "10264",
          "PaymentMethodRef": {
            "value": "2",
            "name": "Check"
          },
          "MetaData": {
            "LastUpdatedTime": "2021-07-22T14:59:48-07:00",
            "CreateTime": "2021-07-22T14:59:48-07:00"
          },
          "Line": [
            {
              "SalesItemLineDetail": {
                "UnitPrice": 75,
                "TaxCodeRef": {
                  "value": "NON"
                },
                "Qty": 4.5,
                "ItemRef": {
                  "value": "4",
                  "name": "Design"
                }
              },
              "LineNum": 1,
              "Id": "1",
              "DetailType": "SalesItemLineDetail",
              "Description": "Custom Design",
              "Amount": 337.50
            },
            {
              "DetailType": "SubTotalLineDetail",
              "Amount": 337.50
            }
          ],
          "Id": "11",
          "EmailStatus": "NotSet",
          "DocNumber": "1003",
          "DepositToAccountRef": {
            "value": "35",
            "name": "Checking"
          },
          "CustomField": [
            {
              "Type": "StringType",
              "Name": "Crew #",
              "DefinitionId": "1"
            }
          ],
          "CustomerRef": {
            "value": "6",
            "name": "Dylan Sollfrank"
          },
          "CustomerMemo": {
            "value": "Thank you for your business and have a great day!"
          },
          "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
          },
          "BillAddr": {
            "Longitude": "INVALID",
            "Line1": "Dylan Sollfrank",
            "Lat": "INVALID",
            "Id": "49"
          },
          "Balance": 0
        }
      ]
    },
    timestamp=1635779867792,
    validRequest=true,
    version=1.0
  }
```
:::

