AnsweredAssumed Answered

Can regular expressions filter records in an API GET request?

Question asked by Greg Billings on Nov 14, 2019
Latest reply on Nov 18, 2019 by André Lopes

I want to get contact records via the API, but I want to filter them based on phone number so I don't have to get a list of every contact record every time I run the code. I want to do something like the following to search for:

(727) 528-2823 or

727-528-2823 or

1-(727) 528-2823 or

1-727-528-2823 or

727 528 2823 etc

 

{    "filter":[       {          "phone_home":"^\D?\D?\D?727\D?\D?528\D?2823\D?$"       }    ] }

Outcomes