Skip to content

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 checkedWhere
API error code 4001Intuit
Query filters and paginationIntuit
Purchase query rejected on EntityRefStack Overflow

Check it yourself

  • Read Detail for the property QuickBooks rejected. For the reported Purchase query, remove the EntityRef condition.
  • 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 STARTPOSITION and MAXRESULTS to 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.