If your backend is not in Node.js, you can use the REST API that powers our Node.js library to send requests to QuickBooks Desktop. To do so, we strongly recommend following the guide below to set up Node.js and TypeScript locally to test Conductor, and enable verbose logging to see the REST API request format, which you can then copy and paste to your backend. This approach enables you to easily determine the APIs and parameters you need by leveraging the client library’s type-safety, autocomplete, and inline docs.

Skip to Step 10 below to see the REST API request format.

We are actively working on a complete rewrite of our REST API for QuickBooks Desktop that is much more powerful and much simpler. Available August 2024.

In the meantime, use the approach documented below, which will be backward-compatible and easily adaptable to the new REST API when it is released.

Check out this Python example for creating an invoice in QuickBooks Desktop using Conductor’s REST API.

Build your REST API requests with Node.js locally and Conductor

This guide will show you how to easily generate the REST API request format for QuickBooks Desktop using Node.js and Conductor in your local environment. You can then replicate the REST API request format in your backend.

1

Install Node.js locally if you do not have it already

If you are on a Mac:

brew install node
2

Create a new directory

mkdir conductor-test
cd conductor-test
3

Initialize a new Node.js project

npm init -y
4

Install TypeScript and Conductor's Node.js library

npm install conductor-node typescript @types/node
5

Create a new TypeScript file

touch index.ts
6

Follow our quickstart guide if you haven't yet

If you haven’t already, follow our quickstart guide to create an EndUser with an authorized connection to a QuickBooks Desktop instance.

7

Add the following code to your `index.ts` file

import Conductor from "conductor-node";

const conductor = new Conductor("{{YOUR_SECRET_KEY}}", {
  // ❗ Enable logging to see the REST API request format.
  verbose: true,
});

async function main() {
  // ❗ Replace `{{END_USER_ID}}` below with the ID of the EndUser
  // you created in the Quickstart guide.
  const invoices = await conductor.qbd.invoice.query("{{END_USER_ID}}", {
    IncludeLineItems: true,
    MaxReturned: 5,
  });
};

main();
8

Run the code

npx ts-node index.ts
9

Review the output

You will see the complete REST API request format in the output. For example:

Conductor request: {
  method: 'POST',
  url: 'https://api.conductor.is/v1/end_users/{{END_USER_ID}}/request/quickbooks_desktop',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer sk_live_************',
  },
  body: {
    InvoiceQueryRq: {
      IncludeLineItems: true,
      MaxReturned: 3
    }
  }
}
10

Replicate the REST API request format in your backend

For example, with curl:

curl -X POST https://api.conductor.is/v1/end_users/{{END_USER_ID}}/request/quickbooks_desktop \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{YOUR_SECRET_KEY}}" \
  -d '{
    "InvoiceQueryRq": {
      "IncludeLineItems": true,
      "MaxReturned": 3
    }
  }'