# Operations (sample payloads)

## Main operations

### Create account

Create an account.
**Sample Input**
**Sample Output**

### Create bill

Create a bill.
**Sample Input**
**Sample Output**

```json
{
    "Bill": {
        "DueDate": "2023-07-15",
        "Balance": 350,
        "domain": "QBO",
        "sparse": false,
        "Id": "1234",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-06-15T14:30:25-07:00",
            "LastUpdatedTime": "2023-06-15T14:30:25-07:00"
        \},
        "TxnDate": "2023-06-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "Line": [
            {
                "Id": "1",
                "LineNum": 1,
                "Amount": 250,
                "DetailType": "AccountBasedExpenseLineDetail",
                "AccountBasedExpenseLineDetail": {
                    "AccountRef": \{
                        "value": "72",
                        "name": "Office Supplies Expense"
                    \},
                    "BillableStatus": "NotBillable",
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            },
            {
                "Id": "2",
                "LineNum": 2,
                "Amount": 100,
                "DetailType": "AccountBasedExpenseLineDetail",
                "AccountBasedExpenseLineDetail": {
                    "AccountRef": \{
                        "value": "73",
                        "name": "Postage Expense"
                    \},
                    "BillableStatus": "Billable",
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            }
        ],
        "VendorRef": \{
            "value": "56",
            "name": "ABC Office Supplies"
        \},
        "APAccountRef": \{
            "value": "33",
            "name": "Accounts Payable"
        \},
        "TotalAmt": 350
    },
    "time": "2023-06-15T14:30:25-07:00"
}
```

### Create customer

Create a customer.
**Sample Input**
**Sample Output**

```json
{
    "Customer": {
        "Id": "68",
        "DisplayName": "John Doe",
        "PrintOnCheckName": "John Doe",
        "GivenName": "John",
        "FamilyName": "Doe",
        "FullyQualifiedName": "John Doe",
        "CompanyName": "Doe Enterprises",
        "Taxable": true,
        "BillAddr": \{
            "Id": "69",
            "Line1": "123 Main St",
            "City": "Anytown",
            "Country": "USA",
            "PostalCode": "12345"
        \},
        "Job": false,
        "BillWithParent": false,
        "Level": 0,
        "Balance": 0,
        "BalanceWithJobs": 0,
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "PreferredDeliveryMethod": "Email",
        "domain": "QBO",
        "sparse": false,
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-04-15T10:30:00-07:00",
            "LastUpdatedTime": "2023-04-15T10:30:00-07:00"
        \},
        "Active": true,
        "PrimaryPhone": {
            "FreeFormNumber": "555-123-4567"
        },
        "PrimaryEmailAddr": {
            "Address": "john.doe@example.com"
        },
        "DefaultTaxCodeRef": {
            "value": "TAX"
        }
    },
    "time": "2023-04-15T10:30:00.123-07:00"
}
```

### Create employee

Create an employee.
**Sample Input**
**Sample Output**

### Create invoice

Create an invoice.
**Sample Input**
**Sample Output**

### Create purchase

Create a purchase.
**Sample Input**
**Sample Output**

```json
{
    "Purchase": {
        "AccountRef": \{
            "value": "35",
            "name": "Checking Account"
        \},
        "PaymentType": "Check",
        "Credit": false,
        "TotalAmt": 325.5,
        "domain": "QBO",
        "sparse": false,
        "Id": "1234",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-04-15T14:30:25-07:00",
            "LastUpdatedTime": "2023-04-15T14:30:25-07:00"
        \},
        "TxnDate": "2023-04-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "Line": [
            {
                "Id": "1",
                "Amount": 250,
                "DetailType": "AccountBasedExpenseLineDetail",
                "AccountBasedExpenseLineDetail": {
                    "AccountRef": \{
                        "value": "52",
                        "name": "Office Supplies"
                    \},
                    "BillableStatus": "NotBillable"
                }
            },
            {
                "Id": "2",
                "Amount": 75.5,
                "DetailType": "AccountBasedExpenseLineDetail",
                "AccountBasedExpenseLineDetail": {
                    "AccountRef": \{
                        "value": "54",
                        "name": "Utilities"
                    \},
                    "BillableStatus": "None"
                }
            }
        ]
    },
    "time": "2023-04-15T14:30:25-07:00"
}
```

### Create time activity

