QBD Accounting API vv1

Welcome

Welcome to the QBD Connect Accounting API. It provides a set of resources to query, insert, modify, and delete QuickBooks data. There are essentially two forms of resources. The majority of the resources provide JSON-based interfaces for accounting data and functions. The second form is a single proxy resource for XML-based, native QBWC requests. The section below, titled QBXML Proxy, goes into more detail about QBXML.

A subscription is required to use QBD Connect and its set of API's. See the QBD Connect Web site for more information on obtaining a subscription.

Usage

Authentication

Security is provided via JWT tokens in the Authorization header as a Bearer token.

Requests

There are two types of requests, synchronous (default) and asynchronous. Synchronous requests provide a way for clients to wait for responses to requests. Asynchronous requests allow clients to disconnect from the request. Why is this important? The way that QBD Connect works with QBWC, requests could take several minutes to a couple of hours to complete. For certain requests, waiting for responses is not necessary. For example, if an inventory adjustment is sent to QuickBooks, the response may not be relevant. It may suffice to review the results later or only be notified if an error occurs. The way to send an asynchronous request for some resources is to add the query parameter async to the URL. The documentation will indicate whether the request for the resource can be made asynchronously.

QBXML Proxy

The messages sent to QuickBooks Desktop for CRUD (create, request, update, delete) operations are in the form of QBXML messages. There are hundreds of operations that QBXML supports. For a list of operations and the format, please review the QBXML API documentation.

The proxy provides a native interface for communicating with QBWC, either synchronously or asynchronously. The purpose of the proxy is to expose all of the operations while the JSON-based resources are being developed. If JSON is the preferred method, please request new functionality through the Support portal.

link https://qbdc.whipclient.io/accounting-api/{version}

Path Parameters

ParameterTypeDescription
version*string
Enum:
  • v1

Home

Welcome

Welcome to the QBD Accounting API. It provides a set of resources to query, insert, modify, and delete QuickBooks data. There are essentially two forms of resources. The majority of the resources provide JSON-based interfaces for accounting data and functions. The second form is a single proxy resource for XML-based, native QBWC requests. The section below, titled QBXML Proxy, goes into more detail about QBXML.

QBXML Proxy

The messages sent to QuickBooks Desktop for CRUD (create, request, update, delete) operations are in the form of QBXML messages. There are hundreds of operations that QBXML supports. For a list of operations and the format, please review the QBXML API documentation.

The proxy provides a native interface for communicating with QBWC, either synchronously or asynchronously. The purpose of the proxy is to expose all of the operations while the JSON-based resources are being developed. If JSON is the preferred method, please request new functionality through the Support portal.

Requests

There are two types of requests, synchronous (default) and asynchronous. Synchronous requests provide a way for clients to wait for responses to requests. Asynchronous requests allow clients to disconnect from the request. Why is this important? The way that QBD Connect works with QBWC, requests could take several minutes to a couple of hours to complete. For certain requests, waiting for responses is not necessary. For example, if an inventory adjustment is sent to QuickBooks, the response may not be relevant. It may suffice to review the results later or only be notified if an error occurs. The way to send an asynchronous request for some resources is to add the query parameter async to the URL. The documentation will indicate whether the request for the resource can be made asynchronously.

Resources

post /qbxml

 lock

Send a QBXML request to QBWC utilizing the native XML format. One thing to note is that the response should be 200 even if there is an error with the request. Clients should inspect the payload to determine if there was an error with the request or response.

The example below is a query for the list of accounts.

Additional Reference

See the QBXML API documentation for information regarding specific operations.

Parameters chevron_right expand_more

ParameterTypeDescription
Query
instanceId*string

The instance ID is the identifier for the QBD Connect instance that communicates with QBWC. It is required for QBXML requests because the payload is native to QBXML.

Headers chevron_right expand_more

ParameterTypeDescription
Authorization*string

The bearer token in the form of "Bearer $token"

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X POST \
  -H "Authorization: <value>" \
  -H "Content-type: application/xml"
  -d @body.xml \
  https://qbdc.whipclient.io/accounting-api/{version}/qbxml?instanceId=<value>

Request Body chevron_right expand_more

application/xml

application/xml

