Skip to content

Commit

Permalink
Merge pull request #192 from YegorChabanov/add-example-of-getting-con…
Browse files Browse the repository at this point in the history
…tact-specific-properties-to-readme

add example of how to get contact specific properties to readme file
  • Loading branch information
ksvirkou-hubspot authored Dec 7, 2022
2 parents e03278a + 39d3ffd commit 6ee6b8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ $filterGroup->setFilters([$filter]);
$searchRequest = new \HubSpot\Client\Crm\Contacts\Model\PublicObjectSearchRequest();
$searchRequest->setFilterGroups([$filterGroup]);

// Get specific properties
$searchRequest->setProperties(['firstname', 'lastname', 'date_of_birth', 'email']);

// @var CollectionResponseWithTotalSimplePublicObject $contactsPage
$contactsPage = $hubspot->crm()->contacts()->searchApi()->doSearch($searchRequest);
```
Expand Down

0 comments on commit 6ee6b8e

Please sign in to comment.