QuickBooks Online error 4001 "QueryValidationError" on a Purchase EntityRef filter
Updated
QuickBooks Online rejects a Purchase query with QueryValidationError when the WHERE clause filters on EntityRef.
The response says Invalid query with code 4001 and the detail QueryValidationError: property 'EntityRef' is not queryable. The reported request used EntityRef in a WHERE clause on Purchase.
| What we checked | Where |
|---|---|
| API error code 4001 | Intuit |
| Query filters and pagination | Intuit |
| Purchase query rejected on EntityRef | Stack Overflow |
Check it yourself
- Read
Detailfor the property QuickBooks rejected. For the reported Purchase query, remove theEntityRefcondition. - Use the Purchase entity reference in the API Explorer to choose a supported filter. If you need the exact EntityRef match, filter the returned purchases in your integration.
- Use
STARTPOSITIONandMAXRESULTSto page through the results if the supported filters still return many purchases.
Still failing?
Email the validation detail and your redacted WHERE clause to money@iftodo.ai for a free first look. Remove names, amounts and credentials before sending.
Weekly sync checks for €29 a month
For one Shopify or Square to QuickBooks workflow, we check weekly exports for missing or duplicate records and email you when we find a mismatch. We run a sample first to see whether the two exports have matching references.
Ask for a sample check. We agree how to share exports before starting billing. Cancel by email before your next renewal.