The request body depends upon the request being made. It is XML-based, so the action is based upon the content. See the QBXML API documentation for information regarding specific operations.

Request Body

<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <AccountQueryRq requestID="abcdefg123456789"></AccountQueryRq>
    </QBXMLMsgsRq>
</QBXML>

200 OK chevron_right expand_more

application/xml

application/xml

ParameterTypeDescription
InstanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

Action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

RequestId*string

The request ID is a generated UUID when the request was created.

Response Body

<?xml version="1.0" ?>
<Request>
    <InstanceId>QyHYsTXXwT1634405151</InstanceId>
    <Action>InventoryAdjustmentAdd</Action>
    <RequestId>fe1fdd75-31a4-44e3-886e-03ba35287e96</RequestId>
</Request>

post /inventory-adjustments

 lock

Create an inventory adjustment in QuickBooks. The inventory adjustment contains line items that reference items by name or ID. If one or more line items is invalid, the inventory adjustment will fail for all items. If this happens, correct the items that are invalid and resubmit the request.

Headers chevron_right expand_more

ParameterTypeDescription
Authorization*string

The bearer token in the form of "Bearer $token"

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X POST \
  -H "Authorization: <value>" \
  -H "Content-type: application/json"
  -d @body.json \
  https://qbdc.whipclient.io/accounting-api/{version}/inventory-adjustments

Request Body chevron_right expand_more

Inventory Adjustment Add Request InventoryAdjustmentAddRq

application/json

Additional properties: Yes

Inherits: object

ParameterTypeDescription
data*object

The inventory adjustment data to add.

Additional properties: Yes

data.accountReference*object

The reference to the account for the inventory adjustment

Additional properties: Yes

data.accountReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.accountReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.transactionDate*date-only
data.referenceNumber*string

Max. length: 11

data.adjustments*array

The inventory that is adjusted

data.adjustments[]object

Additional properties: Yes

data.adjustments[].itemReference*object

The reference to the item for the inventory adjustment

Additional properties: Yes

data.adjustments[].itemReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].itemReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].quantityobject

Either this, the value adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].quantity.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.serialNumberstring

Either this or the lot number should be defined

data.adjustments[].quantity.lotNumberstring

Either this or the serial number should be defined

data.adjustments[].quantity.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].quantity.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].quantity.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].valueobject

Either this, the quantity adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].value.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].value.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].value.newValuenumber

Either this or the value difference should be defined

data.adjustments[].value.valueDifferencenumber

Either this or the new value should be defined

data.adjustments[].serialNumberobject

Either this, the quantity adjustment, the value adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].serialNumber.addSerialNumberstring
data.adjustments[].serialNumber.removeSerialNumberstring
data.adjustments[].serialNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].serialNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].serialNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].lotNumberobject

Either this, the quantity adjustment, the value adjustment, or the serial number adjustment should be defined

Additional properties: Yes

data.adjustments[].lotNumber.lotNumberstring
data.adjustments[].lotNumber.countAdjustmentinteger
data.adjustments[].lotNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].lotNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].lotNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.customerReferenceobject

The customer for the inventory adjustment

Additional properties: Yes

data.customerReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.customerReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.classReferenceobject

The accounting class for the inventory adjustment

Additional properties: Yes

data.classReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.classReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.memostring
data.externalGuidstring

The unique identifier that is reference from an external system

request*object

The transaction request is the request object for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

Additional properties: Yes

request.instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

request.callbackUrlstring

The callbackUrl is the HTTP endpoint where the response should go. For requests that have a callback URL, QBD Connect will send the request to QuickBooks Desktop, receive the response, and then send the response to the HTTP endpoint either encrypted or unencrypted. Encryption is the responsibility of the client. By default, if this property is not included, the response is saved for 24 hours for the client to request the response via an API request to /requests/{requestId}?instanceId=<instanceId>&action=<action>.

NOTE: Only include this property if the response should be delivered via HTTP(S)

Secure Communication

As state above, the callback can either be encrypted or plain-text. It is strongly suggested that the callback is to an encrypted (HTTPS) endpoint. It is also suggested that the request ID is verified on the response for the request that was sent. For example, if a request is made for an inventory adjustment, the client should save the request ID and then verify that the response has the appropriate instance ID, action (InventoryAdjustmentAdd, in this case), and request ID.

