2. Command Reference

2.1. activate

Purpose: Activates the specified entity.

Supported entities: account, customer, employee, vendor

The activate command can be used to re-activate an entity 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: authorize, userinfo, refresh

2.2.1. authorize

The authorize 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.

This command will launch a web-browser and request to login at intuit.quickbooks.com via their standard OAUTH flow. Once authorized, you should typically not need to authorize 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. 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.3. userinfo

This command will list general information about the user who granted access to your company.

2.3. delete

Purpose: Deletes the specified entity.

Supported entities: bill, creditmemo, estimate, invoice, payment, purchaseorder, refundreceipt, salesreceipt, timeactivity, transfer, vendorcredit

See also: inactivate, void

The delete command can be used to delete an entity. The following example demonstrates deleting customer id

PS c:\cliqo> cliqo delete invoice 161
Invoice Deleted with id 161

2.4. edit

Purpose: Updates the entity with the specified id using the JSON supplied as a string or filename.

Supported entities: 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 entity using the Quickbooks Online app then using the get command to show the JSON, as follows:

PS c:\cliqo> cliqo --format=json --fields=all get customer 1
{
    "Active": true,
    "Balance": 886.0,
    "BalanceWithJobs": 886.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-01-07T14:27:28-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 entity with the specified id.

Supported entities: 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    886.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": 886.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": 886.0,
    "BalanceWithJobs": 886.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-01-07T14:27:28-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 entity with the specified id by setting the Active column to False

Supported entities: account, customer, employee, vendor

The inactivate command can be used to mark inactive the specified entity. It is used in cases where QuickBooks Online does not allow delete.de-activate an entity after it was previously inactivated with a inactivate command or from the Quickbooks Online user interface.

2.7. new

Purpose: Create a new entity of the specified type.

Supported entities: 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 161

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 entity. In order to create your JSON input for the new command, we recommend first creating a sample of your new entity using the Quickbooks Online app then using the get command to show the JSON, as follows:

PS c:\cliqo> cliqo --format=json --fields=all get customer 1
{
    "Active": true,
    "Balance": 886.0,
    "BalanceWithJobs": 886.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-01-07T14:27:28-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 entity id

Supported entities: 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 invoice number (DocNumber) for invoice with id 103, 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 entities using a query, optionally limited by various parameters.

Supported entities: all - account, bill, creditmemo, customer, employee, estimate, invoice, journalentry, payment, purchasorder, refundreceipt, salesreceipt, timeactivity, transfer, vendor, vendorcredit

Parameters include: * –order is the column 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    886.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 entity with the specified id Quickbooks Online achieves this by zeroing out line items and totals and indicating the entities void status with the “PrivateNote” field set to “Voided.”

Supported entities: 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 159
Invoice Voided with id 159