Solved
REST API - Filetring not working as expected for invalid data types.
We noticed that there are cases when invalid values are passed to filters but those are not validated.
Example:
Example:
- In case of this call: https://190-yef-239.mktorest.com/rest/v1/opportunities/roles.json?filterValues=test12&filterType=leadId&fields=createdAt an error is thrown by the API stating: "Invalid value for field 'leadId' and value 'test12'.
- In case of this call: https://190-yef-239.mktorest.com/rest/v1/namedaccounts.json?filterValues=test123%2C1&filterType=approximateNumOfPeople&fields=approximateNumOfPeople
- In case of this call: https://190-yef-239.mktorest.com/rest/v1/namedaccounts.json?filterValues=test123%2C1&filterType=approximateNumOfPeople&fields=approximateNumOfPeople
no error is thrown and results are returned from the API. All the returned results contain approximateNumOfPeople=0 so I assume a default value is being picked up.
Other than not throwin an error, this is returning invalid results.
Other than not throwin an error, this is returning invalid results.