Request Body

adjustSingleItem

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-24",
        "referenceNumber": "20210924002",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 50
                }
            }
        ],
        "memo": "This is a test inventory adjustment: #4"
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

adjustTwoItems

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-20",
        "referenceNumber": "111-222-111",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 20
                }
            },

            {
                "itemReference": {
                    "name": "test-item-2"
                },
                "quantity": {
                    "quantityDifference": 5
                }
            }
        ]
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

201 Created chevron_right expand_more

When an inventory adjustment is successfully created in QuickBooks, a 201 will be returned along with the responseData object.

Transaction Response Response

application/json

The transaction response is the return value for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

The request data tells QBD Connect how to route and process the data. This object is required for submitting the request, but will optionally be on the response depending upon whether the response returns a list of objects or a single object. If the response returns a list, the requestData object will be at the end of the list, not on the individual objects.

Additional properties: Yes

Inherits: object

ParameterTypeDescription
instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

requestId*string

The request ID is a generated UUID when the request was created.

get /inventory-adjustments

 lock

Search for a list of inventory-adjustments in QuickBooks Desktop with optional query parameters.

Headers chevron_right expand_more

ParameterTypeDescription
Authorization*string

The bearer token in the form of "Bearer $token"

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X GET \
  -H "Authorization: <value>" \
  https://qbdc.whipclient.io/accounting-api/{version}/inventory-adjustments

200 OK chevron_right expand_more

A successful request will return a list of inventory-adjustments with the requestData object as a sibling to the inventory-adjustments.

The actual objects will either be saved for 24 hours, awaiting retrieval, or will be sent to the callback URL, if specified.

Transaction Response Response

application/json

The transaction response is the return value for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

The request data tells QBD Connect how to route and process the data. This object is required for submitting the request, but will optionally be on the response depending upon whether the response returns a list of objects or a single object. If the response returns a list, the requestData object will be at the end of the list, not on the individual objects.

Additional properties: Yes

Inherits: object

ParameterTypeDescription
instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

requestId*string

The request ID is a generated UUID when the request was created.

get /inventory-adjustments/{inventoryAdjustmentId}

 lock

Get a inventory-adjustment by ID.

Parameters chevron_right expand_more

ParameterTypeDescription
Path
inventoryAdjustmentId*string

Headers chevron_right expand_more

ParameterTypeDescription
Authorization*string

The bearer token in the form of "Bearer $token"

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X GET \
  -H "Authorization: <value>" \
  https://qbdc.whipclient.io/accounting-api/{version}/inventory-adjustments/{inventoryAdjustmentId}

200 OK chevron_right expand_more

A successful request will return a inventory-adjustment with the request object as a sibling to the inventory-adjustments.

The actual objects will either be saved for 24 hours, awaiting retrieval, or will be sent to the callback URL, if specified.

Transaction Response Response

application/json

The transaction response is the return value for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

The request data tells QBD Connect how to route and process the data. This object is required for submitting the request, but will optionally be on the response depending upon whether the response returns a list of objects or a single object. If the response returns a list, the requestData object will be at the end of the list, not on the individual objects.

Additional properties: Yes

Inherits: object

ParameterTypeDescription
instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

requestId*string

The request ID is a generated UUID when the request was created.

put /inventory-adjustments/{inventoryAdjustmentId}

 lock

Update a inventory-adjustment based upon the given ID with the object requested.

Parameters chevron_right expand_more

ParameterTypeDescription
Path
inventoryAdjustmentId*string

Headers chevron_right expand_more

ParameterTypeDescription
Authorization*string

The bearer token in the form of "Bearer $token"

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X PUT \
  -H "Authorization: <value>" \
  -H "Content-type: application/json"
  -d @body.json \
  https://qbdc.whipclient.io/accounting-api/{version}/inventory-adjustments/{inventoryAdjustmentId}

Request Body chevron_right expand_more

InventoryAdjustmentModRq InventoryAdjustmentModRq

application/json

Additional properties: Yes

Inherits: object

