Company · Query
simulated in sandboxCompanyQuery
CompanyQuery returns the open company file’s name, legal name, address, fiscal year settings and subscribed services. Integrations run it first to confirm they are talking to the right file.
qbXML request
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<CompanyQueryRq requestID="1">
</CompanyQueryRq>
</QBXMLMsgsRq>
</QBXML>JSON equivalent
GET /v1/companycurl "https://ledgerwire.vibiz.app/v1/company" \
-H "Authorization: Bearer $LEDGERWIRE_KEY"qbXML response (from the sandbox seed data)
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<CompanyQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<CompanyRet>
<Address>
<Addr1>410 Harborview Industrial Pkwy</Addr1>
<City>Columbus</City>
<State>OH</State>
<PostalCode>43215</PostalCode>
<Country>US</Country>
</Address>
<CompanyName>Harborview Trade Supply (sandbox)</CompanyName>
<CompanyType>Construction</CompanyType>
<Email>books@harborview.example</Email>
<FirstMonthFiscalYear>January</FirstMonthFiscalYear>
<FirstMonthIncomeTaxYear>January</FirstMonthIncomeTaxYear>
<IsSampleCompany>false</IsSampleCompany>
<LegalCompanyName>Harborview Trade Supply LLC</LegalCompanyName>
<Phone>(614) 555-0142</Phone>
</CompanyRet>
</CompanyQueryRs>
</QBXMLMsgsRs>
</QBXML>FAQ
Do I need CompanyQuery before other requests?
No, but it is the cheapest way to confirm which company file the Web Connector opened. LedgerWire stores the company name from it on every connection.
Does CompanyQuery work in QuickBooks Pro?
Yes. It is available in every desktop edition (Pro, Premier, Accountant and Enterprise) and every qbXML version.
How do I run it without writing XML?
GET /v1/company returns the same data as JSON.
Sandbox fidelity
The LedgerWire sandbox simulates CompanyQuery with QuickBooks rules: required fields, element names, refs that must exist (3140), unique names (3100), field lengths (3070) and EditSequence locking (3200). Tax calculation, custom fields and preferences are not simulated.
Skip the XML: call GET /v1/company with JSON.
Get a free sandbox key