QuickBooks Online error 4000 "Error parsing query"
Updated
Use QueryParserError to locate the syntax QuickBooks rejected, including a customer name with an apostrophe.
QuickBooks Online returns Error parsing query with code 4000. The QueryParserError detail can give you a line and column in the query text.
| What we checked | Where |
|---|---|
| API error code 4000 | Intuit |
| Query syntax and apostrophe escaping | Intuit |
| Customer-name filter with a lexical error | Stack Overflow |
Check it yourself
- Read the decoded query the connector sent. Find the column reported in
Detailand inspect the text around it. - Check single-quoted values for embedded apostrophes. Put a backslash before the embedded apostrophe in the query itself, as in
'O\'Brien'. - For a customer lookup, run
SELECT * FROM Customerin the API Explorer, then add the correctedWHEREfilter.
Still failing?
Email the parser detail and a redacted copy of the query 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.