ParameterTypeDescription
data*object

The inventory adjustment data to add.

Additional properties: Yes

data.accountReference*object

The reference to the account for the inventory adjustment

Additional properties: Yes

data.accountReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.accountReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.transactionDate*date-only
data.referenceNumber*string

Max. length: 11

data.adjustments*array

The inventory that is adjusted

data.adjustments[]object

Additional properties: Yes

data.adjustments[].itemReference*object

The reference to the item for the inventory adjustment

Additional properties: Yes

data.adjustments[].itemReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].itemReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].quantityobject

Either this, the value adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].quantity.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.serialNumberstring

Either this or the lot number should be defined

data.adjustments[].quantity.lotNumberstring

Either this or the serial number should be defined

data.adjustments[].quantity.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].quantity.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].quantity.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].valueobject

Either this, the quantity adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].value.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].value.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].value.newValuenumber

Either this or the value difference should be defined

data.adjustments[].value.valueDifferencenumber

Either this or the new value should be defined

data.adjustments[].serialNumberobject

Either this, the quantity adjustment, the value adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].serialNumber.addSerialNumberstring
data.adjustments[].serialNumber.removeSerialNumberstring
data.adjustments[].serialNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].serialNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].serialNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].lotNumberobject

Either this, the quantity adjustment, the value adjustment, or the serial number adjustment should be defined

Additional properties: Yes

data.adjustments[].lotNumber.lotNumberstring
data.adjustments[].lotNumber.countAdjustmentinteger
data.adjustments[].lotNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].lotNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].lotNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.customerReferenceobject

The customer for the inventory adjustment

Additional properties: Yes

data.customerReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.customerReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.classReferenceobject

The accounting class for the inventory adjustment

Additional properties: Yes

data.classReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.classReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.memostring
data.externalGuidstring

The unique identifier that is reference from an external system

request*object

The transaction request is the request object for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

Additional properties: Yes

request.instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

request.callbackUrlstring

The callbackUrl is the HTTP endpoint where the response should go. For requests that have a callback URL, QBD Connect will send the request to QuickBooks Desktop, receive the response, and then send the response to the HTTP endpoint either encrypted or unencrypted. Encryption is the responsibility of the client. By default, if this property is not included, the response is saved for 24 hours for the client to request the response via an API request to /requests/{requestId}?instanceId=<instanceId>&action=<action>.

NOTE: Only include this property if the response should be delivered via HTTP(S)

Secure Communication

As state above, the callback can either be encrypted or plain-text. It is strongly suggested that the callback is to an encrypted (HTTPS) endpoint. It is also suggested that the request ID is verified on the response for the request that was sent. For example, if a request is made for an inventory adjustment, the client should save the request ID and then verify that the response has the appropriate instance ID, action (InventoryAdjustmentAdd, in this case), and request ID.

Request Body

adjustSingleItem

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-24",
        "referenceNumber": "20210924002",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 50
                }
            }
        ],
        "memo": "This is a test inventory adjustment: #4"
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

adjustTwoItems

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-20",
        "referenceNumber": "111-222-111",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 20
                }
            },

            {
                "itemReference": {
                    "name": "test-item-2"
                },
                "quantity": {
                    "quantityDifference": 5
                }
            }
        ]
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

200 OK chevron_right expand_more

A successful request will return a inventory-adjustment with the request object as a sibling to the inventory-adjustments.

The actual objects will either be saved for 24 hours, awaiting retrieval, or will be sent to the callback URL, if specified.

Transaction Response Response

application/json

The transaction response is the return value for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

The request data tells QBD Connect how to route and process the data. This object is required for submitting the request, but will optionally be on the response depending upon whether the response returns a list of objects or a single object. If the response returns a list, the requestData object will be at the end of the list, not on the individual objects.

Additional properties: Yes

Inherits: object

ParameterTypeDescription
instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

requestId*string

The request ID is a generated UUID when the request was created.

get /requests

 lock

Parameters chevron_right expand_more

ParameterTypeDescription
Query
instanceId*string

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X GET \
  https://qbdc.whipclient.io/accounting-api/{version}/requests?instanceId=<value>

get /requests/{requestId}

 lock