Create a time activity
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "123456789",
    "name_of": \{
        "employee_id": "55",
        "name": "John Doe"
    \},
    "time": {
        "start_time": \{
            "hour": "09",
            "minute": "00"
        \},
        "end_time": \{
            "hour": "17",
            "minute": "30"
        \}
    },
    "break_hours": 1,
    "break_minutes": 0,
    "billable_status": \{
        "taxable": true,
        "hourly_rate": 75.5
    \},
    "txn_date": "2023-05-15T00:00:00Z",
    "description": "Project development and client meeting",
    "customer_ref": \{
        "value": "68",
        "name": "Acme Corp"
    \},
    "item_ref": \{
        "value": "37",
        "name": "Software Development"
    \},
    "class_ref": \{
        "value": "42",
        "name": "IT Department"
    \},
    "department_ref": \{
        "value": "15",
        "name": "Engineering"
    \}
}
```

**Sample Output**

```json
{
    "TimeActivity": {
        "TxnDate": "2023-05-15",
        "NameOf": "Employee",
        "EmployeeRef": \{
            "value": "55",
            "name": "John Doe"
        \},
        "CustomerRef": \{
            "value": "68",
            "name": "Acme Corp"
        \},
        "ItemRef": \{
            "value": "37",
            "name": "Software Development"
        \},
        "DepartmentRef": \{
            "value": "15",
            "name": "Engineering"
        \},
        "ClassRef": \{
            "value": "42",
            "name": "IT Department"
        \},
        "BillableStatus": "Billable",
        "Taxable": true,
        "HourlyRate": 75.5,
        "BreakHours": 1,
        "BreakMinutes": 0,
        "StartTime": "2023-05-15T09:00:00-07:00",
        "EndTime": "2023-05-15T17:30:00-07:00",
        "Description": "Project development and client meeting",
        "domain": "QBO",
        "sparse": false,
        "Id": "123",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-05-15T18:00:00-07:00",
            "LastUpdatedTime": "2023-05-15T18:00:00-07:00"
        \}
    },
    "time": "2023-05-15T18:00:00.000Z"
}
```

### Create vendor

Create a vendor
**Sample Input**
**Sample Output**

### Delete purchase

Delete a purchase.
**Sample Input**
**Sample Output**

```json
{
    "Purchase": \{
        "domain": "QBO",
        "status": "Deleted",
        "Id": "123",
        "CustomField": []
    \},
    "time": "2023-04-15T14:30:45.123Z"
}
```

### Delete time activity

Delete a Time Activity.
**Sample Input**
**Sample Output**

### Delete transfer

Delete a transfer.
**Sample Input**
**Sample Output**

```json
{
    "Transfer": \{
        "domain": "QBO",
        "status": "Deleted",
        "Id": "TR-123456"
    \},
    "time": "2023-06-15T14:30:45Z"
}
```

### Get account

Get account details by ID.
**Sample Input**

```json
\{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "account_id": "75"
\}
```

**Sample Output**

### Get bill

Get bill details by ID.
**Sample Input**
**Sample Output**

```json
{
    "Bill": {
        "DueDate": "2023-06-30",
        "Balance": 500,
        "domain": "QBO",
        "sparse": false,
        "Id": "123",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-05-15T09:00:00-07:00",
            "LastUpdatedTime": "2023-05-15T09:00:00-07:00"
        \},
        "TxnDate": "2023-05-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "Line": [
            {
                "Id": "1",
                "LineNum": 1,
                "Description": "Office Supplies",
                "Amount": 250,
                "DetailType": "ItemBasedExpenseLineDetail",
                "ItemBasedExpenseLineDetail": {
                    "BillableStatus": "NotBillable",
                    "ItemRef": \{
                        "value": "5",
                        "name": "Office Supplies"
                    \},
                    "UnitPrice": 25,
                    "Qty": 10,
                    "TaxCodeRef": {
                        "value": "TAX"
                    }
                }
            },
            {
                "Id": "2",
                "LineNum": 2,
                "Description": "Cleaning Services",
                "Amount": 250,
                "DetailType": "ItemBasedExpenseLineDetail",
                "ItemBasedExpenseLineDetail": {
                    "BillableStatus": "NotBillable",
                    "ItemRef": \{
                        "value": "6",
                        "name": "Cleaning Services"
                    \},
                    "UnitPrice": 250,
                    "Qty": 1,
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            }
        ],
        "VendorRef": \{
            "value": "56",
            "name": "Office Depot"
        \},
        "APAccountRef": \{
            "value": "33",
            "name": "Accounts Payable"
        \},
        "TotalAmt": 500
    },
    "time": "2023-05-15T09:05:00-07:00"
}
```

### Get class

Get class details by ID.
**Sample Input**
**Sample Output**

### Get credit memo

Get credit memo details by ID.
**Sample Input**
**Sample Output**

### Get credit memo as PDF

Get a credit memo as a PDF document.
**Sample Input**

```json
\{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "realm_id": "1234567890",
    "credit_memo_id": "CM-12345"
\}
```

**Sample Output**

```json
\{
    "name": "CreditMemo_CM-12345.pdf",
    "url": "https://quickbooks.api.intuit.com/v3/company/1234567890/creditMemo/CM-12345/pdf",
    "mime_type": "application/pdf",
    "expires": 1623456789
\}
```

### Get customer

Get customer details by ID.
**Sample Input**

```json
{
    "customer_id": "123456"
}
```

**Sample Output**

### Get department

Get department details by ID.
**Sample Input**
**Sample Output**

### Get employee

Get employee details by ID.
**Sample Input**
**Sample Output**

### Get invoice

Get invoice details by ID.
**Sample Input**
**Sample Output**

```json
{
    "Invoice": {
        "Id": "1001",
        "Deposit": 0,
        "AllowIPNPayment": true,
        "AllowOnlinePayment": true,
        "AllowOnlineCreditCardPayment": true,
        "AllowOnlineACHPayment": false,
        "domain": "QBO",
        "sparse": false,
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-05-15T09:30:00-07:00",
            "LastUpdatedTime": "2023-05-15T09:30:00-07:00"
        \},
        "CustomField": [],
        "DocNumber": "INV-1001",
        "TxnDate": "2023-05-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "ExchangeRate": 1,
        "LinkedTxn": [],
        "Line": [
            {
                "Id": "1",
                "LineNum": 1,
                "Description": "Web Design Services",
                "Amount": 1000,
                "DetailType": "SalesItemLineDetail",
                "SalesItemLineDetail": {
                    "ItemRef": \{
                        "value": "1",
                        "name": "Web Design"
                    \},
                    "UnitPrice": 100,
                    "Qty": 10,
                    "TaxCodeRef": {
                        "value": "TAX"
                    }
                }
            },
            {
                "Id": "2",
                "LineNum": 2,
                "Description": "Subtotal",
                "Amount": 1000,
                "DetailType": "SubTotalLineDetail",
                "SubTotalLineDetail": {}
            }
        ],
        "TxnTaxDetail": {
            "TotalTax": 80,
            "TaxLine": [
                {
                    "Amount": 80,
                    "DetailType": "TaxLineDetail",
                    "TaxLineDetail": {
                        "TaxRateRef": {
                            "value": "2"
                        },
                        "PercentBased": true,
                        "TaxPercent": 8,
                        "NetAmountTaxable": 1000
                    }
                }
            ]
        },
        "CustomerRef": \{
            "value": "1",
            "name": "John Doe"
        \},
        "BillAddr": \{
            "Id": "2",
            "Line1": "123 Main St",
            "City": "Anytown",
            "PostalCode": "12345",
            "Lat": "37.4275",
            "Long": "-122.1697"
        \},
        "ShipAddr": \{
            "Id": "2",
            "Line1": "123 Main St",
            "City": "Anytown",
            "PostalCode": "12345",
            "Lat": "37.4275",
            "Long": "-122.1697"
        \},
        "SalesTermRef": {
            "value": "3"
        },
        "DueDate": "2023-06-14",
        "GlobalTaxCalculation": "TaxExcluded",
        "TotalAmt": 1080,
        "HomeTotalAmt": 1080,
        "PrintStatus": "NeedToPrint",
        "EmailStatus": "NotSet",
        "Balance": 1080
    },
    "time": "2023-05-15T10:00:00-07:00"
}
```

### Get payment

Get a payment by ID.
**Sample Input**

```json
\{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "payment_id": "123"
\}
```

**Sample Output**

### Get payment method

Get payment method details by ID.
**Sample Input**
**Sample Output**

```json
{
    "PaymentMethod": {
        "Name": "Credit Card",
        "Active": true,
        "Type": "CREDIT_CARD",
        "domain": "QBO",
        "sparse": false,
        "Id": "5",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:30:00-07:00",
            "LastUpdatedTime": "2023-04-15T09:30:00-07:00"
        \}
    },
    "time": "2023-04-15T10:15:33.456-07:00"
}
```

### Get purchase

Get purchase details by ID.
**Sample Input**

```json
\{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "purchase_id": "123"
\}
```

**Sample Output**

### Get tax code

Get tax code details by ID.
**Sample Input**
**Sample Output**

```json
{
    "TaxCode": {
        "Name": "Sales Tax",
        "Description": "Standard sales tax for goods and services",
        "Active": true,
        "Taxable": true,
        "TaxGroup": false,
        "SalesTaxRateList": {
            "TaxRateDetail": [
                {
                    "TaxRateRef": \{
                        "value": "RATE_1",
                        "name": "State Tax"
                    \},
                    "TaxTypeApplicable": "Sales",
                    "TaxOrder": 1
                },
                {
                    "TaxRateRef": \{
                        "value": "RATE_2",
                        "name": "County Tax"
                    \},
                    "TaxTypeApplicable": "Sales",
                    "TaxOrder": 2
                }
            ]
        },
        "PurchaseTaxRateList": {
            "TaxRateDetail": []
        },
        "domain": "QBO",
        "sparse": false,
        "Id": "TAX_CODE_1",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:00:00-07:00",
            "LastUpdatedTime": "2023-04-15T09:00:00-07:00"
        \}
    },
    "time": "2023-04-15T10:30:00-07:00"
}
```

### Get term

Get term details by ID.
**Sample Input**
**Sample Output**

```json
{
    "Term": {
        "Name": "Net 30",
        "Active": true,
        "Type": "STANDARD",
        "DueDays": 30,
        "DiscountDays": 10,
        "domain": "QBO",
        "sparse": false,
        "Id": "75",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:30:00-07:00",
            "LastUpdatedTime": "2023-04-15T09:30:00-07:00"
        \}
    },
    "time": "2023-04-20T14:22:35.279Z"
}
```

### Get time activity

Get time activity details by ID.
**Sample Input**
**Sample Output**

### Get transfer

Get transfer details by ID.
**Sample Input**
**Sample Output**

### Get vendor

Get vendor details by ID.
**Sample Input**
**Sample Output**

```json
{
    "Vendor": {
        "BillAddr": \{
            "Id": "23",
            "Line1": "123 Main St",
            "Line2": "Suite 100",
            "City": "San Francisco",
            "Country": "USA",
            "PostalCode": "94105"
        \},
        "TaxIdentifier": "12-3456789",
        "TermRef": {
            "value": "3"
        },
        "Balance": 1500.75,
        "AcctNum": "V-1001",
        "Vendor1099": true,
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "domain": "QBO",
        "sparse": false,
        "Id": "56",
        "SyncToken": "2",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:00:00-07:00",
            "LastUpdatedTime": "2023-05-01T14:30:00-07:00"
        \},
        "CompanyName": "ABC Supplies Inc.",
        "DisplayName": "ABC Supplies",
        "PrintOnCheckName": "ABC Supplies Inc.",
        "Active": true,
        "PrimaryPhone": {
            "FreeFormNumber": "(555) 123-4567"
        },
        "AlternatePhone": {
            "FreeFormNumber": "(555) 987-6543"
        },
        "Mobile": {
            "FreeFormNumber": "(555) 555-5555"
        },
        "Fax": {
            "FreeFormNumber": "(555) 111-2222"
        },
        "PrimaryEmailAddr": {
            "Address": "contact@abcsupplies.com"
        },
        "WebAddr": {
            "URI": "https://www.abcsupplies.com"
        }
    },
    "time": "2023-05-10T08:45:30-07:00"
}
```

### List accounts

List all accounts in your company.
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "name": "Bank",
    "where": [
        \{
            "entity": "AccountType",
            "operator": "=",
            "value": "Bank"
        \}
    ],
    "order_by": \{
        "value": "Name",
        "direction": "ASC"
    \},
    "start_position": 1,
    "max_results": 10
}
```

