Developer ToolsFree generatorPDF, Excel, Word exportSage Intacct

Sage Intacct XML readByQuery Request Generator

Sage Intacct exposes its data through an XML gateway. The readByQuery function is the workhorse for pulling vendors, customers, bills and accounts, and this generator produces a correct envelope.

Fill in

Generated code
Download:

POST to https://api.intacct.com/ia/xml/xmlgw.phtml

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <control>
    <senderid>mysenderid</senderid>
    <password>SENDER_PASSWORD</password>
    <controlid>readbyquery-001</controlid>
    <uniqueid>false</uniqueid>
    <dtdversion>3.0</dtdversion>
    <includewhitespace>false</includewhitespace>
  </control>
  <operation>
    <authentication>
      <login>
        <userid>ws_user</userid>
        <companyid>MYCOMPANY</companyid>
        <password>USER_PASSWORD</password>
      </login>
    </authentication>
    <content>
      <function controlid="f1">
        <readByQuery>
          <object>VENDOR</object>
          <fields>VENDORID,NAME,STATUS</fields>
          <query>STATUS = 'active'</query>
          <pagesize>100</pagesize>
        </readByQuery>
      </function>
    </content>
  </operation>
</request>

Send with Content-Type text/xml. The sender ID and password are issued to the integration developer and the web services user must be granted API access in Intacct. Field names vary by object, and large result sets are paged with readMore, so check the object reference for your release. Escape ampersands and angle brackets in query values.

Finance data integration review

Optional: an expert review of how you extract and use Intacct data.

Optional. The tool and every export work without this. No spam.

How to use the request

Enter your sender credentials, your web services user and company ID, then choose the object, the fields and an optional query. Post the output to the gateway URL from Postman, curl or your own code. Start with a small page size and a narrow query to check authentication, then widen the filter once it returns the rows you expect.

Structure of the envelope

A request has a control block that identifies the sender, and an operation block holding authentication and content. Inside content each function carries its own controlid so responses can be matched. readByQuery returns a result with a numremaining count and a resultId, and you continue with readMore until nothing remains. Sender and user are separate identities, which surprises many first-time developers.

  • Use unique control IDs in batched requests
  • Page with readMore, not a very large pagesize
  • Store credentials outside source control

Common mistakes

Typical errors include confusing the sender ID with the user ID, forgetting to authorize the sender in the company's Web Services authorizations, and using display labels instead of object field names. Unescaped characters in the query cause malformed XML, and a company with multi-entity setup may need a location ID in the login block.

Frequently Asked Questions

What is the gateway URL?

Requests are posted to https://api.intacct.com/ia/xml/xmlgw.phtml as XML. The same endpoint accepts all functions, with the operation described inside the document.

What is the difference between sender and user?

The sender identifies the developer or application and is authorized per company. The user is the company user whose permissions the request runs under. Both are required.

How do I page through large results?

readByQuery returns a result ID and the number of records remaining. Call readMore with that result ID until the remaining count reaches zero.

Is there a newer API than XML?

Intacct also offers a REST API in newer releases. The XML gateway remains widely used, so confirm which suits your project and what your version supports.

If you pull Intacct data into planning or reporting regularly, we can help design a secure integration. Ask about an integration review.