Parameters chevron_right expand_more

ParameterTypeDescription
Path
requestId*string
Query
instanceId*string
action*string

Secured By chevron_right expand_more

JWT Token Bearer bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X GET \
  https://qbdc.whipclient.io/accounting-api/{version}/requests/{requestId}?instanceId=<value>&action=<value>

Security Schemes

Security Scheme bearer

JWT Token Bearer

A user requests a bearer token via a login request and then uses the token for Accounting API requests. The response from a login will contain several tokens. The ID token must be used for the API requests. The refresh token should be used when the ID token is no longer valid.

curl -X <method> \
  https://qbdc.whipclient.io/accounting-api/{version}/<path>

Types

Type Account (object)

Account

Additional properties: Yes

Inherits:

Model

ParameterTypeDescription
listId*string
timeCreated*datetime
timeModified*datetime
editSequence*integer
name*string
fullName*string
isActive*boolean
sublevel*integer
accountType*string
specialAccountType*string
accountNumber*integer
description*string
balance*number
totalBalance*number
cashFlowClassification*string

Type InventoryAdjustment (object)

Inventory Adjustment

Additional properties: Yes

Inherits:

Model

ParameterTypeDescription
accountReference*object

The reference to the account for the inventory adjustment

Additional properties: Yes

accountReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

accountReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

transactionDate*date-only
referenceNumber*string

Max. length: 11

adjustments*array

The inventory that is adjusted

adjustments[]object

Additional properties: Yes

adjustments[].itemReference*object

The reference to the item for the inventory adjustment

Additional properties: Yes

adjustments[].itemReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

adjustments[].itemReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

adjustments[].quantityobject

Either this, the value adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

adjustments[].quantity.newQuantitynumber

Either this or the quantity difference should be defined

adjustments[].quantity.quantityDifferencenumber

Either this or the quantity difference should be defined

adjustments[].quantity.serialNumberstring

Either this or the lot number should be defined

adjustments[].quantity.lotNumberstring

Either this or the serial number should be defined

adjustments[].quantity.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

adjustments[].quantity.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

adjustments[].quantity.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

adjustments[].valueobject

Either this, the quantity adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

adjustments[].value.newQuantitynumber

Either this or the quantity difference should be defined

adjustments[].value.quantityDifferencenumber

Either this or the quantity difference should be defined

adjustments[].value.newValuenumber

Either this or the value difference should be defined

adjustments[].value.valueDifferencenumber

Either this or the new value should be defined

adjustments[].serialNumberobject

Either this, the quantity adjustment, the value adjustment, or the lot number adjustment should be defined

Additional properties: Yes

adjustments[].serialNumber.addSerialNumberstring
adjustments[].serialNumber.removeSerialNumberstring
adjustments[].serialNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

adjustments[].serialNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

adjustments[].serialNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

adjustments[].lotNumberobject

Either this, the quantity adjustment, the value adjustment, or the serial number adjustment should be defined

Additional properties: Yes

adjustments[].lotNumber.lotNumberstring
adjustments[].lotNumber.countAdjustmentinteger
adjustments[].lotNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

adjustments[].lotNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

adjustments[].lotNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

customerReferenceobject

The customer for the inventory adjustment

Additional properties: Yes

customerReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

customerReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

classReferenceobject

The accounting class for the inventory adjustment

Additional properties: Yes

classReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

classReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

memostring
externalGuidstring

The unique identifier that is reference from an external system

Type Reference (object)

Reference

A reference to another QuickBooks Desktop record

Additional properties: Yes

Inherits:

Model

ParameterTypeDescription
listIdstring

The ID of the object. Either this, the name, or both should be defined.

namestring

The full name of the object. Either this, the list ID, or both should be defined.

Type InventoryAdjustmentAddRq (object)

Inventory Adjustment Add Request

Additional properties: Yes

Inherits: object

Model

ParameterTypeDescription
data*object

The inventory adjustment data to add.

Additional properties: Yes

data.accountReference*object

The reference to the account for the inventory adjustment

Additional properties: Yes

data.accountReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.accountReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.transactionDate*date-only
data.referenceNumber*string

Max. length: 11

