---
title: Read
slug: quickbooks/edo7-read
description: Learn how to read an invoice using the QuickBooks Invoice Id with this helpful document. It includes an Apex code snippet that demonstrates how to create a map for storing invoice data and makes a request to the Breadwinner Global API. Discover how to ext
docTags: 
createdAt: 2021-10-30T07:55:35.000Z
---

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

:::CodeblockTabs
Request

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

//  Initializing the Request Data to be passed.
    Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'readInvoice');
    reqObj.put('options',invoiceMap);
    //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=readInvoice,
    responseJSON={
      "statusCode": 200,
      "status": "OK",
      "invoices": [
        {
          "TxnTaxDetail": {
            "TotalTax": 0
          },
          "TxnDate": "2021-11-01",
          "TotalAmt": 100.00,
          "SyncToken": "3",
          "sparse": false,
          "ShipAddr": {
            "PostalCode": "94482",
            "Longitude": "-122.0642815",
            "Line1": "370 Easy St.",
            "Lat": "37.4031672",
            "Id": "9",
            "CountrySubDivisionCode": "CA",
            "City": "Middlefield"
          },
          "MetaData": {
            "LastUpdatedTime": "2021-11-01T06:14:57-07:00",
            "CreateTime": "2021-07-22T15:05:48-07:00"
          },
          "Line": [
            {
              "SalesItemLineDetail": {
                "UnitPrice": 50,
                "TaxCodeRef": {
                  "value": "TAX"
                },
                "Qty": 2,
                "ItemRef": {
                  "value": "1",
                  "name": "Services"
                }
              },
              "LineNum": 1,
              "Id": "3",
              "DetailType": "SalesItemLineDetail",
              "Description": "Description Updated",
              "Amount": 100.00
            },
            {
              "DetailType": "SubTotalLineDetail",
              "Amount": 100.00
            }
          ],
          "Id": "13",
          "EmailStatus": "NotSet",
          "DueDate": "2021-11-01",
          "DocNumber": "1005",
          "CustomField": [
            {
              "Type": "StringType",
              "Name": "Crew #",
              "DefinitionId": "1"
            }
          ],
          "CustomerRef": {
            "value": "9",
            "name": "55 Twin Lane"
          },
          "CurrencyRef": {
            "value": "USD",
            "name": "United States Dollar"
          },
          "BillAddr": {
            "PostalCode": "94482",
            "Longitude": "-122.0642815",
            "Line1": "370 Easy St.",
            "Lat": "37.4031672",
            "Id": "9",
            "CountrySubDivisionCode": "CA",
            "City": "Middlefield"
          },
          "Balance": 50.00,
          "AllowOnlineCreditCardPayment": false,
          "AllowOnlineACHPayment": false
        }
      ]
    },
    timestamp=1635779656984,
    validRequest=true,
    version=1.0
}
```
:::



