Reference

Endpoint Update Contacts


Name

update_contacts

Description

No description available

Related Tables

Contacts

Parameters

Parameter Required Options
There are no parameters

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_I8 bigint
CreatedAt DT_DBTIMESTAMP datetime
UpdatedAt DT_DBTIMESTAMP datetime
IsArchived DT_BOOL bit
[Dynamic Column] DT_WSTR nvarchar(2000) 2000 [$parent.label$]
If the column you are looking for is missing, consider customizing Hubspot Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_I8 bigint
[Dynamic Column] DT_WSTR nvarchar(2000) 2000 [$parent.label$]
Required columns that you need to supply are bolded.

Examples

SSIS

Use Hubspot Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Destination

This Endpoint belongs to the Contacts table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to update contacts:

API Destination - Hubspot
Read and write HubSpot data effortlessly. Integrate, manage, and automate contacts, companies, deals, and tickets — almost no coding required.
Hubspot
Contacts
Update
There are no parameters to configure.
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Update a contact

<p>Updates an existing contact by ID. Set the properties you want to change in the <code>SET</code> clause; uncomment other lines to update additional custom properties.</p>

UPDATE Contacts
SET firstname='Brian',
    lastname='Halligan (Sample Contact)'
    --, custom_number=12.12
    --, custom_date='2023-01-01'
    --, custom_string='My Test<<FUN_NOW>>'
    --, custom_richtext='<p><span style="color: #b5b5b5;">##-Please reply-##</span></p>'
    --, custom_multi_select='Blue;Yellow;Black'
    --, custom_pickuser=45581955
    --, custom_dropdown='BB'
    --, custom_checkbox='true'
WHERE Id=51

Bulk update contacts using SQL Server data

<p>Updates multiple contacts by reading IDs and new values from a SQL Server SELECT statement or stored procedure. Column names or aliases must match contact properties (e.g. <code>Id</code>, <code>email</code>). The driver uses the HubSpot bulk API to apply the updates.</p>

UPDATE Contacts
SOURCE (
  'MSSQL',
  'Data Source=localhost;Initial Catalog=Test;Integrated Security=true',
  'SELECT Id, email FROM StagingContacts'
)

update_contacts endpoint belongs to Contacts table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Update a contact

<p>Updates an existing contact by ID. Set the properties you want to change in the <code>SET</code> clause; uncomment other lines to update additional custom properties.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Contacts
SET firstname=''Brian'',
    lastname=''Halligan (Sample Contact)''
    --, custom_number=12.12
    --, custom_date=''2023-01-01''
    --, custom_string=''My Test<<FUN_NOW>>''
    --, custom_richtext=''<p><span style="color: #b5b5b5;">##-Please reply-##</span></p>''
    --, custom_multi_select=''Blue;Yellow;Black''
    --, custom_pickuser=45581955
    --, custom_dropdown=''BB''
    --, custom_checkbox=''true''
WHERE Id=51';

EXEC (@MyQuery) AT [LS_TO_HUBSPOT_IN_GATEWAY];

Bulk update contacts using SQL Server data

<p>Updates multiple contacts by reading IDs and new values from a SQL Server SELECT statement or stored procedure. Column names or aliases must match contact properties (e.g. <code>Id</code>, <code>email</code>). The driver uses the HubSpot bulk API to apply the updates.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Contacts
SOURCE (
  ''MSSQL'',
  ''Data Source=localhost;Initial Catalog=Test;Integrated Security=true'',
  ''SELECT Id, email FROM StagingContacts''
)';

EXEC (@MyQuery) AT [LS_TO_HUBSPOT_IN_GATEWAY];

update_contacts endpoint belongs to Contacts table(s), and can therefore be used via those table(s).