fmQBO API Reference

API REFERENCE

fmQBO’s API is a set of scripts in the locked fmQBO.fmp12. Each script is documented here. IMPORTANT!  All parameters are passed as JSON unless otherwise noted.

Table Of Contents


fmQBO Send ( json )

This is the script that handles all of the connections to QuickBooks Online. Every time you send data, or ask for data from QuickBooks you will use this script. It takes a JSON object as a parameter. This object will contain several properties that control how the script works.

It should be noted the fmQBODeveloper will create the correct JSON object based on the selections you make in its Requests screen.  Therefor you probably won’t be writing this JSON object yourself.

JSON Properties

email | optional | text | default = last used | the email account associated with the license
licenseString | optional | text | default = last used | fmQBO license
isSandbox | optional | Boolean | default uses what is already set | If not empty, will modify global sandbox state.
path  | optional | text | portion of path after companyId, with or without the leading forward slash. QBO’s QPI Exploerer lists this path as the endpoint to Read a customer:

/company/:companyId/customer/:entityId

In this example, the $path parameter should be as follows:

/customer/:entityId

query  | optional | JSON | query portion of the url: everything after the ? QBO’s QPI Explorer lists this path as the endpoint to Update a customer:

/company/:companyId/customer?operation=update

In this example, the query property should be as follows:

[
 {
  "name": "operation",
  "value": "update"
 }
]
	

method | optional | text | default = “GET” | HTTP Request Method.
request | optional | text | additional data to send with the request. In the case of POST, this is the data that is posted.
headers | optional | JSON name/value pairs | headers to be sent with the request.  These are almost always the same.

[
 {
  "name": "Accept",
  "value": "application/json"
 },
 {
  "name": "Content-Type",
  "value": "application/json"
 }
]
	

allowCompanySelection | optional | Boolean | default = True | If True, and the provided license is not connected to a company in QBO, a browser will open which allows the user to login to QBO and select a company. If False, will return an error in the above scenario.

Returns

A JSON object with the results of the request. The object will contain the following properties.

error | a dictionary containing error data. Will not exist if there is no error.
runtime | number of seconds this script was running (with millisecond precision)
response | value returned by QBO
responseHeader | header returned with the request


fmQBO Connect if Required ( email ; licenseString ; { isSandbox } )

Connects to the QuickBooks API if it hasn’t already in this session. Use this to test if you have a connection setup correctly, before calling fmQBO Send (json).  This will not try to connect if you have already successfully connected to QuickBooks.

JSON Parameter Properties

email | required | text | the email account associated with the license
licenseString | required | text | fmqbo license
isSandbox | optional | Boolean | default uses what is already set | If not empty, will modify global sandbox state.

Returns

A JSON object with the results of the request. The object will contain the following properties.

error | a dictionary containing error data. Will not exist if there is no error.
runtime | number of seconds this script was running (with millisecond precision)
CompanyId |  id of QuickBooks company this license is connected to.
CompanyName | Company Name of QuickBooks company this license is connected to.
isSandbox | bool | if True; the specified company is a sandbox company


fmQBO Test Connection ( email ; licenseString ; { isSandbox } )

Connects to the QuickBooks API even if it has already connected. You can use this to test your connection, or change your default email, licenseString, and isSandBox Settings

JSON Parameter Properties

email | required | text | the email account associated with the license
licenseString | required | text | fmqbo license
isSandbox | optional | Boolean | default uses what is already set | If not empty, will modify global sandbox state.

Returns

A JSON object with the results of the request. The object will contain the following properties.

error | a dictionary containing error data. Will not exist if there is no error.
runtime | number of seconds this script was running (with millisecond precision)
CompanyId |  id of QuickBooks company this license is connected to.
CompanyName | Company Name of QuickBooks company this license is connected to.
isSandbox | bool | if True; the specified company is a sandbox company


fmQBO Get Sandbox State

Get the current state of the sandbox setting in fmQBO.

Parameters

none

Returns

A single boolean value. If true then the Sandbox is enabled.

Still need help? Contact Us Contact Us