| java.lang.Object | |
| ↳ | org.mule.module.hubspot.HubSpotConnector |
Known Direct Subclasses
|
Known Indirect Subclasses
|
HubSpot all-in-one marketing software helps more than 8,000 companies in 56 countries attract leads and convert them into customers. A pioneer in inbound marketing, HubSpot aims to help its customers make marketing that people actually love.
The connector is using the version "v1" of the HubSpot API.
The documentation of the API can be found in this link
The main flow of the connector is "authentication" ---> HubSpot Login Page ----> "authenticationResponse" ----> Any other process of the connector
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | API_VERSION | ||||||||||
| String | HUB_SPOT_URL_API | ||||||||||
| String | HUB_SPOT_URL_AUTH | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| OFFLINE_SCOPE_PATTER | |||||||||||
| callbackUrl | The callbackUrl is the endpoint that is registered in the iApp to handle the response of the authorization call. | ||||||||||
| clientId | Your Client ID (OAuth Client ID), which identifies who you are. | ||||||||||
| clientsManager | |||||||||||
| credentialsManager | |||||||||||
| hubId | The HubSpot portal ID of the customer that you're re-directing. | ||||||||||
| logger | |||||||||||
| objectStore | The object store to store the user credentials | ||||||||||
| scope | The scopes (or permissions) you want. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Add a contact record that has already been created in the system to a contact list.
| |||||||||||
/**
This process generates the URL required to authenticate against the service.
| |||||||||||
This process is the one that handles the response of the authentication process.
| |||||||||||
Create a new contact in HubSpot with a simple HTTP POST to the Contacts API.
| |||||||||||
Create a new list in a given HubSpot portal to populate with contacts.
| |||||||||||
Create a new property in HubSpot.
| |||||||||||
For a given portal, create a new contact proprerty group.
| |||||||||||
Archive an existing contact from a particular HubSpot portal.
| |||||||||||
Delete an existing property in HubSpot.
| |||||||||||
For a given portal, delete a contact property group based on the name of the group.
| |||||||||||
For a given portal, return all contacts that have been created in the portal.
| |||||||||||
Properties in HubSpot are fields that have been created.
| |||||||||||
For a given portal, return information about a single contact by its email address.
| |||||||||||
For a given portal, return information about a single contact by its ID.
| |||||||||||
For a given portal, return information about a single contact by its User Token (hubspotutk)
API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_utk
| |||||||||||
For a given portal, return a contact list by its unique ID.
| |||||||||||
For a given portal, return statistics about that portal's contacts.
| |||||||||||
For a given portal, return contacts and some data associated with those contacts by the contact's email address or name.
| |||||||||||
For a given portal and a given list, identified by its unique ID, return a list of contacts that are in that list.
| |||||||||||
For a given portal, return a set of contact lists that you specify with the count parameter.
| |||||||||||
For a given portal, return all contact property groups that have been created in the portal.
| |||||||||||
For a given portal, return a set of dynamic contact lists that you specify with the count parameter.
| |||||||||||
For a given portal, return all email subscription information for the given email address and portal.
| |||||||||||
For a given portal, return all email subscription types that have been created in the portal.
| |||||||||||
For a given portal, return all contacts that have been recently updated or created.
| |||||||||||
Check if the User has an Access Token.
| |||||||||||
Update an existing contact in HubSpot.
| |||||||||||
Update an existing property in HubSpot.
| |||||||||||
For a given portal, update a contact property group.
| |||||||||||
For a given email address and portal, update the email type subscription status.
| |||||||||||
For a given email address and portal, update the email type subscription unsuscribing from all emails
NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
The callbackUrl is the endpoint that is registered in the iApp to handle the response of the authorization call. This endpoint also has to direct to the handleAuthentication process of the connector
Note:This param is now optional because it can be specified in the Authenticate or in here (config)
Your Client ID (OAuth Client ID), which identifies who you are. You can access the client_id in your app's developer dashboard under the Summary section.
Note:This param is now optional because it can be specified in the Authenticate or in here (config)
The HubSpot portal ID of the customer that you're re-directing. You will need to get the portal ID from the customer who you're making the request for.
In order to find the Hub ID follow this link: http://help.hubspot.com/articles/How_To_Doc/How-to-find-your-hub-id
Note:This param is now optional because it can be specified in the Authenticate or in here (config)
The object store to store the user credentials
The scopes (or permissions) you want. These should match your application settings in the Marketplace. Separate more than one scope with an space character "Ex:scope-a offline"
Important: the scope offline provides the ability to refresh the token automatically once this has expired. If you do not specify this scope, once the token expires the call to a process will throw a HubSpotConnectorAccessTokenExpiredException
Note: the scope required in the authentication must be supported by the application. This can be checked in the Application Settings, under Scopes
For a complete list of the available scopes check this link: http://developers.hubspot.com/auth/oauth_scopes
Note:This param is now optional because it can be specified in the Authenticate or in here (config)
Add a contact record that has already been created in the system to a contact list.
Please note that you cannot manually add (via this API call) contacts to dynamic lists - they can only be updated by the contacts app.
API link: http://developers.hubspot.com/docs/methods/lists/add_contact_to_list
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| listId | You need to include the ID for the list you're adding the lead to. You can search for lists using the get lists method. |
| contactId | The contact ID of the contact that you're adding to the list. |
HubSpotListAddContactToListResponse In the "updated" attribute, you'll also get the contact ID of the contact that you've just added to the list| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
/** This process generates the URL required to authenticate against the service.
Important: in order for the full authentication to work, the callbackUrl in the configuration must be pointing to another flow that has the authenticateResponse process to handle the reception of the token
| userId | This user identifier it is the one that will we used from now on to the successive calls to the process of this connector for this user |
|---|---|
| callbackUrl | Use this callback instead the one in the configuration |
| clientId | Use this clientId instead the one in the configuration |
| hubId | Use this hubId instead the one in the configuration |
| scope | Use this scope instead the one in the configuration |
| headers | This are added implicitly by Studio. The headers of the HTTP inbound, so it can establish a redirect code (302) |
| HubSpotConnectorException | If occur some error trying to generate the URL or the userId is empty it will throw this exception. |
|---|---|
| HubSpotConnectorNoAccessTokenException | If there is not an access_token in the response it will throw this exception. |
This process is the one that handles the response of the authentication process. It should be inside an HTTP inbound which url must be the same that the one pointed by the callbackUrl in the configuration in order to get the access_token provided by the service.
| inputRequest | The input parameters that came with the response to the authenticate process |
|---|
| HubSpotConnectorException | If any one of the required parameters is empty it will throw this exception. |
|---|---|
| HubSpotConnectorNoAccessTokenException | If there is not an access_token in the response it will throw this exception. |
Create a new contact in HubSpot with a simple HTTP POST to the Contacts API.
API link: http://developers.hubspot.com/docs/methods/contacts/create_contact
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactProperties | The properties that want to modify of an existing contact |
Contact newly created | HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Create a new list in a given HubSpot portal to populate with contacts.
API link: http://developers.hubspot.com/docs/methods/lists/create_list
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| list | The new HubSpotNewList to be created. Required fields:name, portalId. |
| filters | The list of HubSpotListFilters that the list can have |
HubSpotList| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Create a new property in HubSpot. Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please.
This method enables you to create a new property. If you try to create a property whose name already exists in the system, you'll get an HTTP 409 exception thrown from the API.
Currently, there is a 1,000 property limit that you can have in any given portal.
API link: https://developers.hubspot.com/docs/methods/contacts/create_property
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactProperty | The CustomContactProperty to be created |
CustomContactProperty created| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, create a new contact proprerty group.
Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.
There are certain propery groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you create your own custom property group in a portal.
API link: https://developers.hubspot.com/docs/methods/contacts/create_group
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| customContactPropertyGroup | A CustomContactPropertyGroup to be created |
CustomContactPropertyGroup recently created| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Archive an existing contact from a particular HubSpot portal. Archiving will not hard delete a contact from a portal, but will remove that contact from the HubSpot user interface.
API link: http://developers.hubspot.com/docs/methods/contacts/delete_contact
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactId | You must pass the Contact's ID that you're archiving in the request URL. |
ContactDeleted representing the data when the contact is deleted| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Delete an existing property in HubSpot. This method lets you delete one of many properties of a contact in HubSpot.
To delete a contact property, you should make an HTTP DELETE call to this endpoint with the name of the property you're deleting in the request URL.
API link: https://developers.hubspot.com/docs/methods/contacts/delete_property
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactPropertyName | The name of the custom property to be deleted |
| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, delete a contact property group based on the name of the group.
Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.
There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you delete your own custom property group in a portal. You can also create new groups, update existing groups, or just get group and the properties in each group.
API link: https://developers.hubspot.com/docs/methods/contacts/delete_group
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| groupName | The name of the group to be deleted |
| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return all contacts that have been created in the portal. A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page.
API Link: http://developers.hubspot.com/docs/methods/contacts/get_contacts
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| count | This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. |
| contactOffset | This parameter will offset the contacts returned to you, based on the unique ID of the contacts in a given portal. Contact unique IDs are assigned by the order that they are created in the system. This means for instance, if you specify a vidOffset offset of 5, and you have 20 contacts in the portal you're working in, the contacts with IDs 6-20 will be returned to you. |
ContactList containing all the contacts| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please. This method returns all of those properties to you.
API link: https://developers.hubspot.com/docs/methods/contacts/get_properties
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|
CustomContactProperty| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return information about a single contact by its email address.
API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_email
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactEmail | The email address for the contact that you're searching for. |
Contact representation| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return information about a single contact by its ID. The contact's unique ID's is stored in a field called 'vid' which stands for 'visitor ID'. This method will also return you much of the HubSpot lead "intelligence" that you may be accustomed to getting from the leads API, as properties in this new API. More of this intelligence will be available as time passes, but this call is where you can expect to find it.
API link: http://developers.hubspot.com/docs/methods/contacts/get_contact
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactId | Unique identifier for a particular contact. In HubSpot's contact system, contact ID's are called "vid". |
Contact representation| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return information about a single contact by its User Token (hubspotutk)
API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_utk
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactUserToken | The user token (HubSpot cookie) for the contact that you're searching for. |
Contact representation| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return a contact list by its unique ID.
API link: http://developers.hubspot.com/docs/methods/lists/get_list
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| listId | Unique identifier for the list that you're looking for. |
HubSpotList with the list| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return statistics about that portal's contacts.
API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_statistics
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|
ContactStatistics representation of the response of statistics| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return contacts and some data associated with those contacts by the contact's email address or name. Please note that you should expect this method to only return a small subset of data about the contact. One piece of data that the method will return is the contact ID (vid) that you can then use to look up much more data about that particular contact by its ID.
API link: http://developers.hubspot.com/docs/methods/contacts/search_contacts
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| query | The search term for what you're searching for. You can use all of a word or just parts of a word as well. For example, if you we're searching for contacts with "hubspot" in their name or email, searching for "hub" would also return contacts with "hubspot" in their email address. |
| count | This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. |
ContactQuery with the contacts| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal and a given list, identified by its unique ID, return a list of contacts that are in that list.
API link: http://developers.hubspot.com/docs/methods/lists/get_list_contacts
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| listId | Unique identifier for the list that you're looking for. |
| count | This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. |
| property | If you include the "property" parameter, then the properties in the "contact" object in the returned data will only include the property or properties that you request. |
| offset | This parameter will offset the contacts returned to you, based on the unique ID of the contacts in a given portal. Contact unique IDs are assigned by the order that they are created in the system. This means for instance, if you specify a vidOffset offset of 5, and you have 20 contacts in the portal you're working in, the contacts with IDs 6-20 will be returned to you. |
ContactList whit the contact list| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return a set of contact lists that you specify with the count parameter. By default, we will only return up to 20 lists to you at a time.
API link: http://developers.hubspot.com/docs/methods/lists/get_lists
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| count | An integer that represents the number of lists that you want returned to your call. By default, this call will return 20 lists to you. If you want more or different list returned to you, you'll want to use the "offset" parameter. |
| offset | An integer that represents where to start your list pull from. For instance, if you want to return numbered lists: 50-60, your offset should be "50" and your count parameter (seen above) should be 10. You should also note that the returned JSON (seen below) includes a "has-more" field, which lets you know if there are more lists that you can pull. If "has-more" is true, you can use this offset parameter to pull lists that weren't in your initial call. |
HubSpotListLists with the lists| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return all contact property groups that have been created in the portal.
Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.
There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples.
API link: https://developers.hubspot.com/docs/methods/contacts/get_groups
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| groupName | The name of the group to be retrieved |
| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return a set of dynamic contact lists that you specify with the count parameter.
Dynamic lists are lists that can only be edited by the contacts app - they are meant to update themselves when new contacts are created or are updated, meaning that you can't manually add contacts to dynamic lists.
By default, we will only return 20 lists to you via this API call.
API link: http://developers.hubspot.com/docs/methods/lists/get_dynamic_lists
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| count | An integer that represents the number of lists that you want returned to your call. By default, this call will return 20 lists to you. If you want more or different list returned to you, you'll want to use the "offset" parameter. |
| offset | An integer that represents where to start your list pull from. For instance, if you want to return numbered lists: 50-60, your offset should be "50" and your count parameter (seen above) should be 10. You should also note that the returned JSON (seen below) includes a "has-more" field, which lets you know if there are more lists that you can pull. If "has-more" is true, you can use this offset parameter to pull lists that weren't in your initial call. |
HubSpotListLists with the lists| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return all email subscription information for the given email address and portal.
API link: http://developers.hubspot.com/docs/methods/email/get_status
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| hubId | (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) |
| The email to check the current status subscription |
EmailSubscriptionStatus with the status subscription| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return all email subscription types that have been created in the portal.
API link: http://developers.hubspot.com/docs/methods/email/get_subscriptions
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| hubId | (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) |
EmailSubscription with the subscriptions data| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, return all contacts that have been recently updated or created. A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page, as specified by the "count" parameter.
API link: http://developers.hubspot.com/docs/methods/contacts/get_recently_updated_contacts
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| count | This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. |
| timeOffset | Used in conjunction with the vidOffset paramter to page through the recent contacts. Every call to this endpoint will return a time-offset value. This value is used in the timeOffset parameter of the next call to get the next page of contacts. |
| contactOffset | Used in conjunction with the timeOffset paramter to page through the recent contacts. Every call to this endpoint will return a vid-offset value. This value is used in the vidOffset parameter of the next call to get the next page of contacts. |
ContactList containing all the contacts| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Check if the User has an Access Token. This indicate that this User can start calling the process of the connector without any problems
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|
| callbackUrl |
|---|
| clientId |
|---|
| credentialsManager |
|---|
| hubId |
|---|
| objectStore |
|---|
| scope |
|---|
Update an existing contact in HubSpot. This method lets you update one of many fields of a contact in HubSpot.
To update a contact, you should make an HTTP POST call to this endpoint with some JSON in the request payload. This JSON should contain properties from the contact that you want to add to or update. See the sample JSON below for an example of this snippet of JSON.
If you are trying to close a contact into a customer via the API, you should be updating the 'lifecyclestage' property and setting the value of this property to 'customer'.
Remember, if a property doesn't yet exist, you can create a new custom property through the API by using the 'Create Property' method.
API link: http://developers.hubspot.com/docs/methods/contacts/update_contact
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| contactId | You must pass the Contact's ID that you're updating in the request URL |
| contactProperties | The properties of the Contact that will have the one to be created |
ContactProperties that was provided as input param| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
Update an existing property in HubSpot. This method lets you update one of many properties of a contact in HubSpot.T
To update a contact property, you should make an HTTP POST call to this endpoint with some JSON in the request payload. This JSON should contain property attributes that you want to add to or update. See the sample JSON below for an example of this snippet of JSON.
Remember, if a property doesn't yet exist, you can create a new custom property through the API by using the 'Create Property' method.
API link: https://developers.hubspot.com/docs/methods/contacts/update_property
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| propertyName | The name of the Custom Property to be updated |
| contactProperty | The contactProperty to be created |
| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given portal, update a contact property group.
Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.
There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you update your own custom property group in a portal.
API link: https://developers.hubspot.com/docs/methods/contacts/update_group
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| groupName | The name of the Custom Contact Property Group to be updated |
| customContactPropertyGroup | A CustomContactPropertyGroup to be created |
CustomContactPropertyGroup recently created| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given email address and portal, update the email type subscription status. NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.
API link: http://developers.hubspot.com/docs/methods/email/update_status
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| hubId | (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) |
| The email to update the current status subscription | |
| statuses | A List of EmailSubscriptionStatusStatuses to be modified |
EmailSubscriptionStatusResult| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be thrown |
For a given email address and portal, update the email type subscription unsuscribing from all emails NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.
API link: http://developers.hubspot.com/docs/methods/email/update_status
| userId | The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process |
|---|---|
| hubId | (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) |
| The email to update the current status subscription |
EmailSubscriptionStatusResult| HubSpotConnectorException | If the required parameters were not specified or occurs another type of error this exception will be thrown |
|---|---|
| HubSpotConnectorNoAccessTokenException | If the user does not have an Access Token this exception will be thrown |
| HubSpotConnectorAccessTokenExpiredException | If the user has his token already expired this exception will be throwns |