Skip to main content
POST
/
sandbox
/
quickbooks
/
{sandbox_id}
/
initialize
Initialize quickbooks sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/quickbooks/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accounts": [
    {
      "Name": "Business Checking Account",
      "AccountType": "Bank"
    },
    {
      "Name": "Savings Account",
      "AccountType": "Bank"
    },
    {
      "Name": "Accounts Receivable",
      "AccountType": "Accounts Receivable"
    },
    {
      "Name": "Sales Revenue",
      "AccountType": "Income"
    },
    {
      "Name": "Consulting Revenue",
      "AccountType": "Income"
    },
    {
      "Name": "Product Sales",
      "AccountType": "Income"
    },
    {
      "Name": "Office Expenses",
      "AccountType": "Expense"
    },
    {
      "Name": "Rent Expense",
      "AccountType": "Expense"
    },
    {
      "Name": "Utilities Expense",
      "AccountType": "Expense"
    },
    {
      "Name": "Marketing Expense",
      "AccountType": "Expense"
    },
    {
      "Name": "Travel Expense",
      "AccountType": "Expense"
    },
    {
      "Name": "Insurance Expense",
      "AccountType": "Expense"
    },
    {
      "Name": "Equipment",
      "AccountType": "Other Current Asset"
    },
    {
      "Name": "Accounts Payable",
      "AccountType": "Accounts Payable"
    },
    {
      "Name": "Sales Tax Payable",
      "AccountType": "Other Current Liability"
    }
  ],
  "customers": [
    {
      "DisplayName": "Acme Corporation",
      "CompanyName": "Acme Corporation",
      "PrimaryEmailAddr": {
        "Address": "billing@acme.com"
      },
      "BillAddr": {
        "Line1": "123 Business Street",
        "City": "San Francisco",
        "CountrySubDivisionCode": "CA",
        "PostalCode": "94105"
      }
    },
    {
      "DisplayName": "Tech Start Inc",
      "CompanyName": "Tech Start Inc",
      "PrimaryEmailAddr": {
        "Address": "accounts@techstart.io"
      },
      "BillAddr": {
        "Line1": "456 Innovation Drive",
        "City": "Palo Alto",
        "CountrySubDivisionCode": "CA",
        "PostalCode": "94301"
      }
    },
    {
      "DisplayName": "Global Enterprises LLC",
      "CompanyName": "Global Enterprises LLC",
      "PrimaryEmailAddr": {
        "Address": "finance@globalent.com"
      },
      "BillAddr": {
        "Line1": "789 Commerce Ave",
        "City": "New York",
        "CountrySubDivisionCode": "NY",
        "PostalCode": "10001"
      }
    },
    {
      "DisplayName": "Blue Sky Solutions",
      "CompanyName": "Blue Sky Solutions",
      "PrimaryEmailAddr": {
        "Address": "billing@bluesky.com"
      }
    },
    {
      "DisplayName": "Metro Systems Corp",
      "CompanyName": "Metro Systems Corp",
      "PrimaryEmailAddr": {
        "Address": "ap@metrosystems.com"
      }
    },
    {
      "DisplayName": "Sunrise Technologies",
      "CompanyName": "Sunrise Technologies",
      "PrimaryEmailAddr": {
        "Address": "accounting@sunrise.tech"
      }
    },
    {
      "DisplayName": "Pacific Coast Partners",
      "CompanyName": "Pacific Coast Partners",
      "PrimaryEmailAddr": {
        "Address": "billing@pacificcoast.com"
      }
    },
    {
      "DisplayName": "Quantum Dynamics Inc",
      "CompanyName": "Quantum Dynamics Inc",
      "PrimaryEmailAddr": {
        "Address": "invoices@quantum.com"
      }
    },
    {
      "DisplayName": "Silver Lining Consulting",
      "CompanyName": "Silver Lining Consulting",
      "PrimaryEmailAddr": {
        "Address": "payments@silverlining.co"
      }
    },
    {
      "DisplayName": "Mountain View Associates",
      "CompanyName": "Mountain View Associates",
      "PrimaryEmailAddr": {
        "Address": "finance@mountainview.com"
      }
    },
    {
      "DisplayName": "Urban Development Group",
      "CompanyName": "Urban Development Group",
      "PrimaryEmailAddr": {
        "Address": "billing@urbandev.com"
      }
    },
    {
      "DisplayName": "Coastal Innovations",
      "CompanyName": "Coastal Innovations",
      "PrimaryEmailAddr": {
        "Address": "accounting@coastal.io"
      }
    },
    {
      "DisplayName": "Premier Business Services",
      "CompanyName": "Premier Business Services",
      "PrimaryEmailAddr": {
        "Address": "accounts@premier.biz"
      }
    },
    {
      "DisplayName": "NextGen Solutions",
      "CompanyName": "NextGen Solutions",
      "PrimaryEmailAddr": {
        "Address": "billing@nextgen.com"
      }
    },
    {
      "DisplayName": "Digital Horizon Corp",
      "CompanyName": "Digital Horizon Corp",
      "PrimaryEmailAddr": {
        "Address": "invoicing@digitalhorizon.com"
      }
    }
  ],
  "vendors": [
    {
      "DisplayName": "Office Supply Company",
      "CompanyName": "Office Supply Company"
    },
    {
      "DisplayName": "Cloud Services Provider",
      "CompanyName": "Cloud Services Provider"
    },
    {
      "DisplayName": "Marketing Agency Solutions",
      "CompanyName": "Marketing Agency Solutions"
    },
    {
      "DisplayName": "Legal Services Partners",
      "CompanyName": "Legal Services Partners"
    },
    {
      "DisplayName": "Telecommunications Inc",
      "CompanyName": "Telecommunications Inc"
    },
    {
      "DisplayName": "Equipment Rental Company",
      "CompanyName": "Equipment Rental Company"
    },
    {
      "DisplayName": "Insurance Brokers LLC",
      "CompanyName": "Insurance Brokers LLC"
    },
    {
      "DisplayName": "Property Management Group",
      "CompanyName": "Property Management Group"
    },
    {
      "DisplayName": "IT Services Consultant",
      "CompanyName": "IT Services Consultant"
    },
    {
      "DisplayName": "Accounting Services Co",
      "CompanyName": "Accounting Services Co"
    },
    {
      "DisplayName": "Shipping & Logistics Inc",
      "CompanyName": "Shipping & Logistics Inc"
    },
    {
      "DisplayName": "Web Development Studio",
      "CompanyName": "Web Development Studio"
    },
    {
      "DisplayName": "Facility Maintenance Services",
      "CompanyName": "Facility Maintenance Services"
    },
    {
      "DisplayName": "Professional Training Corp",
      "CompanyName": "Professional Training Corp"
    },
    {
      "DisplayName": "Security Systems Provider",
      "CompanyName": "Security Systems Provider"
    }
  ],
  "invoices": [
    {
      "Line": [
        {
          "Amount": 1500,
          "DetailType": "SalesItemLineDetail",
          "Description": "Consulting Services - Strategic Planning",
          "SalesItemLineDetail": {
            "Qty": 10,
            "UnitPrice": 150
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 2500,
          "DetailType": "SalesItemLineDetail",
          "Description": "Software Development Services",
          "SalesItemLineDetail": {
            "Qty": 20,
            "UnitPrice": 125
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 800,
          "DetailType": "SalesItemLineDetail",
          "Description": "Monthly Maintenance Agreement",
          "SalesItemLineDetail": {
            "Qty": 1,
            "UnitPrice": 800
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 3200,
          "DetailType": "SalesItemLineDetail",
          "Description": "Custom Application Development",
          "SalesItemLineDetail": {
            "Qty": 32,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1200,
          "DetailType": "SalesItemLineDetail",
          "Description": "Project Management Services",
          "SalesItemLineDetail": {
            "Qty": 12,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 950,
          "DetailType": "SalesItemLineDetail",
          "Description": "Business Analysis and Requirements",
          "SalesItemLineDetail": {
            "Qty": 10,
            "UnitPrice": 95
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1800,
          "DetailType": "SalesItemLineDetail",
          "Description": "Training and Documentation",
          "SalesItemLineDetail": {
            "Qty": 18,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 2200,
          "DetailType": "SalesItemLineDetail",
          "Description": "System Integration Services",
          "SalesItemLineDetail": {
            "Qty": 20,
            "UnitPrice": 110
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1600,
          "DetailType": "SalesItemLineDetail",
          "Description": "Quality Assurance and Testing",
          "SalesItemLineDetail": {
            "Qty": 16,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 2800,
          "DetailType": "SalesItemLineDetail",
          "Description": "Database Design and Implementation",
          "SalesItemLineDetail": {
            "Qty": 20,
            "UnitPrice": 140
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1400,
          "DetailType": "SalesItemLineDetail",
          "Description": "Security Audit Services",
          "SalesItemLineDetail": {
            "Qty": 14,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 3000,
          "DetailType": "SalesItemLineDetail",
          "Description": "Cloud Migration Services",
          "SalesItemLineDetail": {
            "Qty": 30,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1100,
          "DetailType": "SalesItemLineDetail",
          "Description": "Performance Optimization",
          "SalesItemLineDetail": {
            "Qty": 11,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 2400,
          "DetailType": "SalesItemLineDetail",
          "Description": "API Development and Integration",
          "SalesItemLineDetail": {
            "Qty": 24,
            "UnitPrice": 100
          }
        }
      ]
    },
    {
      "Line": [
        {
          "Amount": 1750,
          "DetailType": "SalesItemLineDetail",
          "Description": "Mobile Application Development",
          "SalesItemLineDetail": {
            "Qty": 14,
            "UnitPrice": 125
          }
        }
      ]
    }
  ],
  "payments": [
    {
      "TotalAmt": 1500,
      "Line": []
    },
    {
      "TotalAmt": 2500,
      "Line": []
    },
    {
      "TotalAmt": 800,
      "Line": []
    },
    {
      "TotalAmt": 3200,
      "Line": []
    },
    {
      "TotalAmt": 1200,
      "Line": []
    },
    {
      "TotalAmt": 950,
      "Line": []
    },
    {
      "TotalAmt": 1800,
      "Line": []
    },
    {
      "TotalAmt": 2200,
      "Line": []
    },
    {
      "TotalAmt": 1600,
      "Line": []
    },
    {
      "TotalAmt": 2800,
      "Line": []
    },
    {
      "TotalAmt": 1400,
      "Line": []
    },
    {
      "TotalAmt": 3000,
      "Line": []
    },
    {
      "TotalAmt": 1100,
      "Line": []
    },
    {
      "TotalAmt": 2400,
      "Line": []
    },
    {
      "TotalAmt": 1750,
      "Line": []
    }
  ]
}
'
import requests

url = "https://api.klavis.ai/sandbox/quickbooks/{sandbox_id}/initialize"

payload = {
    "accounts": [
        {
            "Name": "Business Checking Account",
            "AccountType": "Bank"
        },
        {
            "Name": "Savings Account",
            "AccountType": "Bank"
        },
        {
            "Name": "Accounts Receivable",
            "AccountType": "Accounts Receivable"
        },
        {
            "Name": "Sales Revenue",
            "AccountType": "Income"
        },
        {
            "Name": "Consulting Revenue",
            "AccountType": "Income"
        },
        {
            "Name": "Product Sales",
            "AccountType": "Income"
        },
        {
            "Name": "Office Expenses",
            "AccountType": "Expense"
        },
        {
            "Name": "Rent Expense",
            "AccountType": "Expense"
        },
        {
            "Name": "Utilities Expense",
            "AccountType": "Expense"
        },
        {
            "Name": "Marketing Expense",
            "AccountType": "Expense"
        },
        {
            "Name": "Travel Expense",
            "AccountType": "Expense"
        },
        {
            "Name": "Insurance Expense",
            "AccountType": "Expense"
        },
        {
            "Name": "Equipment",
            "AccountType": "Other Current Asset"
        },
        {
            "Name": "Accounts Payable",
            "AccountType": "Accounts Payable"
        },
        {
            "Name": "Sales Tax Payable",
            "AccountType": "Other Current Liability"
        }
    ],
    "customers": [
        {
            "DisplayName": "Acme Corporation",
            "CompanyName": "Acme Corporation",
            "PrimaryEmailAddr": { "Address": "billing@acme.com" },
            "BillAddr": {
                "Line1": "123 Business Street",
                "City": "San Francisco",
                "CountrySubDivisionCode": "CA",
                "PostalCode": "94105"
            }
        },
        {
            "DisplayName": "Tech Start Inc",
            "CompanyName": "Tech Start Inc",
            "PrimaryEmailAddr": { "Address": "accounts@techstart.io" },
            "BillAddr": {
                "Line1": "456 Innovation Drive",
                "City": "Palo Alto",
                "CountrySubDivisionCode": "CA",
                "PostalCode": "94301"
            }
        },
        {
            "DisplayName": "Global Enterprises LLC",
            "CompanyName": "Global Enterprises LLC",
            "PrimaryEmailAddr": { "Address": "finance@globalent.com" },
            "BillAddr": {
                "Line1": "789 Commerce Ave",
                "City": "New York",
                "CountrySubDivisionCode": "NY",
                "PostalCode": "10001"
            }
        },
        {
            "DisplayName": "Blue Sky Solutions",
            "CompanyName": "Blue Sky Solutions",
            "PrimaryEmailAddr": { "Address": "billing@bluesky.com" }
        },
        {
            "DisplayName": "Metro Systems Corp",
            "CompanyName": "Metro Systems Corp",
            "PrimaryEmailAddr": { "Address": "ap@metrosystems.com" }
        },
        {
            "DisplayName": "Sunrise Technologies",
            "CompanyName": "Sunrise Technologies",
            "PrimaryEmailAddr": { "Address": "accounting@sunrise.tech" }
        },
        {
            "DisplayName": "Pacific Coast Partners",
            "CompanyName": "Pacific Coast Partners",
            "PrimaryEmailAddr": { "Address": "billing@pacificcoast.com" }
        },
        {
            "DisplayName": "Quantum Dynamics Inc",
            "CompanyName": "Quantum Dynamics Inc",
            "PrimaryEmailAddr": { "Address": "invoices@quantum.com" }
        },
        {
            "DisplayName": "Silver Lining Consulting",
            "CompanyName": "Silver Lining Consulting",
            "PrimaryEmailAddr": { "Address": "payments@silverlining.co" }
        },
        {
            "DisplayName": "Mountain View Associates",
            "CompanyName": "Mountain View Associates",
            "PrimaryEmailAddr": { "Address": "finance@mountainview.com" }
        },
        {
            "DisplayName": "Urban Development Group",
            "CompanyName": "Urban Development Group",
            "PrimaryEmailAddr": { "Address": "billing@urbandev.com" }
        },
        {
            "DisplayName": "Coastal Innovations",
            "CompanyName": "Coastal Innovations",
            "PrimaryEmailAddr": { "Address": "accounting@coastal.io" }
        },
        {
            "DisplayName": "Premier Business Services",
            "CompanyName": "Premier Business Services",
            "PrimaryEmailAddr": { "Address": "accounts@premier.biz" }
        },
        {
            "DisplayName": "NextGen Solutions",
            "CompanyName": "NextGen Solutions",
            "PrimaryEmailAddr": { "Address": "billing@nextgen.com" }
        },
        {
            "DisplayName": "Digital Horizon Corp",
            "CompanyName": "Digital Horizon Corp",
            "PrimaryEmailAddr": { "Address": "invoicing@digitalhorizon.com" }
        }
    ],
    "vendors": [
        {
            "DisplayName": "Office Supply Company",
            "CompanyName": "Office Supply Company"
        },
        {
            "DisplayName": "Cloud Services Provider",
            "CompanyName": "Cloud Services Provider"
        },
        {
            "DisplayName": "Marketing Agency Solutions",
            "CompanyName": "Marketing Agency Solutions"
        },
        {
            "DisplayName": "Legal Services Partners",
            "CompanyName": "Legal Services Partners"
        },
        {
            "DisplayName": "Telecommunications Inc",
            "CompanyName": "Telecommunications Inc"
        },
        {
            "DisplayName": "Equipment Rental Company",
            "CompanyName": "Equipment Rental Company"
        },
        {
            "DisplayName": "Insurance Brokers LLC",
            "CompanyName": "Insurance Brokers LLC"
        },
        {
            "DisplayName": "Property Management Group",
            "CompanyName": "Property Management Group"
        },
        {
            "DisplayName": "IT Services Consultant",
            "CompanyName": "IT Services Consultant"
        },
        {
            "DisplayName": "Accounting Services Co",
            "CompanyName": "Accounting Services Co"
        },
        {
            "DisplayName": "Shipping & Logistics Inc",
            "CompanyName": "Shipping & Logistics Inc"
        },
        {
            "DisplayName": "Web Development Studio",
            "CompanyName": "Web Development Studio"
        },
        {
            "DisplayName": "Facility Maintenance Services",
            "CompanyName": "Facility Maintenance Services"
        },
        {
            "DisplayName": "Professional Training Corp",
            "CompanyName": "Professional Training Corp"
        },
        {
            "DisplayName": "Security Systems Provider",
            "CompanyName": "Security Systems Provider"
        }
    ],
    "invoices": [{ "Line": [
                {
                    "Amount": 1500,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Consulting Services - Strategic Planning",
                    "SalesItemLineDetail": {
                        "Qty": 10,
                        "UnitPrice": 150
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 2500,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Software Development Services",
                    "SalesItemLineDetail": {
                        "Qty": 20,
                        "UnitPrice": 125
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 800,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Monthly Maintenance Agreement",
                    "SalesItemLineDetail": {
                        "Qty": 1,
                        "UnitPrice": 800
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 3200,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Custom Application Development",
                    "SalesItemLineDetail": {
                        "Qty": 32,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1200,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Project Management Services",
                    "SalesItemLineDetail": {
                        "Qty": 12,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 950,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Business Analysis and Requirements",
                    "SalesItemLineDetail": {
                        "Qty": 10,
                        "UnitPrice": 95
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1800,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Training and Documentation",
                    "SalesItemLineDetail": {
                        "Qty": 18,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 2200,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "System Integration Services",
                    "SalesItemLineDetail": {
                        "Qty": 20,
                        "UnitPrice": 110
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1600,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Quality Assurance and Testing",
                    "SalesItemLineDetail": {
                        "Qty": 16,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 2800,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Database Design and Implementation",
                    "SalesItemLineDetail": {
                        "Qty": 20,
                        "UnitPrice": 140
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1400,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Security Audit Services",
                    "SalesItemLineDetail": {
                        "Qty": 14,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 3000,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Cloud Migration Services",
                    "SalesItemLineDetail": {
                        "Qty": 30,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1100,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Performance Optimization",
                    "SalesItemLineDetail": {
                        "Qty": 11,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 2400,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "API Development and Integration",
                    "SalesItemLineDetail": {
                        "Qty": 24,
                        "UnitPrice": 100
                    }
                }
            ] }, { "Line": [
                {
                    "Amount": 1750,
                    "DetailType": "SalesItemLineDetail",
                    "Description": "Mobile Application Development",
                    "SalesItemLineDetail": {
                        "Qty": 14,
                        "UnitPrice": 125
                    }
                }
            ] }],
    "payments": [
        {
            "TotalAmt": 1500,
            "Line": []
        },
        {
            "TotalAmt": 2500,
            "Line": []
        },
        {
            "TotalAmt": 800,
            "Line": []
        },
        {
            "TotalAmt": 3200,
            "Line": []
        },
        {
            "TotalAmt": 1200,
            "Line": []
        },
        {
            "TotalAmt": 950,
            "Line": []
        },
        {
            "TotalAmt": 1800,
            "Line": []
        },
        {
            "TotalAmt": 2200,
            "Line": []
        },
        {
            "TotalAmt": 1600,
            "Line": []
        },
        {
            "TotalAmt": 2800,
            "Line": []
        },
        {
            "TotalAmt": 1400,
            "Line": []
        },
        {
            "TotalAmt": 3000,
            "Line": []
        },
        {
            "TotalAmt": 1100,
            "Line": []
        },
        {
            "TotalAmt": 2400,
            "Line": []
        },
        {
            "TotalAmt": 1750,
            "Line": []
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    accounts: [
      {Name: 'Business Checking Account', AccountType: 'Bank'},
      {Name: 'Savings Account', AccountType: 'Bank'},
      {Name: 'Accounts Receivable', AccountType: 'Accounts Receivable'},
      {Name: 'Sales Revenue', AccountType: 'Income'},
      {Name: 'Consulting Revenue', AccountType: 'Income'},
      {Name: 'Product Sales', AccountType: 'Income'},
      {Name: 'Office Expenses', AccountType: 'Expense'},
      {Name: 'Rent Expense', AccountType: 'Expense'},
      {Name: 'Utilities Expense', AccountType: 'Expense'},
      {Name: 'Marketing Expense', AccountType: 'Expense'},
      {Name: 'Travel Expense', AccountType: 'Expense'},
      {Name: 'Insurance Expense', AccountType: 'Expense'},
      {Name: 'Equipment', AccountType: 'Other Current Asset'},
      {Name: 'Accounts Payable', AccountType: 'Accounts Payable'},
      {Name: 'Sales Tax Payable', AccountType: 'Other Current Liability'}
    ],
    customers: [
      {
        DisplayName: 'Acme Corporation',
        CompanyName: 'Acme Corporation',
        PrimaryEmailAddr: {Address: 'billing@acme.com'},
        BillAddr: {
          Line1: '123 Business Street',
          City: 'San Francisco',
          CountrySubDivisionCode: 'CA',
          PostalCode: '94105'
        }
      },
      {
        DisplayName: 'Tech Start Inc',
        CompanyName: 'Tech Start Inc',
        PrimaryEmailAddr: {Address: 'accounts@techstart.io'},
        BillAddr: {
          Line1: '456 Innovation Drive',
          City: 'Palo Alto',
          CountrySubDivisionCode: 'CA',
          PostalCode: '94301'
        }
      },
      {
        DisplayName: 'Global Enterprises LLC',
        CompanyName: 'Global Enterprises LLC',
        PrimaryEmailAddr: {Address: 'finance@globalent.com'},
        BillAddr: {
          Line1: '789 Commerce Ave',
          City: 'New York',
          CountrySubDivisionCode: 'NY',
          PostalCode: '10001'
        }
      },
      {
        DisplayName: 'Blue Sky Solutions',
        CompanyName: 'Blue Sky Solutions',
        PrimaryEmailAddr: {Address: 'billing@bluesky.com'}
      },
      {
        DisplayName: 'Metro Systems Corp',
        CompanyName: 'Metro Systems Corp',
        PrimaryEmailAddr: {Address: 'ap@metrosystems.com'}
      },
      {
        DisplayName: 'Sunrise Technologies',
        CompanyName: 'Sunrise Technologies',
        PrimaryEmailAddr: {Address: 'accounting@sunrise.tech'}
      },
      {
        DisplayName: 'Pacific Coast Partners',
        CompanyName: 'Pacific Coast Partners',
        PrimaryEmailAddr: {Address: 'billing@pacificcoast.com'}
      },
      {
        DisplayName: 'Quantum Dynamics Inc',
        CompanyName: 'Quantum Dynamics Inc',
        PrimaryEmailAddr: {Address: 'invoices@quantum.com'}
      },
      {
        DisplayName: 'Silver Lining Consulting',
        CompanyName: 'Silver Lining Consulting',
        PrimaryEmailAddr: {Address: 'payments@silverlining.co'}
      },
      {
        DisplayName: 'Mountain View Associates',
        CompanyName: 'Mountain View Associates',
        PrimaryEmailAddr: {Address: 'finance@mountainview.com'}
      },
      {
        DisplayName: 'Urban Development Group',
        CompanyName: 'Urban Development Group',
        PrimaryEmailAddr: {Address: 'billing@urbandev.com'}
      },
      {
        DisplayName: 'Coastal Innovations',
        CompanyName: 'Coastal Innovations',
        PrimaryEmailAddr: {Address: 'accounting@coastal.io'}
      },
      {
        DisplayName: 'Premier Business Services',
        CompanyName: 'Premier Business Services',
        PrimaryEmailAddr: {Address: 'accounts@premier.biz'}
      },
      {
        DisplayName: 'NextGen Solutions',
        CompanyName: 'NextGen Solutions',
        PrimaryEmailAddr: {Address: 'billing@nextgen.com'}
      },
      {
        DisplayName: 'Digital Horizon Corp',
        CompanyName: 'Digital Horizon Corp',
        PrimaryEmailAddr: {Address: 'invoicing@digitalhorizon.com'}
      }
    ],
    vendors: [
      {DisplayName: 'Office Supply Company', CompanyName: 'Office Supply Company'},
      {DisplayName: 'Cloud Services Provider', CompanyName: 'Cloud Services Provider'},
      {
        DisplayName: 'Marketing Agency Solutions',
        CompanyName: 'Marketing Agency Solutions'
      },
      {DisplayName: 'Legal Services Partners', CompanyName: 'Legal Services Partners'},
      {DisplayName: 'Telecommunications Inc', CompanyName: 'Telecommunications Inc'},
      {
        DisplayName: 'Equipment Rental Company',
        CompanyName: 'Equipment Rental Company'
      },
      {DisplayName: 'Insurance Brokers LLC', CompanyName: 'Insurance Brokers LLC'},
      {
        DisplayName: 'Property Management Group',
        CompanyName: 'Property Management Group'
      },
      {DisplayName: 'IT Services Consultant', CompanyName: 'IT Services Consultant'},
      {DisplayName: 'Accounting Services Co', CompanyName: 'Accounting Services Co'},
      {
        DisplayName: 'Shipping & Logistics Inc',
        CompanyName: 'Shipping & Logistics Inc'
      },
      {DisplayName: 'Web Development Studio', CompanyName: 'Web Development Studio'},
      {
        DisplayName: 'Facility Maintenance Services',
        CompanyName: 'Facility Maintenance Services'
      },
      {
        DisplayName: 'Professional Training Corp',
        CompanyName: 'Professional Training Corp'
      },
      {
        DisplayName: 'Security Systems Provider',
        CompanyName: 'Security Systems Provider'
      }
    ],
    invoices: [
      {
        Line: [
          {
            Amount: 1500,
            DetailType: 'SalesItemLineDetail',
            Description: 'Consulting Services - Strategic Planning',
            SalesItemLineDetail: {Qty: 10, UnitPrice: 150}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2500,
            DetailType: 'SalesItemLineDetail',
            Description: 'Software Development Services',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 125}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Monthly Maintenance Agreement',
            SalesItemLineDetail: {Qty: 1, UnitPrice: 800}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 3200,
            DetailType: 'SalesItemLineDetail',
            Description: 'Custom Application Development',
            SalesItemLineDetail: {Qty: 32, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1200,
            DetailType: 'SalesItemLineDetail',
            Description: 'Project Management Services',
            SalesItemLineDetail: {Qty: 12, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 950,
            DetailType: 'SalesItemLineDetail',
            Description: 'Business Analysis and Requirements',
            SalesItemLineDetail: {Qty: 10, UnitPrice: 95}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Training and Documentation',
            SalesItemLineDetail: {Qty: 18, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2200,
            DetailType: 'SalesItemLineDetail',
            Description: 'System Integration Services',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 110}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1600,
            DetailType: 'SalesItemLineDetail',
            Description: 'Quality Assurance and Testing',
            SalesItemLineDetail: {Qty: 16, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Database Design and Implementation',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 140}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1400,
            DetailType: 'SalesItemLineDetail',
            Description: 'Security Audit Services',
            SalesItemLineDetail: {Qty: 14, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 3000,
            DetailType: 'SalesItemLineDetail',
            Description: 'Cloud Migration Services',
            SalesItemLineDetail: {Qty: 30, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1100,
            DetailType: 'SalesItemLineDetail',
            Description: 'Performance Optimization',
            SalesItemLineDetail: {Qty: 11, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2400,
            DetailType: 'SalesItemLineDetail',
            Description: 'API Development and Integration',
            SalesItemLineDetail: {Qty: 24, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1750,
            DetailType: 'SalesItemLineDetail',
            Description: 'Mobile Application Development',
            SalesItemLineDetail: {Qty: 14, UnitPrice: 125}
          }
        ]
      }
    ],
    payments: [
      {TotalAmt: 1500, Line: []},
      {TotalAmt: 2500, Line: []},
      {TotalAmt: 800, Line: []},
      {TotalAmt: 3200, Line: []},
      {TotalAmt: 1200, Line: []},
      {TotalAmt: 950, Line: []},
      {TotalAmt: 1800, Line: []},
      {TotalAmt: 2200, Line: []},
      {TotalAmt: 1600, Line: []},
      {TotalAmt: 2800, Line: []},
      {TotalAmt: 1400, Line: []},
      {TotalAmt: 3000, Line: []},
      {TotalAmt: 1100, Line: []},
      {TotalAmt: 2400, Line: []},
      {TotalAmt: 1750, Line: []}
    ]
  })
};

fetch('https://api.klavis.ai/sandbox/quickbooks/{sandbox_id}/initialize', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    accounts: [
      {Name: 'Business Checking Account', AccountType: 'Bank'},
      {Name: 'Savings Account', AccountType: 'Bank'},
      {Name: 'Accounts Receivable', AccountType: 'Accounts Receivable'},
      {Name: 'Sales Revenue', AccountType: 'Income'},
      {Name: 'Consulting Revenue', AccountType: 'Income'},
      {Name: 'Product Sales', AccountType: 'Income'},
      {Name: 'Office Expenses', AccountType: 'Expense'},
      {Name: 'Rent Expense', AccountType: 'Expense'},
      {Name: 'Utilities Expense', AccountType: 'Expense'},
      {Name: 'Marketing Expense', AccountType: 'Expense'},
      {Name: 'Travel Expense', AccountType: 'Expense'},
      {Name: 'Insurance Expense', AccountType: 'Expense'},
      {Name: 'Equipment', AccountType: 'Other Current Asset'},
      {Name: 'Accounts Payable', AccountType: 'Accounts Payable'},
      {Name: 'Sales Tax Payable', AccountType: 'Other Current Liability'}
    ],
    customers: [
      {
        DisplayName: 'Acme Corporation',
        CompanyName: 'Acme Corporation',
        PrimaryEmailAddr: {Address: 'billing@acme.com'},
        BillAddr: {
          Line1: '123 Business Street',
          City: 'San Francisco',
          CountrySubDivisionCode: 'CA',
          PostalCode: '94105'
        }
      },
      {
        DisplayName: 'Tech Start Inc',
        CompanyName: 'Tech Start Inc',
        PrimaryEmailAddr: {Address: 'accounts@techstart.io'},
        BillAddr: {
          Line1: '456 Innovation Drive',
          City: 'Palo Alto',
          CountrySubDivisionCode: 'CA',
          PostalCode: '94301'
        }
      },
      {
        DisplayName: 'Global Enterprises LLC',
        CompanyName: 'Global Enterprises LLC',
        PrimaryEmailAddr: {Address: 'finance@globalent.com'},
        BillAddr: {
          Line1: '789 Commerce Ave',
          City: 'New York',
          CountrySubDivisionCode: 'NY',
          PostalCode: '10001'
        }
      },
      {
        DisplayName: 'Blue Sky Solutions',
        CompanyName: 'Blue Sky Solutions',
        PrimaryEmailAddr: {Address: 'billing@bluesky.com'}
      },
      {
        DisplayName: 'Metro Systems Corp',
        CompanyName: 'Metro Systems Corp',
        PrimaryEmailAddr: {Address: 'ap@metrosystems.com'}
      },
      {
        DisplayName: 'Sunrise Technologies',
        CompanyName: 'Sunrise Technologies',
        PrimaryEmailAddr: {Address: 'accounting@sunrise.tech'}
      },
      {
        DisplayName: 'Pacific Coast Partners',
        CompanyName: 'Pacific Coast Partners',
        PrimaryEmailAddr: {Address: 'billing@pacificcoast.com'}
      },
      {
        DisplayName: 'Quantum Dynamics Inc',
        CompanyName: 'Quantum Dynamics Inc',
        PrimaryEmailAddr: {Address: 'invoices@quantum.com'}
      },
      {
        DisplayName: 'Silver Lining Consulting',
        CompanyName: 'Silver Lining Consulting',
        PrimaryEmailAddr: {Address: 'payments@silverlining.co'}
      },
      {
        DisplayName: 'Mountain View Associates',
        CompanyName: 'Mountain View Associates',
        PrimaryEmailAddr: {Address: 'finance@mountainview.com'}
      },
      {
        DisplayName: 'Urban Development Group',
        CompanyName: 'Urban Development Group',
        PrimaryEmailAddr: {Address: 'billing@urbandev.com'}
      },
      {
        DisplayName: 'Coastal Innovations',
        CompanyName: 'Coastal Innovations',
        PrimaryEmailAddr: {Address: 'accounting@coastal.io'}
      },
      {
        DisplayName: 'Premier Business Services',
        CompanyName: 'Premier Business Services',
        PrimaryEmailAddr: {Address: 'accounts@premier.biz'}
      },
      {
        DisplayName: 'NextGen Solutions',
        CompanyName: 'NextGen Solutions',
        PrimaryEmailAddr: {Address: 'billing@nextgen.com'}
      },
      {
        DisplayName: 'Digital Horizon Corp',
        CompanyName: 'Digital Horizon Corp',
        PrimaryEmailAddr: {Address: 'invoicing@digitalhorizon.com'}
      }
    ],
    vendors: [
      {DisplayName: 'Office Supply Company', CompanyName: 'Office Supply Company'},
      {DisplayName: 'Cloud Services Provider', CompanyName: 'Cloud Services Provider'},
      {
        DisplayName: 'Marketing Agency Solutions',
        CompanyName: 'Marketing Agency Solutions'
      },
      {DisplayName: 'Legal Services Partners', CompanyName: 'Legal Services Partners'},
      {DisplayName: 'Telecommunications Inc', CompanyName: 'Telecommunications Inc'},
      {
        DisplayName: 'Equipment Rental Company',
        CompanyName: 'Equipment Rental Company'
      },
      {DisplayName: 'Insurance Brokers LLC', CompanyName: 'Insurance Brokers LLC'},
      {
        DisplayName: 'Property Management Group',
        CompanyName: 'Property Management Group'
      },
      {DisplayName: 'IT Services Consultant', CompanyName: 'IT Services Consultant'},
      {DisplayName: 'Accounting Services Co', CompanyName: 'Accounting Services Co'},
      {
        DisplayName: 'Shipping & Logistics Inc',
        CompanyName: 'Shipping & Logistics Inc'
      },
      {DisplayName: 'Web Development Studio', CompanyName: 'Web Development Studio'},
      {
        DisplayName: 'Facility Maintenance Services',
        CompanyName: 'Facility Maintenance Services'
      },
      {
        DisplayName: 'Professional Training Corp',
        CompanyName: 'Professional Training Corp'
      },
      {
        DisplayName: 'Security Systems Provider',
        CompanyName: 'Security Systems Provider'
      }
    ],
    invoices: [
      {
        Line: [
          {
            Amount: 1500,
            DetailType: 'SalesItemLineDetail',
            Description: 'Consulting Services - Strategic Planning',
            SalesItemLineDetail: {Qty: 10, UnitPrice: 150}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2500,
            DetailType: 'SalesItemLineDetail',
            Description: 'Software Development Services',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 125}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Monthly Maintenance Agreement',
            SalesItemLineDetail: {Qty: 1, UnitPrice: 800}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 3200,
            DetailType: 'SalesItemLineDetail',
            Description: 'Custom Application Development',
            SalesItemLineDetail: {Qty: 32, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1200,
            DetailType: 'SalesItemLineDetail',
            Description: 'Project Management Services',
            SalesItemLineDetail: {Qty: 12, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 950,
            DetailType: 'SalesItemLineDetail',
            Description: 'Business Analysis and Requirements',
            SalesItemLineDetail: {Qty: 10, UnitPrice: 95}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Training and Documentation',
            SalesItemLineDetail: {Qty: 18, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2200,
            DetailType: 'SalesItemLineDetail',
            Description: 'System Integration Services',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 110}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1600,
            DetailType: 'SalesItemLineDetail',
            Description: 'Quality Assurance and Testing',
            SalesItemLineDetail: {Qty: 16, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2800,
            DetailType: 'SalesItemLineDetail',
            Description: 'Database Design and Implementation',
            SalesItemLineDetail: {Qty: 20, UnitPrice: 140}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1400,
            DetailType: 'SalesItemLineDetail',
            Description: 'Security Audit Services',
            SalesItemLineDetail: {Qty: 14, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 3000,
            DetailType: 'SalesItemLineDetail',
            Description: 'Cloud Migration Services',
            SalesItemLineDetail: {Qty: 30, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1100,
            DetailType: 'SalesItemLineDetail',
            Description: 'Performance Optimization',
            SalesItemLineDetail: {Qty: 11, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 2400,
            DetailType: 'SalesItemLineDetail',
            Description: 'API Development and Integration',
            SalesItemLineDetail: {Qty: 24, UnitPrice: 100}
          }
        ]
      },
      {
        Line: [
          {
            Amount: 1750,
            DetailType: 'SalesItemLineDetail',
            Description: 'Mobile Application Development',
            SalesItemLineDetail: {Qty: 14, UnitPrice: 125}
          }
        ]
      }
    ],
    payments: [
      {TotalAmt: 1500, Line: []},
      {TotalAmt: 2500, Line: []},
      {TotalAmt: 800, Line: []},
      {TotalAmt: 3200, Line: []},
      {TotalAmt: 1200, Line: []},
      {TotalAmt: 950, Line: []},
      {TotalAmt: 1800, Line: []},
      {TotalAmt: 2200, Line: []},
      {TotalAmt: 1600, Line: []},
      {TotalAmt: 2800, Line: []},
      {TotalAmt: 1400, Line: []},
      {TotalAmt: 3000, Line: []},
      {TotalAmt: 1100, Line: []},
      {TotalAmt: 2400, Line: []},
      {TotalAmt: 1750, Line: []}
    ]
  })
};

fetch('https://api.klavis.ai/sandbox/quickbooks/{sandbox_id}/initialize', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "sandbox_id": "<string>",
  "message": "<string>"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete QuickBooks sandbox data structure

Note: For dump operations, accounts/customers/etc. will contain full API response objects with additional fields beyond the minimal input schema. This is expected behavior.

accounts
Accounts · object[] | null

List of accounts (input: minimal, output: full API objects)

customers
Customers · object[] | null

List of customers (input: minimal, output: full API objects)

vendors
Vendors · object[] | null

List of vendors (input: minimal, output: full API objects)

invoices
Invoices · object[] | null

List of invoices (input: minimal, output: full API objects)

payments
Payments · object[] | null

List of payments (input: minimal, output: full API objects)

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message