PHP Class SevenShores\Hubspot\Resources\Contacts

Inheritance: extends Resource
Mostra file Open project: fungku/hubspot-php Class Usage Examples

Public Methods

Method Description
all ( array $params = [] ) : Response For a given portal, return all contacts that have been created in the portal.
create ( array $properties ) : Response
createOrUpdate ( string $email, array $properties = [] ) : Response
createOrUpdateBatch ( array $contacts ) : Response
delete ( integer $id ) : Response
getBatchByEmails ( array $emails, array $params = [] ) : Response For a given portal, return information about a group of contacts by their email addresses.
getBatchByIds ( array $vids, array $params = [] ) : Response For a given portal, return information about a group of contacts by their unique ID's. A contact's unique ID's is stored in a field called 'vid' which stands for 'visitor ID'.
getBatchByTokens ( array $utks, array $params = [] ) : Response For a given portal, return information about a group of contacts by their user tokens (hubspotutk).
getByEmail ( string $email ) : Response
getById ( integer $id ) : Response
getByToken ( string $utk ) : Response
recent ( array $params = [] ) : Response For a given portal, return all contacts that have been recently updated or created.
search ( string $query, array $params = [] ) : Response For a given portal, return contacts and some data associated with those contacts by the contact's email address or name.
statistics ( ) : Response
update ( integer $id, array $properties ) : Response

Method Details

all() public method

A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page. Please Note: There are 2 fields here to pay close attention to: the "has-more" field that will let you know whether there are more contacts that you can pull from this portal, and the "vid-offset" field which will let you know where you are in the list of contacts. You can then use the "vid-offset" field in the "vidOffset" parameter described below.
See also: http://developers.hubspot.com/docs/methods/contacts/get_contacts
public all ( array $params = [] ) : Response
$params array Array of optional parameters ['count', 'property', 'vidOffset']
return SevenShores\Hubspot\Http\Response

create() public method

public create ( array $properties ) : Response
$properties array Array of contact properties.
return SevenShores\Hubspot\Http\Response

createOrUpdate() public method

public createOrUpdate ( string $email, array $properties = [] ) : Response
$email string The contact's email address.
$properties array The contact properties.
return SevenShores\Hubspot\Http\Response

createOrUpdateBatch() public method

public createOrUpdateBatch ( array $contacts ) : Response
$contacts array The contacts and properties.
return SevenShores\Hubspot\Http\Response

delete() public method

public delete ( integer $id ) : Response
$id integer
return SevenShores\Hubspot\Http\Response

getBatchByEmails() public method

This method will also return you much of the HubSpot lead "intelligence" for each requested contact record. The endpoint accepts many query parameters that allow for customization based on a variety of integration use cases.
See also: http://developers.hubspot.com/docs/methods/contacts/get_batch_by_email
public getBatchByEmails ( array $emails, array $params = [] ) : Response
$emails array Array of email adresses
$params array Array of optional parameters ['property', 'propertyMode', 'formSubmissionMode', 'showListMemberships', 'includeDeletes']
return SevenShores\Hubspot\Http\Response

getBatchByIds() public method

This method will also return you much of the HubSpot lead "intelligence" for each requested contact record. The endpoint accepts many query parameters that allow for customization based on a variety of integration use cases.
See also: http://developers.hubspot.com/docs/methods/contacts/get_batch_by_vid
public getBatchByIds ( array $vids, array $params = [] ) : Response
$vids array Array of visitor IDs
$params array Array of optional parameters ['property', 'propertyMode', 'formSubmissionMode', 'showListMemberships', 'includeDeletes']
return SevenShores\Hubspot\Http\Response

getBatchByTokens() public method

This method will also return you much of the HubSpot lead "intelligence" for each requested contact record. The endpoint accepts many query parameters that allow for customization based on a variety of integration use cases. The endpoint does not allow for CORS, so if you are looking up contacts from their user token on the client, you'll need to spin up a proxy server to interact with the API.
See also: http://developers.hubspot.com/docs/methods/contacts/get_batch_by_utk
public getBatchByTokens ( array $utks, array $params = [] ) : Response
$utks array Array of hubspot user tokens (hubspotutk)
$params array Array of optional parameters ['property', 'propertyMode', 'formSubmissionMode', 'showListMemberships', 'includeDeletes']
return SevenShores\Hubspot\Http\Response

getByEmail() public method

public getByEmail ( string $email ) : Response
$email string
return SevenShores\Hubspot\Http\Response

getById() public method

public getById ( integer $id ) : Response
$id integer
return SevenShores\Hubspot\Http\Response

getByToken() public method

public getByToken ( string $utk ) : Response
$utk string
return SevenShores\Hubspot\Http\Response

recent() public method

A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page, as specified by the "count" parameter. The endpoint only scrolls back in time 30 days.
See also: http://developers.hubspot.com/docs/methods/contacts/get_recently_updated_contacts
public recent ( array $params = [] ) : Response
$params array Array of optional parameters ['count', 'timeOffset', 'vidOffset', 'property', 'propertyMode', 'formSubmissionMode', 'showListMemberships']
return SevenShores\Hubspot\Http\Response

statistics() public method

public statistics ( ) : Response
return SevenShores\Hubspot\Http\Response

update() public method

public update ( integer $id, array $properties ) : Response
$id integer The contact id.
$properties array The contact properties to update.
return SevenShores\Hubspot\Http\Response