MyRapidi
MyRapidi

Search our Wiki

Bad Request - Error in query syntax

What this error means: The REST service returned a status code that is not 20x - i.e. not OK - Status code received: 400 Bad Request Response body: {"error {"code":"0x80060888","message":"Bad Request - Error in query syntax."}}.Data Sent to REST service:{"creditlimit":55000,"transactioncurrencyid@odata.bind":"/transactioncurrencies(USD)"}
Dynamics 365 Sales couldn't process your request because something in the data structure is incorrect. This happens before D365 even validates the business logic - it's a formatting or syntax issue.

Instead of { "creditlimit": 55000, "transactioncurrencyid@odata.bind": "/transactioncurrencies(USD)" }, it should be { "creditlimit": 55000, "transactioncurrencyid@odata.bind": "/transactioncurrencies(a3b2c1d4-e5f6-7890-abcd-ef1234567890)" }.


Common causes: 
1. Lookup fields using codes/names instead of GUIDs 
2. Invalid GUID format (must be: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) 
3. Wrong entity name in @odata.bind (check plural vs singular) 
4. Field name doesn't exist or contains typo 
5. Data type mismatch (string sent for number field, etc.) 

Troubleshooting steps: 
- Validate all GUIDs are properly formatted 
- Verify entity logical names in D365 
- Check field names match exactly (case-sensitive) 
- Test with minimal payload (one field at a time)