XML-RPC Invoice Table query not working

I pulled a query directly from the sample query that’s given aka the DataService.query method the goal is to list all invoices for a specific client to begin with. I am getting Failed to invoke method query in class com.infusionsoft.api.xmlrpc.XmlRpcDataService: null. Is something wrong with DataService.query method perhaps or is this related to the Invoice table only? Attached below is my query with identifying information anonymized

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>DataService.query</methodName>
  <params>
    <param>
      <value><string>{MyAPIKey]</string></value>
    </param>
    <param>
      <value><string>Invoice</string></value>
    </param>
    <param>
      <value><int>1</int></value>
    </param>
    <param>
      <value><int>0</int></value>
    </param>
    <param>
      <value><struct>
        <!-- Empty struct to select all -->
      </struct></value>
    </param>
    <param>
      <value><array>
        <data>
          <value><string>Id</string></value>
          <value><string>ContactId</string></value>
        </data>
      </array></value>
    </param>
    <param>
      <value><string>orderBy</string></value>
    </param>
    <param>
      <value><boolean>1</boolean></value>
    </param>
  </params>
</methodCall>

You appear to have an orderBy in there in a place where the proper value should be the column name. Try changing it to Id and it should work correctly.

1 Like

Tom with the save again thanks! I thought the term orderBy there was a hard string and not a field that we needed to place a value in