A 400 error simply means something is wrong with your request. This is a very generic error and for anyone to help you would need to provide more information about the api call you’re attempting to make.
400 Bad Request happens when something is wrong with the request you are making to the HubSpot Deals search API. This perhaps due to invalid parameters, authentication issues or server problems – Please try again. to get this fixed
Hmmm, a couple things I see:
- Property Name in the filter should be propertyName
- you don’t need to send deal in HS Object - the call is made to /crm/v3/objects/deals/search so you already know that
- the final comma is not needed and may cause an issue
- not sure why you have after set at 10000 - set to zero for first page of results (or leave out altogether I think)
- add the properties parameter and provide a list of properties you want returned
The same configuration works fine when the limit less than 10000, is that " After: 10000 " is causing the issue? The parameters look like this as I am using workato to ingest the data.
The search endpoints are rate limited to four requests per second. A query can contain a maximum of 3,000 characters. If the body of your request exceeds 3,000 characters, a 400 error will be returned. The search endpoints are limited to 10,000 total results for any given query. Attempting to page beyond 10,000 will result in a 400 error.
Could you please suggest if there are more than 10K records, how do I get the records from the API?
For example, if the search API returns 10,043, how to retrieve the last 43 records? Do you have any sample API requests for obtaining the last 43 records?
No, I don’t. I would suggest you change your query filter to gather up records with a date that returns less than 10000. You may have to add filter for returning less records by using a start and end date (gte one date while lte another date for example). Return more records by changing the start and end dates and perform multiple searches until you have what you need.