---
title: Response
slug: quickbooks/response
description: This document provides a comprehensive overview of the response generated from a request call. It explains how the response is structured as a Map<String, Object>, highlighting important keys like version, action, timestamp, validRequest, and apiErrors. T
docTags: 
createdAt: 2021-10-30T07:02:58.000Z
---

This response is the information returned from the Request call.  This will be returned in the form of a Map\<String, Object>.

Below is the list of Keys or Parameters returned in the Response Map:

| **Key (String)** | **Value (Object)**                                                  | **Additional Detail**                                                                              |
| ---------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| version          | ‘1.0’                                                               | Returns the same version sent in the Request                                                       |
| action           | See the list of available actions.                                  | Returns the same action sent in the Request.                                                       |
| timestamp        | Timestamp in milliseconds (Unix).                                   | The time at which the Response was returned.  This can be used to troubleshoot.                    |
| validRequest     | Either true or false.                                               | True if the Request satisfies the Breadwinner validations; False if it does not                    |
| apiErrors        | Returns [Error](docId\:OgomMeMODdbeI0fCIY2t4) list as a JSON string | List of errors that occurred while validating the request before making the request to QuickBooks. |
| responseJSON     | Returns the response of the record(s) as a JSON string.             | Includes the records data as well as any errors that were sent to Breadwinner from QuickBooks.     |

### Error

| **Key (String)** | **Data Type** | **Description**                                                                                                                           |
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| code             | String        | A short string indicating the error code reported.                                                                                        |
| message          | String        | A short subject of the error message. Example: Invalid Action                                                                             |
| detail           | String        | A detailed explanation of the Error occurred. Example: Breadwinner was unable to process the request as the action parameter was invalid. |

## Errors

### Before requesting QuickBooks

Errors that occur while validating the request, or while making a request to QuickBooks are returned as ‘apiErrors’ in the response.&#x20;

### After requesting QuickBooks

Errors occurred within QuickBooks while processing the request, or while processing the data in Breadwinner are sent as ‘errors’ in the responseJSON key of the Response map.

### Examples

:::::Tabs
::::Tab{title="Breadwinner API Errors"}
Breadwinner does validation prior to calling out to QuickBooks.

:::CodeblockTabs
Invalid Request

```json
{
    action=readCustomer, 
    apiErrors={"errors":[
        {"message":"Breadwinner was unable to process the request as the version parameter was not valid.",
        "code":"INVALID_VERSION",
        "detail": "The version 1.1, is not supported by Breadwinner. Please refer to the Breadwinner API Docs for the list of supported versions."
        }
        ]
    }, 
    timestamp=1635186915365, 
    validRequest=false, 
    version=1.1
}
```
:::
::::

::::Tab{title="Error that QuickBooks returns"}
The errors that QuickBooks returns will be included as "errors" in the "responseJSON". Below is the example that was reformatted for easier reading.

:::CodeblockTabs
400

```json
{
  action=createCustomer,
  responseJSON={
    "customers": null,
    "statusCode": 400,
    "status": "BAD REQUEST",
    "errors": [
      {
        "Message": "No name provided",
        "Detail": "Title, GivenName, MiddleName, FamilyName, DisplayName, Suffix - one of these must be non-empty.",
        "Code": "6080"
      }
    ]
  },
  timestamp=1635239587001,
  validRequest=true,
  version=1.0
}
```
:::
::::
:::::




