Set up and test queries in Postman

Besides the sandbox environment tied to your developer account, you can use Postman to test REST API production code and endpoints.

Already using Postman? Simply download a QuickBooks-specific collection and set up your testing environment. If you need testing tools, Postman may be a great option - and we’ve got everything you need to get up and running.

Note: Only use Postman for testing and prototyping API requests. Use a QuickBooks Online Accounting API SDK for production code.
Step 1: Set up your app in the Developer Portal

If you haven’t already, sign in to your developer account and create your app.

Step 2: Get Postman

Download and install Postman.

Step 3: Get a Postman collection

Download one of the Postman collections. Collections give you sets of pre-built requests to test with. All collections use OAuth 2.0.

For QuickBooks Online Accounting API: Get a collection of individual resource endpoints
For QuickBooks Online Accounting: Get an orchestrated collection based around specific use cases
For Payments API: Get a collection of individual resource endpoints and an orchestrated collection based around specific use cases
Step 4: Use collections in Postman

In Postman, go to the Collections menu any time to see the types of sample requests you can make.

Step 5: Set the redirect URI in the Developer Portal

Postman needs your app’s authorization keys to generate access tokens and connect to the QuickBooks Online API:

  1. Sign in to your Intuit Developer Account.
  2. Select the Dashboard link in the toolbar.
  3. Select and open your app.
  4. In the Development section, select Keys & OAuth.
  5. Copy your app’s Client ID and Client Secret.

Before you leave the Keys & OAuth page, also set the redirect URI:

  1. Go to the Redirect URIs section.
  2. Select Add URI.
  3. Enter https://www.getpostman.com/oauth2/callback.
Step 6: Configure your testing environment in Postman
  1. In Postman, select the Collections menu.
  2. Select a folder and endpoint you want to test.
  3. Select the Authorization tab.
  4. In the Type dropdown, select OAuth 2.0.
  5. In the Add authorization data dropdown, select Request Headers.
  6. Expand the Configure New Access Token section.

Enter the following in each field as needed:

Data field What to enter
Token Name A name for the token. Token names appear in the Existing Tokens list when you test requests.
Grant Type Select Authorization Code
Callback URL https://www.getpostman.com/oauth2/callback
Auth URL https://appcenter.intuit.com/connect/oauth2
Access Token URL https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer
Client ID and Client Secret Enter your app’s Client ID and Client Secret.
Scope

For the QuickBooks Online Accounting API: com.intuit.quickbooks.accounting

For the QuickBooks Payments: com.intuit.quickbooks.payment

State You can enter any useful info about your app. The Intuit Authorization Server round trips this parameter. Your app gets the same value it requested back in the response.
Client Authentication Set to Send client credentials in body

When you’re done, select Get new access token. You may need to sign in and connect your Intuit Developer Account to Postman.

Tip: You can also follow the authorization steps from Postman.
Step 7: Update the test environment

The collections you downloaded give you environment templates. Add a few details about your sandbox test company:

  1. Get the company ID for your sandbox test company.
  2. In Postman, go to the Environments menu.
  3. Select an environment template.

Enter the following for each field as needed:

Data field What to enter
baseurl sandbox-quickbooks.api.intuit.com
companyid Your sandbox test company’s company ID
minorversion The minor version for your app
UserAgent QBOV3-OAuth2-Postman-Collection
Step 8: Generate tokens and send a test query

Everything is ready to start testing. You should have an authorization token after you set up. Tokens are valid for 60 minutes.


Refresh a token
  1. Open a collection and folder. Then select an endpoint.
  2. Go to the Authorization tab.
  3. Select an available token, or Get New Access Token.

Create a test request
  1. Open a collection and folder. Then select an endpoint.
  2. Review the request in the Body tab.
  3. Select Send.

You’ll see the server response in the Body tab.