data.adjustments*array

The inventory that is adjusted

data.adjustments[]object

Additional properties: Yes

data.adjustments[].itemReference*object

The reference to the item for the inventory adjustment

Additional properties: Yes

data.adjustments[].itemReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].itemReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].quantityobject

Either this, the value adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].quantity.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.serialNumberstring

Either this or the lot number should be defined

data.adjustments[].quantity.lotNumberstring

Either this or the serial number should be defined

data.adjustments[].quantity.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].quantity.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].quantity.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].valueobject

Either this, the quantity adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].value.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].value.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].value.newValuenumber

Either this or the value difference should be defined

data.adjustments[].value.valueDifferencenumber

Either this or the new value should be defined

data.adjustments[].serialNumberobject

Either this, the quantity adjustment, the value adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].serialNumber.addSerialNumberstring
data.adjustments[].serialNumber.removeSerialNumberstring
data.adjustments[].serialNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].serialNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].serialNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].lotNumberobject

Either this, the quantity adjustment, the value adjustment, or the serial number adjustment should be defined

Additional properties: Yes

data.adjustments[].lotNumber.lotNumberstring
data.adjustments[].lotNumber.countAdjustmentinteger
data.adjustments[].lotNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].lotNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].lotNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.customerReferenceobject

The customer for the inventory adjustment

Additional properties: Yes

data.customerReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.customerReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.classReferenceobject

The accounting class for the inventory adjustment

Additional properties: Yes

data.classReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.classReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.memostring
data.externalGuidstring

The unique identifier that is reference from an external system

request*object

The transaction request is the request object for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

Additional properties: Yes

request.instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

request.callbackUrlstring

The callbackUrl is the HTTP endpoint where the response should go. For requests that have a callback URL, QBD Connect will send the request to QuickBooks Desktop, receive the response, and then send the response to the HTTP endpoint either encrypted or unencrypted. Encryption is the responsibility of the client. By default, if this property is not included, the response is saved for 24 hours for the client to request the response via an API request to /requests/{requestId}?instanceId=<instanceId>&action=<action>.

NOTE: Only include this property if the response should be delivered via HTTP(S)

Secure Communication

As state above, the callback can either be encrypted or plain-text. It is strongly suggested that the callback is to an encrypted (HTTPS) endpoint. It is also suggested that the request ID is verified on the response for the request that was sent. For example, if a request is made for an inventory adjustment, the client should save the request ID and then verify that the response has the appropriate instance ID, action (InventoryAdjustmentAdd, in this case), and request ID.

Examples

adjustSingleItem

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-24",
        "referenceNumber": "20210924002",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 50
                }
            }
        ],
        "memo": "This is a test inventory adjustment: #4"
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

adjustTwoItems

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-20",
        "referenceNumber": "111-222-111",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 20
                }
            },

            {
                "itemReference": {
                    "name": "test-item-2"
                },
                "quantity": {
                    "quantityDifference": 5
                }
            }
        ]
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

Type InventoryAdjustmentModRq (object)

InventoryAdjustmentModRq

Additional properties: Yes

Inherits: object

Model

ParameterTypeDescription
data*object

The inventory adjustment data to add.

Additional properties: Yes

data.accountReference*object

The reference to the account for the inventory adjustment

Additional properties: Yes

data.accountReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.accountReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.transactionDate*date-only
data.referenceNumber*string

Max. length: 11

data.adjustments*array

The inventory that is adjusted

data.adjustments[]object

Additional properties: Yes

data.adjustments[].itemReference*object

The reference to the item for the inventory adjustment

Additional properties: Yes

data.adjustments[].itemReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].itemReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].quantityobject

Either this, the value adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].quantity.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].quantity.serialNumberstring

Either this or the lot number should be defined

data.adjustments[].quantity.lotNumberstring

Either this or the serial number should be defined

data.adjustments[].quantity.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].quantity.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].quantity.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].valueobject

Either this, the quantity adjustment, the serial number adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].value.newQuantitynumber

Either this or the quantity difference should be defined

data.adjustments[].value.quantityDifferencenumber

Either this or the quantity difference should be defined

data.adjustments[].value.newValuenumber