**Sample Output**

```json
{
    "QueryResponse": {
        "Account": [
            {
                "Name": "Checking Account",
                "SubAccount": false,
                "Description": "Main business checking account",
                "FullyQualifiedName": "Checking Account",
                "Active": true,
                "Classification": "Asset",
                "AccountType": "Bank",
                "AccountSubType": "Checking",
                "CurrentBalance": 15000.5,
                "CurrentBalanceWithSubAccounts": 15000.5,
                "CurrencyRef": \{
                    "value": "USD",
                    "name": "United States Dollar"
                \},
                "domain": "QBO",
                "sparse": false,
                "Id": "1",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-05-01T09:00:00-07:00",
                    "LastUpdatedTime": "2023-05-15T14:30:00-07:00"
                \}
            },
            {
                "Name": "Savings Account",
                "SubAccount": false,
                "Description": "Business savings account",
                "FullyQualifiedName": "Savings Account",
                "Active": true,
                "Classification": "Asset",
                "AccountType": "Bank",
                "AccountSubType": "Savings",
                "CurrentBalance": 50000,
                "CurrentBalanceWithSubAccounts": 50000,
                "CurrencyRef": \{
                    "value": "USD",
                    "name": "United States Dollar"
                \},
                "domain": "QBO",
                "sparse": false,
                "Id": "2",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-05-01T09:15:00-07:00",
                    "LastUpdatedTime": "2023-05-15T14:45:00-07:00"
                \}
            }
        ],
        "startPosition": 1,
        "maxResults": 10
    },
    "time": "2023-05-15T15:00:00-07:00"
}
```

