2. Command Reference¶
2.1. activate¶
Purpose: Activates the specified record.
Supported records: account, customer, employee, vendor
The activate command can be used to re-activate an record after it was previously inactivated with a inactivate command or from the QuickBooks Online user interface.
The following example demonstrates activating customer id 1:
PS c:\cliqo> .\cliqo activate customer 1
Customer active with id 1
2.2. company¶
Purpose: Commands for authorizing, refreshing, and displaying information about your QuickBooks company
Supported subcommands: connect, disconnect, refresh, switch, userinfo
2.2.1. connect¶
The connect command is used to grant cliqo access to a company’s QuickBooks Online account. It is run automatically as part of the quicksetup command but may be run manually in case it is necessary to reauthorize or to connect to additional companies.
This command will launch a web-browser and request to login at intuit.quickbooks.com via their standard OAUTH flow. Once connected, you should not need to connect again for another 100 days based on Intuit OAUTH policy.
cliqo requests authorization to your QuickBooks online company and stores the credentials locally in a JSON file named <YourCompanyId>.json We do not store these credentials on our server.
2.2.2. disconnect¶
The disconnect command is currently not implemented. If you wish to disconnect your QuickBooks company from cliqo, please use the web interface
2.2.3. refresh¶
Intuit requires that your authorization be refreshed every 60 minutes. This is normally done automatically for you based on the last_refresh_time in the company configuration file.
2.2.4. switch¶
If you have multiple QuickBooks companies connected to cliqo, the switch command allows to to rapidly switch between them. Each company is defined by a configuration file whose name is <your-company-id>.json. For example, you might have two company configuration files like this:
- 193514613747744.json - company configuration file for Alpha Landscaping
- 4620816365041472820.json<BR> - Company configuration file for Bravo Landscaping
It is not necessary to supply the complete company identifier in order to switch between companies. You can specify a minimum number of unique numbers of your company identifier. For example, the command to switch to Bravo Landscaping would be:
$ cliqo company switch 4
And to switch back to Alpha landscaping:
$ cliqo company switch 1
2.2.5. userinfo¶
This command will list general information about the user who granted access to your company.
2.3. delete¶
Purpose: Deletes the specified record.
Supported records: bill, creditmemo, estimate, invoice, payment, purchaseorder, refundreceipt, salesreceipt, timeactivity, transfer, vendorcredit
See also: inactivate, void
The delete command can be used to delete an record. The following example demonstrates deleting customer id
PS c:\cliqo> .\cliqo delete invoice 164
Invoice Deleted with id 164
2.4. edit¶
Purpose: Updates the record with the specified id using the JSON supplied as a string or filename.
Supported records: all - account, bill, creditmemo, customer, employee, estimate, invoice, journalentry, payment, purchasorder, refundreceipt, salesreceipt, timeactivity, transfer, vendor, vendorcredit
The following example demonstrates how to update a customer’s billing address:
PS c:\cliqo> .\cliqo edit customer 1 edit_customer.json
Customer edited with id 1
And here’s the edit_customer.json supplied to the new command above:
{
"BillAddr": {
"City": "Bayside",
"Line1": "101 Ocean View",
"Line2": "Suite 400",
"Line3": "",
"Line4": "",
"Line5": "",
"PostalCode": "11360"
}
}
In order to create your JSON input for the edit command, we recommend first creating a sample of your new record using the QuickBooks Online web interface. then use the get command to show the JSON, as follows:
PS c:\cliqo> .\cliqo --format=json --fields=all get customer 1
{
"Active": true,
"Balance": 1086.0,
"BalanceWithJobs": 1086.0,
"BillAddr": {
"City": "Bayside",
"Country": "",
"CountrySubDivisionCode": "",
"Id": "99",
"Lat": "",
"Line1": "101 Ocean View",
"Line2": "Suite 400",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "11360"
},
"BillWithParent": false,
"CompanyName": "Amy's Bird Sanctuary",
"CurrencyRef": {
"name": "United States Dollar",
"type": "",
"value": "USD"
},
"DefaultTaxCodeRef": {
"name": "",
"type": "",
"value": "2"
},
"DisplayName": "Amy's Bird Sanctuary",
"FamilyName": "Lauterbach",
"FullyQualifiedName": "Amy's Bird Sanctuary",
"GivenName": "Amy",
"Id": "1",
"Job": false,
"Level": 0,
"MetaData": {
"CreateTime": "2017-08-30T16:48:43-07:00",
"LastUpdatedTime": "2021-03-04T11:02:44-08:00"
},
"MiddleName": "",
"Notes": "",
"OpenBalanceDate": "",
"PreferredDeliveryMethod": "Print",
"PrimaryEmailAddr": {
"Address": "Birds@Intuit.com"
},
"PrimaryPhone": {
"FreeFormNumber": "(650) 555-3311"
},
"PrimaryTaxIdentifier": "",
"PrintOnCheckName": "Amy's Bird Sanctuary",
"ResaleNum": "",
"ShipAddr": {
"City": "Bayshore",
"Country": "",
"CountrySubDivisionCode": "CA",
"Id": "97",
"Lat": "",
"Line1": "4581 Finch St.",
"Line2": "",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "94326"
},
"Suffix": "",
"SyncToken": "3",
"Taxable": true,
"Title": "",
"domain": "QBO",
"sparse": false
}
2.5. get¶
Purpose: Retrieves the record with the specified id.
Supported records: all - account, bill, creditmemo, customer, employee, estimate, invoice, journalentry, payment, purchasorder, refundreceipt, salesreceipt, timeactivity, transfer, vendor, vendorcredit
The following example demonstrates retrieving customer with id 1:
PS c:\cliqo> .\cliqo get customer 1 1 Amy's Bird Sanctuary 1086.0
By default, cliqo lists only essential fields in tab separated format. Here’s the same example with output as JSON:
PS c:\cliqo> .\cliqo --format=json get customer 1
{"Id": "1", "FullyQualifiedName": "Amy's Bird Sanctuary", "Balance": 1086.0}
And here’s the JSON output with all fields enabled:
PS c:\cliqo> .\cliqo --format=json --fields=all get customer 1
{
"Active": true,
"Balance": 1086.0,
"BalanceWithJobs": 1086.0,
"BillAddr": {
"City": "Bayside",
"Country": "",
"CountrySubDivisionCode": "",
"Id": "99",
"Lat": "",
"Line1": "101 Ocean View",
"Line2": "Suite 400",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "11360"
},
"BillWithParent": false,
"CompanyName": "Amy's Bird Sanctuary",
"CurrencyRef": {
"name": "United States Dollar",
"type": "",
"value": "USD"
},
"DefaultTaxCodeRef": {
"name": "",
"type": "",
"value": "2"
},
"DisplayName": "Amy's Bird Sanctuary",
"FamilyName": "Lauterbach",
"FullyQualifiedName": "Amy's Bird Sanctuary",
"GivenName": "Amy",
"Id": "1",
"Job": false,
"Level": 0,
"MetaData": {
"CreateTime": "2017-08-30T16:48:43-07:00",
"LastUpdatedTime": "2021-03-04T11:02:44-08:00"
},
"MiddleName": "",
"Notes": "",
"OpenBalanceDate": "",
"PreferredDeliveryMethod": "Print",
"PrimaryEmailAddr": {
"Address": "Birds@Intuit.com"
},
"PrimaryPhone": {
"FreeFormNumber": "(650) 555-3311"
},
"PrimaryTaxIdentifier": "",
"PrintOnCheckName": "Amy's Bird Sanctuary",
"ResaleNum": "",
"ShipAddr": {
"City": "Bayshore",
"Country": "",
"CountrySubDivisionCode": "CA",
"Id": "97",
"Lat": "",
"Line1": "4581 Finch St.",
"Line2": "",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "94326"
},
"Suffix": "",
"SyncToken": "3",
"Taxable": true,
"Title": "",
"domain": "QBO",
"sparse": false
}
See the –fields and –format options for more information
2.6. inactivate¶
Purpose: inactivates the record with the specified id by setting the Active field to False
Supported records: account, customer, employee, vendor
The inactivate command can be used to mark inactive the specified record. It is used in cases where QuickBooks Online does not allow delete.de-activate an record after it was previously inactivated with a inactivate command or from the QuickBooks Online user interface.
2.7. new¶
Purpose: Create a new record of the specified type.
Supported records: all - account, bill, creditmemo, customer, employee, estimate, invoice, journalentry, payment, purchasorder, refundreceipt, salesreceipt, timeactivity, transfer, vendor, vendorcredit
The following example demonstrates how to create a new invoice:
PS c:\cliqo> .\cliqo new invoice new_invoice.json
Invoice created with id 171
And here’s the new_invoice.json supplied to the new command above:
{
"CustomerRef": {
"name": "Amy's Bird Sanctuary",
"type": "",
"value": "1"
},
"Line": [
{
"Amount": 100.0,
"Description": "Weekly Gardening Service",
"DetailType": "SalesItemLineDetail",
"Id": "1",
"LineNum": 1,
"SalesItemLineDetail": {
"ItemRef": {
"name": "Gardening",
"type": "",
"value": "6"
},
"Qty": 4,
"ServiceDate": "",
"TaxCodeRef": {
"name": "",
"type": "",
"value": "TAX"
},
"TaxInclusiveAmt": 0,
"UnitPrice": 25
}
}
]
}
It is not necessary to specify every key/value pair for the new record. In order to create your JSON input for the new command, we recommend first creating a sample of your new record using the QuickBooks Online web interface. then use the get command to show the JSON, as follows:
PS c:\cliqo> .\cliqo --format=json --fields=all get customer 1
{
"Active": true,
"Balance": 1086.0,
"BalanceWithJobs": 1086.0,
"BillAddr": {
"City": "Bayside",
"Country": "",
"CountrySubDivisionCode": "",
"Id": "99",
"Lat": "",
"Line1": "101 Ocean View",
"Line2": "Suite 400",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "11360"
},
"BillWithParent": false,
"CompanyName": "Amy's Bird Sanctuary",
"CurrencyRef": {
"name": "United States Dollar",
"type": "",
"value": "USD"
},
"DefaultTaxCodeRef": {
"name": "",
"type": "",
"value": "2"
},
"DisplayName": "Amy's Bird Sanctuary",
"FamilyName": "Lauterbach",
"FullyQualifiedName": "Amy's Bird Sanctuary",
"GivenName": "Amy",
"Id": "1",
"Job": false,
"Level": 0,
"MetaData": {
"CreateTime": "2017-08-30T16:48:43-07:00",
"LastUpdatedTime": "2021-03-04T11:02:44-08:00"
},
"MiddleName": "",
"Notes": "",
"OpenBalanceDate": "",
"PreferredDeliveryMethod": "Print",
"PrimaryEmailAddr": {
"Address": "Birds@Intuit.com"
},
"PrimaryPhone": {
"FreeFormNumber": "(650) 555-3311"
},
"PrimaryTaxIdentifier": "",
"PrintOnCheckName": "Amy's Bird Sanctuary",
"ResaleNum": "",
"ShipAddr": {
"City": "Bayshore",
"Country": "",
"CountrySubDivisionCode": "CA",
"Id": "97",
"Lat": "",
"Line1": "4581 Finch St.",
"Line2": "",
"Line3": "",
"Line4": "",
"Line5": "",
"Long": "",
"Note": "",
"PostalCode": "94326"
},
"Suffix": "",
"SyncToken": "3",
"Taxable": true,
"Title": "",
"domain": "QBO",
"sparse": false
}
2.8. print¶
Purpose: Downloads a PDF for the specified record id
Supported records: bill, creditmemo, estimate, invoice, purchaseorder, refundreceipt, salesreceipt, vendorcredit
The following example demonstrates how to download invoice with id 103.
PS c:\cliqo> .\cliqo print invoice 103 invoice_103.pdf
Invoice printed with id 103 to invoice_103.pdf
Note: the id is not the same as the invoice number. To get the Id for a given invoice number (DocNumber), perform a select query like this:
PS c:\cliqo> .\cliqo select invoice --where "DocNumber = '1033'" 103 Geeta Kalapatapu 629.1
2.9. select¶
Purpose: Retrieves a list of records using a query, optionally limited by various parameters.
Supported records: all - account, bill, creditmemo, customer, employee, estimate, invoice, journalentry, payment, purchasorder, refundreceipt, salesreceipt, timeactivity, transfer, vendor, vendorcredit
Parameters include: * –order is the field to sort on and can include optional asc for ascending or desc for descending * max is the maximum number of records to return; defaults to 25 * –start* is the starting row to begin results * where is a quoted string specifying a condition to match listed records
The following example selects a list of all customers with a balance greater than $1,000:.00.:
PS c:\cliqo> .\cliqo select customer --where "Balance > '600.00'" 1 Amy's Bird Sanctuary 1086.0 10 Geeta Kalapatapu 629.1 18 Paulsen Medical Supplies 954.75
See also the –fields and –format options.
2.10. void¶
Purpose: Marks as void the record with the specified id QuickBooks Online achieves this by zeroing out line items and totals and indicating the records void status with the “PrivateNote” field set to “Voided.”
Supported records: bill, creditmemo, estimate, invoice, journalentry, payment, purchaseorder, refundreceipt, salesreceipt, vendorcredit
The following example shows voiding an invoice with the specified id:
PS c:\cliqo> .\cliqo void invoice 171
Invoice Voided with id 171