One more (hopefully helpful) response on this... Here is the comment section of the Foxpro subroutine I wrote to run free queries via URL integration. Covers some of the experiences I have had doing integration queries:
REMEMBER! Field names in queries are case sensitive! Field names (in the database) are usually ALL CAPS. The actual database field name of a field can be viewed in the DocuWare Administration desktop application. Queries place field name in square brackets and the value on double-quotes. Though, for numeric fields, the quotes appear to be optional. Operators can have whitespace around them. Here are example query expressions:
[DWDOCID]=123 && Query by the internal document ID.
[CUST_NO] = "WA60" && Query field "CUST_NO" to exactly match "WA60".
[LASTNAME] LIKE "K*" && Wildcard search.
[SHIPTO_STATE] = EMPTY() && Query SHIPTO_STATE for empty values.
[BILLTO_STATE] = NOTEMPTY() && Query BILLTO_STATE for non-empty values.
[DocuWareFulltext] = "find this string" && Full-text search.
[DWSTOREDATETIME] > 2017-06-14 19:45:31 && Date/time expression.
[START_DATE] >= 2016-06-01 AND [START_DATE] <= 2016-08-01 && Boolean conditional.
Expressions can be joined by AND or OR and can be qualified with NOT. Delimiters around string values MUST be double-quotes. Also, the conditional statements and compound keywords (e.g. LIKE, AND, OR, etc.) need to be capitalized as well. If multiple documents are found, a result list is displayed in the browser. If only one document matches the search, it is directly displayed.
*** SPECIAL NOTE WHEN USING DATE/TIME FIELDS *** Date/time fields are stored in DocuWare as UTC timestamps. While queries in the web client or Platform SDK allow the use of local date/time formats, URL Integration queries appear to use the date/times passed in as-is and compare against the stored UTC timestamps. So, if you are using date/time fields in your query, the date/time values need to be converted to UTC to get accurate results.