### List classes

List all classes in your company.
**Sample Input**
**Sample Output**

```json
{
    "QueryResponse": {
        "Class": [
            {
                "Name": "Sales Department",
                "SubClass": false,
                "FullyQualifiedName": "Sales Department",
                "Active": true,
                "domain": "QBO",
                "sparse": false,
                "Id": "1",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-04-15T09:00:00-07:00",
                    "LastUpdatedTime": "2023-04-15T09:00:00-07:00"
                \}
            },
            {
                "Name": "Sales Team A",
                "SubClass": true,
                "FullyQualifiedName": "Sales Department:Sales Team A",
                "Active": true,
                "domain": "QBO",
                "sparse": false,
                "Id": "2",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-04-15T09:05:00-07:00",
                    "LastUpdatedTime": "2023-04-15T09:05:00-07:00"
                \}
            }
        ],
        "startPosition": 1,
        "maxResults": 10,
        "totalCount": 2
    },
    "time": "2023-04-15T10:00:00-07:00"
}
```

### List credit memos

List all credit memos in your company.
**Sample Input**
**Sample Output**

### List employees

List all employees in your company.
**Sample Input**
**Sample Output**

### List invoices

List all invoices in your company.
**Sample Input**
**Sample Output**

```json
{
    "QueryResponse": {
        "Invoice": [
            {
                "Deposit": 0,
                "AllowIPNPayment": true,
                "AllowOnlinePayment": true,
                "AllowOnlineCreditCardPayment": true,
                "AllowOnlineACHPayment": false,
                "domain": "QBO",
                "sparse": false,
                "Id": "1001",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-05-15T09:00:00-07:00",
                    "LastUpdatedTime": "2023-05-15T09:00:00-07:00"
                \},
                "CustomField": [],
                "DocNumber": "INV-1001",
                "TxnDate": "2023-05-15",
                "CurrencyRef": \{
                    "value": "USD",
                    "name": "United States Dollar"
                \},
                "ExchangeRate": 1,
                "LinkedTxn": [],
                "Line": [
                    {
                        "Id": "1",
                        "LineNum": 1,
                        "Description": "Consulting Services",
                        "Amount": 1000,
                        "DetailType": "SalesItemLineDetail",
                        "SalesItemLineDetail": {
                            "ItemRef": \{
                                "value": "1",
                                "name": "Consulting"
                            \},
                            "UnitPrice": 100,
                            "Qty": 10,
                            "TaxCodeRef": {
                                "value": "TAX"
                            }
                        },
                        "SubTotalLineDetail": {},
                        "DescriptionLineDetail": {
                            "ServiceDate": "2023-05-15"
                        }
                    }
                ],
                "TxnTaxDetail": {
                    "TotalTax": 80,
                    "TaxLine": [
                        {
                            "Amount": 80,
                            "DetailType": "TaxLineDetail",
                            "TaxLineDetail": {
                                "TaxRateRef": {
                                    "value": "2"
                                },
                                "PercentBased": true,
                                "TaxPercent": 8,
                                "NetAmountTaxable": 1000
                            }
                        }
                    ]
                },
                "CustomerRef": \{
                    "value": "2",
                    "name": "John Doe"
                \},
                "BillAddr": \{
                    "Id": "3",
                    "Line1": "123 Main St",
                    "City": "Anytown",
                    "PostalCode": "12345",
                    "Lat": "37.7749",
                    "Long": "-122.4194"
                \},
                "SalesTermRef": {
                    "value": "3"
                },
                "DueDate": "2023-06-14",
                "GlobalTaxCalculation": "TaxExcluded",
                "TotalAmt": 1080,
                "HomeTotalAmt": 1080,
                "PrintStatus": "NeedToPrint",
                "EmailStatus": "NotSet",
                "Balance": 1080,
                "BillEmail": {
                    "Address": "john.doe@example.com"
                },
                "ShipAddr": \{
                    "Id": "3",
                    "Line1": "123 Main St",
                    "City": "Anytown",
                    "PostalCode": "12345",
                    "Lat": "37.7749",
                    "Long": "-122.4194"
                \}
            }
        ],
        "startPosition": 1,
        "maxResults": 10,
        "totalCount": 1
    },
    "time": "2023-05-15T10:00:00-07:00"
}
```

