{"id":"4cffa7f7-8c60-40ea-8299-d4824f8c06ff","task":"Use the QuickBooks Online query language (AQL) to filter and retrieve entities via the /query endpoint","domain":"developer.intuit.com","steps":["Send a GET or POST to /v3/company/{realmId}/query with the 'query' parameter set to a SQL-like SELECT statement","Basic form: SELECT * FROM Invoice WHERE TxnDate >= '2024-01-01' AND TxnDate <= '2024-12-31'","Use STARTPOSITION and MAXRESULTS clauses for pagination: SELECT * FROM Customer STARTPOSITION 1 MAXRESULTS 100","Filter by metadata timestamps for incremental sync: WHERE MetaData.LastUpdatedTime >= '2024-06-01T00:00:00'","Use COUNT(*) queries to estimate result size before fetching pages","Handle the 'QueryResponse' envelope in the response; check 'totalCount' and 'startPosition' to drive pagination loops"],"gotchas":["Not all fields on every entity are filterable or sortable via AQL; filtering on an unsupported field returns a 400 rather than an empty result set","String comparisons in AQL are case-sensitive for some fields; test filter expressions against known data before relying on them in production","MAXRESULTS has an upper bound per entity type (consult current docs); requesting more than the limit silently returns only the maximum allowed"],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/4cffa7f7-8c60-40ea-8299-d4824f8c06ff"}