From 9fe5a99dbe86b6b8991845f61c82b38fe52c16be Mon Sep 17 00:00:00 2001 From: Joseph Murphy III Date: Wed, 20 Sep 2017 11:25:01 -0500 Subject: [PATCH] Add search contact search capability POST /search-contacts/contacts This method allows to search contacts without saving the search. Request body contains a query, structured according to our reference and response is a collection of contacts meeting the criteria. --- src/GetResponseAPI3.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/GetResponseAPI3.class.php b/src/GetResponseAPI3.class.php index 2782e2f..e39589d 100644 --- a/src/GetResponseAPI3.class.php +++ b/src/GetResponseAPI3.class.php @@ -162,6 +162,17 @@ public function searchContacts($params = null) { return $this->call('search-contacts?' . $this->setParams($params)); } + + /** + * search for contacts without saving a search contact record + * + * @param $params + * @return mixed + */ + public function contactSearch($params = array()) + { //print_r(json_decode(json_encode($this->call('search-contacts/contacts', 'POST', $params)), true)); + return $this->call('search-contacts/contacts', 'POST', $params); + } /** * retrieve segment @@ -403,4 +414,4 @@ private function setParams($params = array()) return http_build_query($result); } -} \ No newline at end of file +}