QuickBooks_API OOP Interface to QuickBooks

The API is experimental right now, and many of the API methods do not work yet.

That said, if you want to try it out, have at it, and if you have problems post them on the forums (http://www.consolibyte.com/forum/) and we'll do our best to get them fixed in a timely manner.

PLEASE NOTE: USE SHOULD DOWNLOAD THE LATEST NIGHTLY BUILD OF THE QuickBooks PHP DevKit BEFORE PERFORMING ANY OF THESE CODE SAMPLES. YOU CAN DO THAT HERE:

https://code.intuit.com/sf/frs/do/viewRelease/projects.php_devkit/frs.php_devkit.latest_sources

What Is This?

The QuickBooks_API classes are a two-part effort towards simplifying communication with multiple QuickBooks versions. The goals of the QuickBooks_API and QuickBooks_Object_* classes are two-fold:

  1. Create an easy to use object-oriented interface to QuickBooks using PHP.
  1. Allow that interface to communicate with either QuickBooks desktop editions or QuickBooks Online with few or no changes.

Using the QuickBooks_API classes with QuickBooks Online Edition

Please see:

  • docs/example_online_edition.php

Using the QuickBooks_API classes with the Web Connector

Please see:

  • docs/example_api_client.php
  • docs/example_api_client_canadian.php
  • docs/example_api_server.php

There are two components required to use the API: - The QuickBooks_API client $client = new QuickBooks_API(…); $client→addCustomer(…); - The QuickBooks_Server_API server $server = new QuickBooks_Server_API(…); $server→handle();

Before you begin using the API client, you should set up your API server as shown in the docs/example_api_server.php file. *YOU CANNOT USE THE REGULAR QUICKBOOKS SERVER ($server = new QuickBooks_Server(…)) WITH THE API CLIENT*. You *MUST* use the API server ($server = new QuickBooks_Server_API(…);)

In addition, *YOU CANNOT USER THE SAME USERNAME FOR BOTH A REGULAR QUICKBOOKS SERVER AND A QUICKBOOKS API SERVER*. Create two users with QuickBooks_Utilities::createUser(…) and use each with their own username if you want to use both servers.

Code Examples

Some of the examples here can also be found in the example php files indicated above. Please remember you must have established a connection to QuickBooks before performing these operations.

Get Customer By Name

Display Customer Information

quickbooks_integration_php_consolibyte_api.txt · Last modified: 2013/01/21 12:44 (external edit)