REST API Method: search leads with field that contains a specific string ?
Hello,
I created a custom field (OtherEmails__c) which contains all the potential emails that a lead can have (besides its email field). Its format is: "email1@example.com; email2@example.com; email3@example.com". I'd like to get with the REST API method "Get Multiple Leads by Filter Type" all the leads that uses "email1@example.com" (either its default email field or its custom OtherEmails__c field).
First of all, I don't find to do this in only one request, as the method only supports one filterType (not both email and OtherEmails__c at the same time). So I must send a first request on email and if I don't find any result I send a second one on OtherEmails__c. This is too bad but it works.
My real problem is: for my second request, I don't have the full value of OtherEmails__c but only a part of it (for instance "email1@example.com; email2@example.com; email3@example.com" must match if i'm looking for "email1@example.com").
Finally, my questions are: How can I use the REST API method "Get Multiple Leads by Filter Type" to search leads whose filterType field contains one of my filterValues (and not is equal to) ? Should I use an other method ? Do I have to change the field type of OtherEmails__c ? Any advice ?
It would be much appreciated, thank you !