LedgerWire

Host · Query

simulated in sandbox

HostQuery

HostQuery tells you which QuickBooks product and version is running and which qbXML versions it supports. Use it to pick the highest qbXML version you can send.

qbXML request

HostQueryRq
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <HostQueryRq requestID="1">
    </HostQueryRq>
  </QBXMLMsgsRq>
</QBXML>

JSON equivalent

GET /v1/company
GET /v1/company

The host block is returned inside /v1/company.

curl
curl "https://ledgerwire.vibiz.app/v1/company" \
  -H "Authorization: Bearer $LEDGERWIRE_KEY"
Sends this exact qbXML to the shared demo sandbox (simulated sample data).

qbXML response (from the sandbox seed data)

HostQueryRs
<?xml version="1.0" ?>
<QBXML>
  <QBXMLMsgsRs>
    <HostQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
      <HostRet>
        <Country>US</Country>
        <IsAutomaticLogin>false</IsAutomaticLogin>
        <MajorVersion>34</MajorVersion>
        <MinorVersion>0</MinorVersion>
        <ProductName>QuickBooks Enterprise Solutions 24.0 (LedgerWire simulated sandbox)</ProductName>
        <QbFileMode>MultiUser</QbFileMode>
        <SupportedQBXMLVersion>1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0</SupportedQBXMLVersion>
      </HostRet>
    </HostQueryRs>
  </QBXMLMsgsRs>
</QBXML>

FAQ

Which qbXML version should I send?

The highest one listed in SupportedQBXMLVersion. LedgerWire sends 13.0 and steps down automatically for older QuickBooks releases that report a lower version.

Does the Web Connector send HostQuery for me?

Yes. On the first sendRequestXML of a session, the strHCPResponse argument contains HostQuery, CompanyQuery and PreferencesQuery responses. LedgerWire reads it to fill in the connection’s version and edition.

Can I tell Pro from Enterprise?

ProductName says it, for example "QuickBooks Enterprise Solutions 24.0". LedgerWire shows the parsed edition on each connection.

Sandbox fidelity

The LedgerWire sandbox simulates HostQuery 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.

Other Query messages

Skip the XML: call GET /v1/company with JSON.

Get a free sandbox key