### List items

List all items in your company.
**Sample Input**
**Sample Output**

### List payment methods

List all payment methods in your company.
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "where": [
        \{
            "entity": "Active",
            "operator": "=",
            "value": true
        \}
    ],
    "order_by": \{
        "value": "Name",
        "direction": "ASC"
    \},
    "start_position": 1,
    "max_results": 10
}
```

**Sample Output**

### List payments

List all payments in your company, from a given date.
**Sample Input**
**Sample Output**

```json
{
    "QueryResponse": {
        "Payment": [
            {
                "CustomerRef": \{
                    "value": "1",
                    "name": "John Doe"
                \},
                "DepositToAccountRef": {
                    "value": "35"
                },
                "PaymentMethodRef": {
                    "value": "3"
                },
                "PaymentRefNum": "1001",
                "TotalAmt": 1500,
                "UnappliedAmt": 0,
                "ProcessPayment": true,
                "domain": "QBO",
                "sparse": false,
                "Id": "123",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-05-15T09:00:00-07:00",
                    "LastUpdatedTime": "2023-05-15T09:00:00-07:00"
                \},
                "TxnDate": "2023-05-15",
                "CurrencyRef": \{
                    "value": "USD",
                    "name": "United States Dollar"
                \},
                "LinkedTxn": [
                    \{
                        "TxnId": "100",
                        "TxnType": "Invoice"
                    \}
                ],
                "Line": [
                    {
                        "Amount": 1500,
                        "LinkedTxn": [
                            \{
                                "TxnId": "100",
                                "TxnType": "Invoice"
                            \}
                        ],
                        "LineEx": {
                            "any": [
                                {
                                    "name": "PaymentMethodType",
                                    "declaredType": "com.intuit.schema.finance.v3.IPPPaymentMethodTypeEnum",
                                    "scope": "com.intuit.schema.finance.v3",
                                    "value": \{
                                        "Name": "PaymentMethodType",
                                        "Value": "CreditCard"
                                    \},
                                    "nil": false,
                                    "globalScope": false,
                                    "typeSubstituted": false
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "startPosition": 1,
        "maxResults": 10
    },
    "time": "2023-05-15T16:30:45.123Z"
}
```

### List purchases

List all purchases in your company.
**Sample Input**
**Sample Output**

```json
{
    "QueryResponse": {
        "Purchase": [
            {
                "AccountRef": \{
                    "value": "42",
                    "name": "Checking Account"
                \},
                "PaymentType": "Check",
                "Credit": false,
                "TotalAmt": 1500,
                "PurchaseEx": {
                    "any": [
                        {
                            "name": "CustomField",
                            "declaredType": "CustomField",
                            "scope": "User",
                            "value": \{
                                "Name": "Project",
                                "Value": "Office Renovation"
                            \},
                            "nil": false,
                            "globalScope": true,
                            "typeSubstituted": false
                        }
                    ]
                },
                "domain": "QBO",
                "sparse": false,
                "Id": "123",
                "SyncToken": "0",
                "MetaData": \{
                    "CreateTime": "2023-05-15T09:00:00-07:00",
                    "LastUpdatedTime": "2023-05-15T09:00:00-07:00"
                \},
                "TxnDate": "2023-05-15",
                "CurrencyRef": \{
                    "value": "USD",
                    "name": "United States Dollar"
                \},
                "Line": [
                    {
                        "Id": "1",
                        "Amount": 1500,
                        "DetailType": "AccountBasedExpenseLineDetail",
                        "AccountBasedExpenseLineDetail": {
                            "AccountRef": \{
                                "value": "72",
                                "name": "Office Supplies"
                            \},
                            "BillableStatus": "NotBillable",
                            "TaxCodeRef": {
                                "value": "TAX"
                            }
                        }
                    }
                ]
            }
        ],
        "startPosition": 1,
        "maxResults": 10
    },
    "time": "2023-05-15T10:00:00-07:00"
}
```

### List tax codes

List all tax codes in your company.
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "where": [
        \{
            "entity": "Name",
            "operator": "LIKE",
            "value": "Sales Tax%"
        \}
    ],
    "order_by": \{
        "value": "Name",
        "direction": "ASC"
    \},
    "start_position": 1,
    "max_results": 5
}
```

**Sample Output**

### List tax rates

List all tax rates in your company.
**Sample Input**
**Sample Output**

### List time activities

List all time activites in your company.
**Sample Input**
**Sample Output**

### List vendors

List all vendors in your company.
**Sample Input**
**Sample Output**

### Raw HTTP request (advanced)

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.
**Sample Input**
**Sample Output**

### Run query

Run a custom SQL query.
**Sample Input**
**Sample Output**

### Update bill

Update a bill.
**Sample Input**
**Sample Output**

```json
{
    "Bill": {
        "DueDate": "2023-07-15",
        "Balance": 1500,
        "domain": "QBO",
        "sparse": false,
        "Id": "123",
        "SyncToken": "2",
        "MetaData": \{
            "CreateTime": "2023-06-01T10:00:00-07:00",
            "LastUpdatedTime": "2023-06-15T14:30:00-07:00"
        \},
        "TxnDate": "2023-06-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "Line": [
            {
                "Id": "1",
                "LineNum": 1,
                "Description": "Monthly office supplies",
                "Amount": 500,
                "DetailType": "AccountBasedExpenseLineDetail",
                "AccountBasedExpenseLineDetail": {
                    "AccountRef": \{
                        "value": "60",
                        "name": "Office Supplies"
                    \},
                    "BillableStatus": "NotBillable",
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            },
            {
                "Id": "2",
                "LineNum": 2,
                "Description": "New printers for office",
                "Amount": 1000,
                "DetailType": "ItemBasedExpenseLineDetail",
                "ItemBasedExpenseLineDetail": {
                    "ItemRef": \{
                        "value": "22",
                        "name": "Printer"
                    \},
                    "Qty": 2,
                    "UnitPrice": 500
                }
            }
        ],
        "VendorRef": \{
            "value": "56",
            "name": "ABC Supplies"
        \},
        "APAccountRef": \{
            "value": "33",
            "name": "Accounts Payable"
        \},
        "TotalAmt": 1500
    },
    "time": "2023-06-15T14:30:00-07:00"
}
```

### Update customer (full)

Fully update a customer's details.
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "id": "55",
    "identifier": \{
        "display_name": "John Doe",
        "given_name": "John",
        "family_name": "Doe"
    \},
    "company_name": "Doe Enterprises",
    "print_on_check_name": "John Doe",
    "active": "true",
    "primary_phone": "555-123-4567",
    "primary_email_addr": "john.doe@example.com",
    "web_addr": "www.doeenterprises.com",
    "taxable": {
        "default_tax_code_ref": "TAX"
    },
    "bill_addr": \{
        "line_1": "123 Main St",
        "city": "Anytown",
        "country": "USA",
        "postal_code": "12345"
    \},
    "ship_addr": \{
        "line_1": "456 Shipping Ave",
        "city": "Shipville",
        "country": "USA",
        "postal_code": "67890"
    \},
    "notes": "Preferred customer",
    "payment_method_ref": "3",
    "currency_ref": "USD - US Dollar",
    "preferred_delivery_method": "Email"
}
```

**Sample Output**

### Update customer (sparse)

Sparsely update a customer's details.
**Sample Input**
**Sample Output**

### Update employee

Update a employee's details.
**Sample Input**
**Sample Output**

```json
{
    "Employee": {
        "EmployeeNumber": "EMP001",
        "SSN": "123-45-6789",
        "PrimaryAddr": \{
            "Id": "1",
            "Line1": "123 Main St",
            "Line2": "Apt 4B",
            "City": "Anytown",
            "Country": "USA",
            "CountrySubDivisionCode": "CA",
            "PostalCode": "12345"
        \},
        "BillableTime": true,
        "BillRate": 75.5,
        "BirthDate": "1985-06-20",
        "Gender": "Male",
        "HiredDate": "2022-01-15",
        "domain": "QBO",
        "sparse": false,
        "Id": "55",
        "SyncToken": "1",
        "MetaData": \{
            "CreateTime": "2022-01-15T10:00:00-08:00",
            "LastUpdatedTime": "2023-05-20T14:30:00-08:00"
        \},
        "Title": "Manager",
        "GivenName": "John",
        "MiddleName": "William",
        "FamilyName": "Doe",
        "Suffix": "Jr",
        "DisplayName": "John Doe",
        "PrintOnCheckName": "John W. Doe Jr.",
        "Active": true,
        "PrimaryPhone": {
            "FreeFormNumber": "555-123-4567"
        },
        "Mobile": {
            "FreeFormNumber": "555-987-6543"
        },
        "PrimaryEmailAddr": {
            "Address": "john.doe@example.com"
        }
    },
    "time": "2023-05-20T14:30:00-08:00"
}
```

### Update invoice

Update an invoice.
**Sample Input**
**Sample Output**

```json
{
    "Invoice": {
        "Id": "123",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-06-15T10:00:00-07:00",
            "LastUpdatedTime": "2023-06-15T10:00:00-07:00"
        \},
        "CustomField": [],
        "DocNumber": "1001",
        "TxnDate": "2023-06-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "LinkedTxn": [],
        "Line": [
            {
                "Id": "1",
                "LineNum": 1,
                "Description": "Web Design Services",
                "Amount": 100,
                "DetailType": "SalesItemLineDetail",
                "SalesItemLineDetail": {
                    "ItemRef": \{
                        "value": "1",
                        "name": "Web Design"
                    \},
                    "UnitPrice": 100,
                    "Qty": 1,
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            },
            {
                "Id": "2",
                "LineNum": 2,
                "Description": "Logo Design",
                "Amount": 50,
                "DetailType": "SalesItemLineDetail",
                "SalesItemLineDetail": {
                    "ItemRef": \{
                        "value": "2",
                        "name": "Logo Design"
                    \},
                    "UnitPrice": 50,
                    "Qty": 1,
                    "TaxCodeRef": {
                        "value": "NON"
                    }
                }
            }
        ],
        "TxnTaxDetail": {
            "TotalTax": 0
        },
        "CustomerRef": \{
            "value": "456",
            "name": "John Doe"
        \},
        "CustomerMemo": {
            "value": "Thank you for your business!"
        },
        "BillEmail": {
            "Address": "johndoe@example.com"
        },
        "TotalAmt": 150,
        "ApplyTaxAfterDiscount": false,
        "PrintStatus": "NeedToPrint",
        "EmailStatus": "NotSet",
        "Balance": 150,
        "Deposit": 0,
        "AllowIPNPayment": false,
        "AllowOnlinePayment": false,
        "AllowOnlineCreditCardPayment": false,
        "AllowOnlineACHPayment": false,
        "DueDate": "2023-07-15",
        "sparse": false,
        "GlobalTaxCalculation": "TaxExcluded"
    },
    "time": "2023-06-15T10:00:00.000-07:00"
}
```

### Update purchase

Update a purchase.
**Sample Input**

```json
{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "purchase_id": "123",
    "sync_token": "1",
    "payment_type": "CreditCard",
    "account_ref": \{
        "value": "42",
        "name": "Credit Card Account"
    \},
    "lines": [
        {
            "account_based_expense_line": {
                "amount": 100,
                "account_ref": \{
                    "value": "55",
                    "name": "Office Supplies"
                \},
                "description": "Office supplies purchase"
            }
        }
    ],
    "currency_ref": \{
        "value": "USD",
        "name": "United States Dollar"
    \},
    "private_note": "Monthly office supply restock"
}
```

**Sample Output**

### Update time activity

Update a time activity
**Sample Input**

```json
{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "realm_id": "1234567890",
    "id": "123",
    "name_of": \{
        "employee_id": "456",
        "name": "John Doe"
    \},
    "time": {
        "start_time": \{
            "hour": "09",
            "minute": "00"
        \},
        "end_time": \{
            "hour": "17",
            "minute": "30"
        \}
    },
    "billable_status": \{
        "taxable": true,
        "hourly_rate": 75.5
    \},
    "txn_date": "2023-05-15T00:00:00Z",
    "description": "Project work for Client XYZ",
    "customer_ref": \{
        "value": "789",
        "name": "Client XYZ"
    \},
    "item_ref": \{
        "value": "101",
        "name": "Consulting Services"
    \},
    "class_ref": \{
        "value": "202",
        "name": "IT Department"
    \},
    "department_ref": \{
        "value": "303",
        "name": "Development"
    \},
    "break_hours": 1,
    "break_minutes": 30
}
```

**Sample Output**

```json
{
    "TimeActivity": {
        "TxnDate": "2023-05-15",
        "NameOf": "Employee",
        "EmployeeRef": \{
            "value": "456",
            "name": "John Doe"
        \},
        "CustomerRef": \{
            "value": "789",
            "name": "Client XYZ"
        \},
        "ItemRef": \{
            "value": "101",
            "name": "Consulting Services"
        \},
        "DepartmentRef": \{
            "value": "303",
            "name": "Development"
        \},
        "ClassRef": \{
            "value": "202",
            "name": "IT Department"
        \},
        "BillableStatus": "Billable",
        "Taxable": true,
        "HourlyRate": 75.5,
        "BreakHours": 1,
        "BreakMinutes": 30,
        "StartTime": "2023-05-15T09:00:00-07:00",
        "EndTime": "2023-05-15T17:30:00-07:00",
        "Description": "Project work for Client XYZ",
        "domain": "QBO",
        "sparse": false,
        "Id": "123",
        "SyncToken": "0",
        "MetaData": \{
            "CreateTime": "2023-05-15T10:00:00-07:00",
            "LastUpdatedTime": "2023-05-15T18:00:00-07:00"
        \}
    },
    "time": "2023-05-15T18:00:00-07:00"
}
```

### Update transfer

Update a transfer by its ID.
**Sample Input**

```json
\{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890",
    "transfer_id": "123",
    "amount": "1000.00",
    "from": "35",
    "to": "36"
\}
```

**Sample Output**

```json
{
    "Transfer": {
        "FromAccountRef": \{
            "value": "35",
            "name": "Checking Account"
        \},
        "ToAccountRef": \{
            "value": "36",
            "name": "Savings Account"
        \},
        "Amount": 1000,
        "domain": "QBO",
        "sparse": false,
        "Id": "123",
        "SyncToken": "1",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:00:00-07:00",
            "LastUpdatedTime": "2023-04-15T10:30:00-07:00"
        \},
        "TxnDate": "2023-04-15",
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \}
    },
    "time": "2023-04-15T10:30:00-07:00"
}
```

### Update vendor

Update a vendor's details.
**Sample Input**
**Sample Output**

```json
{
    "Vendor": {
        "MiddleName": null,
        "sparse": false,
        "Mobile": null,
        "CurrencyRef": \{
            "value": "USD",
            "name": "United States Dollar"
        \},
        "TermRef": \{
            "value": "3",
            "name": "Net 30"
        \},
        "domain": "QBO",
        "WebAddr": {
            "URI": "https://www.abcsupplies.com"
        },
        "Active": true,
        "Vendor1099": true,
        "PrintOnCheckName": "ABC Supplies",
        "CompanyName": "ABC Supplies Inc.",
        "GivenName": "John",
        "PrimaryEmailAddr": {
            "Address": "john.doe@abcsupplies.com"
        },
        "PrimaryPhone": {
            "FreeFormNumber": "555-123-4567"
        },
        "DisplayName": "ABC Supplies Inc.",
        "FamilyName": "Doe",
        "MetaData": \{
            "CreateTime": "2023-04-15T09:00:00-07:00",
            "LastUpdatedTime": "2023-04-15T10:30:00-07:00"
        \},
        "Suffix": null,
        "AcctNum": "V-1001",
        "AlternatePhone": null,
        "TaxIdentifier": "12-3456789",
        "BillAddr": \{
            "Line1": "123 Main St",
            "City": "Anytown",
            "Country": "United States",
            "CountrySubDivisionCode": "CA",
            "PostalCode": "12345",
            "Id": "12"
        \},
        "Title": null,
        "Id": "56",
        "Balance": 0,
        "Fax": null,
        "SyncToken": "2"
    },
    "time": "2023-04-15T10:30:00-07:00"
}
```

## DDL operations

### List accounts (DDL)

> **Warning:** Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

**Sample Input**

```json
\{
    "access_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0...",
    "realm_id": "1234567890"
\}
```

**Sample Output**

```json
[
    \{
        "value": "1",
        "text": "Cash and cash equivalents"
    \},
    \{
        "value": "2",
        "text": "Accounts receivable (A/R)"
    \},
    \{
        "value": "3",
        "text": "Inventory"
    \},
    \{
        "value": "4",
        "text": "Property, plant and equipment"
    \},
    \{
        "value": "5",
        "text": "Accounts payable (A/P)"
    \},
    \{
        "value": "6",
        "text": "Sales revenue"
    \},
    \{
        "value": "7",
        "text": "Cost of goods sold"
    \},
    \{
        "value": "8",
        "text": "Operating expenses"
    \}
]
```

### List classes (DDL)

> **Warning:** Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

**Sample Input**
**Sample Output**

### List credit memos (DDL)

**Sample Input**

```json
\{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "realm_id": "123456789"
\}
```

**Sample Output**

### List departments (DDL)

> **Warning:** Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

**Sample Input**
**Sample Output**

```json
[
    \{
        "value": "1",
        "label": "Sales"
    \},
    \{
        "value": "2",
        "label": "Marketing"
    \},
    \{
        "value": "3",
        "label": "Finance"
    \},
    \{
        "value": "4",
        "label": "Human Resources"
    \},
    \{
        "value": "5",
        "label": "Operations"
    \}
]
```

### List discount accounts (DDL)

**Sample Input**

```json
\{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "realm_id": "1234567890"
\}
```

**Sample Output**

### List entities (DDL)

**Sample Input**
**Sample Output**

```json
{
    "entities": [
        \{
            "name": "Account",
            "displayName": "Account",
            "description": "Chart of Accounts"
        \},
        \{
            "name": "Customer",
            "displayName": "Customer",
            "description": "Customer Information"
        \},
        \{
            "name": "Invoice",
            "displayName": "Invoice",
            "description": "Sales Invoice"
        \},
        \{
            "name": "Item",
            "displayName": "Item",
            "description": "Products and Services"
        \},
        \{
            "name": "Payment",
            "displayName": "Payment",
            "description": "Customer Payment"
        \}
    ]
}
```

### List items (DDL)

**Sample Input**
**Sample Output**

```json
{
    "items": [
        \{
            "value": "1",
            "text": "Item 1"
        \},
        \{
            "value": "2",
            "text": "Item 2"
        \},
        \{
            "value": "3",
            "text": "Item 3"
        \}
    ]
}
```

### List payment methods (DDL)

> **Warning:** Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

**Sample Input**
**Sample Output**

```json
[
    \{
        "value": "1",
        "name": "Cash"
    \},
    \{
        "value": "2",
        "name": "Check"
    \},
    \{
        "value": "3",
        "name": "Credit Card"
    \},
    \{
        "value": "4",
        "name": "Bank Transfer"
    \},
    \{
        "value": "5",
        "name": "PayPal"
    \}
]
```

### List tax rates (DDL)

**Sample Input**

```json
\{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "realm_id": "1234567890"
\}
```

**Sample Output**

```json
[
    \{
        "value": "1",
        "name": "No tax"
    \},
    \{
        "value": "2",
        "name": "Standard rate (20%)"
    \},
    \{
        "value": "3",
        "name": "Reduced rate (5%)"
    \},
    \{
        "value": "4",
        "name": "Zero rate (0%)"
    \}
]
```

### List terms (DDL)

> **Warning:** Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

**Sample Input**
**Sample Output**

```json
{
    "terms": [
        \{
            "id": "1",
            "name": "Net 30",
            "type": "STANDARD",
            "discountPercent": 0,
            "dueDays": 30
        \},
        \{
            "id": "2",
            "name": "Net 15",
            "type": "STANDARD",
            "discountPercent": 0,
            "dueDays": 15
        \},
        \{
            "id": "3",
            "name": "2% 10 Net 30",
            "type": "STANDARD",
            "discountPercent": 2,
            "discountDays": 10,
            "dueDays": 30
        \}
    ]
}
```
