Tags: 
API, QuickBooks

Overview

These public interfaces are used in QuickBooks components. They are provided for implementing advanced functionality in your scripts. In order for you to use these interfaces in your project, you have to reference CozyRoc.SSISPlus.dll and CozyRoc.Intuit.dll libraries. Also include CozyRoc.SqlServer.SSIS and CozyRoc.Intuit.QuickBooks namespaces.


IConnection / IQbConnection

When you call QuickBooks Connection Manager AcquireConnection method, it returns object implementing IConnection interface. This is the interface used for interaction with QuickBooks service.

Methods

Connects to QuickBooks service. The method result is IService object.

Closes the connection to QuickBooks service. Use always after you finish working with the service.

Returns true if connected to the service.

Get IService object.

Gets objects list for specific operation. These are the method parameters:

  • operation (uint) - It can be one of the options listed in the following table.
    Value Description
    0 Return objects, which can be read.
    1 Return objects, which support record creation.
    2 Return objects, which can be updated.
    3 Return objects, which permit record removal.
    4 Return objects, which permit record void.

Gets specified object composite objects list. These are the method parameters:

  • root (string) - object name.
  • operation (uint) - It can be one of the options listed in the following table.
    Value Description
    0 Return objects, which can be read.
    1 Return objects, which support record creation.
    2 Return objects, which can be updated.

Get object used to manage QuickBooks object. The method returns IObject object. These are the method parameters:

  • name (string) - object name.

Properties

Select QuickBooks deployment type. This property has the options listed in the following table.

Value Description
0 QuickBooks Online deployment.
1 QuickBooks deployed on premise (default).

Specify the name or IP address of the QuickBooks service.

Specify login to access the QuickBooks service.

Specify key to access the QuickBooks service.

Specify application identifier to access the QuickBooks service.

Specify the number of seconds before timing out session connect. The default value of this property is 100 seconds.

Specify if all clients should use the same connection. This property has the options listed in the following table.

Value Description
True All clients use same connection (default).
False Every client uses different connection.

Specify the name or IP address of the proxy server.

Specify the port number on the proxy server to use for the connection.

Specify user name to access the proxy server.

Specify password to access the proxy server.


IField / IQbField

This interface is used to retrieve QuickBooks object field information.

Properties

Returns field name.

Returns true if field is object key.

Returns field type.

Returns field length.

Returns field precision.

Returns field scale.


IObject / IQbObject

This interface is used for QuickBooks object management.

Methods

Get object fields. The method returns array of IField objects.

Constructs new in-memory QuickBooks object instance. This property has the options listed in the following table.

Value Description
0 Return instance of result object.
1 Return instance of create object.
2 Return instance of update object.

Sets field value in object instance. These are the method parameters:

  • instance (object) - object instance.
  • field (string) - field name.
  • value (object) - field value.

Returns field value from object instance. These are the method parameters:

  • instance (object) - object instance.
  • field (string) - field name.

Retrieves objects from QuickBooks service. The method returns array of QuickBooks objects. These are the method parameters:

  • query (string) - If data is retrieved from regular QuickBooks object, the query parameter should contain XML string of QuickBooks query. If data is retrieved from composite object, the query parameter should contain object key. Multiple keys are separated with semicolon (;).
  • fields (string array) - list of fields to retrieve.
  • iterator (ref string) - contains current start iteration position. After data is retrieved, the parameter will contain next iteration position.
  • batchSize (int) - number of records to retrieve in one batch.

Creates records in object. The method returns array of IStatus objects for each input object. These are the method parameters:

  • list (object array) - array of QuickBooks objects to create.

Updates existing records in object. The method returns array of IStatus objects for each input object. These are the method parameters:

  • list (object array) - array of QuickBooks objects with update data.

Updates composite object. These are the method parameters:

  • instance (object) - QuickBooks object instance.
  • key (string) - composite object key. Multiple keys are separated with semicolon (;).
  • list (object array) - array of QuickBooks objects with update data.

Deletes records in object. The method returns array of IStatus objects for each input object. These are the method parameters:

  • list (string array) - array of QuickBooks object identifiers to delete.

Voids records in object. The method returns array of IStatus objects for each input object. These are the method parameters:

  • list (string array) - array of QuickBooks object identifiers to void.

Properties

Returns the QuickBooks object name.


IStatus / IQbStatus

This interface is used for reporting back status.

Properties

Returns the QuickBooks object identifier.

Returns the QuickBooks edit sequence identifier.

Returns the QuickBooks error code. If zero, there is no error.

Returns the QuickBooks status message.


IService / IQbService

This interface is used for low-level processing with the QuickBooks service.

Methods

Executes QBXML message. The method returns QBXMLMsgsRs object. These are the method parameters:

  • qbxml (QBXML) - QBXML object.

Methods

Returns the QuickBooks application type. It can be one of the options listed in the following table.

Value Description
Online QuickBooks Online Edition.
US QuickBooks US Edition.
CA QuickBooks Canada Edition.
UK QuickBooks UK Edition.
AU QuickBooks Australia Edition.

Returns the QuickBooks application version.


Related documentation