Either this or the value difference should be defined

data.adjustments[].value.valueDifferencenumber

Either this or the new value should be defined

data.adjustments[].serialNumberobject

Either this, the quantity adjustment, the value adjustment, or the lot number adjustment should be defined

Additional properties: Yes

data.adjustments[].serialNumber.addSerialNumberstring
data.adjustments[].serialNumber.removeSerialNumberstring
data.adjustments[].serialNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].serialNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].serialNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.adjustments[].lotNumberobject

Either this, the quantity adjustment, the value adjustment, or the serial number adjustment should be defined

Additional properties: Yes

data.adjustments[].lotNumber.lotNumberstring
data.adjustments[].lotNumber.countAdjustmentinteger
data.adjustments[].lotNumber.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.adjustments[].lotNumber.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.adjustments[].lotNumber.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.siteLocationReferenceobject

The site where the inventory is adjusted

Additional properties: Yes

data.siteLocationReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.siteLocationReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.customerReferenceobject

The customer for the inventory adjustment

Additional properties: Yes

data.customerReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.customerReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.classReferenceobject

The accounting class for the inventory adjustment

Additional properties: Yes

data.classReference.listIdstring

The ID of the object. Either this, the name, or both should be defined.

data.classReference.namestring

The full name of the object. Either this, the list ID, or both should be defined.

data.memostring
data.externalGuidstring

The unique identifier that is reference from an external system

request*object

The transaction request is the request object for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

Additional properties: Yes

request.instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

request.callbackUrlstring

The callbackUrl is the HTTP endpoint where the response should go. For requests that have a callback URL, QBD Connect will send the request to QuickBooks Desktop, receive the response, and then send the response to the HTTP endpoint either encrypted or unencrypted. Encryption is the responsibility of the client. By default, if this property is not included, the response is saved for 24 hours for the client to request the response via an API request to /requests/{requestId}?instanceId=<instanceId>&action=<action>.

NOTE: Only include this property if the response should be delivered via HTTP(S)

Secure Communication

As state above, the callback can either be encrypted or plain-text. It is strongly suggested that the callback is to an encrypted (HTTPS) endpoint. It is also suggested that the request ID is verified on the response for the request that was sent. For example, if a request is made for an inventory adjustment, the client should save the request ID and then verify that the response has the appropriate instance ID, action (InventoryAdjustmentAdd, in this case), and request ID.

Examples

adjustSingleItem

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-24",
        "referenceNumber": "20210924002",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 50
                }
            }
        ],
        "memo": "This is a test inventory adjustment: #4"
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

adjustTwoItems

{
    "data": {
        "accountReference": {
            "name": "Work Horse Inventory"
        },
        "transactionDate": "2021-09-20",
        "referenceNumber": "111-222-111",
        "adjustments": [

            {
                "itemReference": {
                    "name": "test-item-1"
                },
                "quantity": {
                    "quantityDifference": 20
                }
            },

            {
                "itemReference": {
                    "name": "test-item-2"
                },
                "quantity": {
                    "quantityDifference": 5
                }
            }
        ]
    },
    "request": {
        "instanceId": "abcdefgh12345678"
    }
}

Type Response (object)

Transaction Response

The transaction response is the return value for the Accounting API request. All of the requests are pseudo-asynchronous. A call is made to request data from or perform actions against a QuickBooks Desktop instance. Each of these requests are queued for processing. QBD Connect processes the requests and then either sends the data back to the client synchronously with a callback URL or saves the data to be queried later. This object is used to query for the response data.

The request data tells QBD Connect how to route and process the data. This object is required for submitting the request, but will optionally be on the response depending upon whether the response returns a list of objects or a single object. If the response returns a list, the requestData object will be at the end of the list, not on the individual objects.

Additional properties: Yes

Inherits: object

Model

ParameterTypeDescription
instanceId*string

This is the instance ID for the QBDC instance. Each QuickBooks Web Connector application gets a dedicated QBDC instance. In order to query the Accounting API properly for responses, the instance ID is required.

action*string

The action is the QBXML action, but the QBXML object. It is also required to properly query for the response.

requestId*string

The request ID is a generated UUID when the request was created.